diff options
37 files changed, 130 insertions, 186 deletions
diff --git a/dbaccess/Executable_odbcconfig.mk b/dbaccess/Executable_odbcconfig.mk index 9afc9ac40c5a..bb2febd1e54d 100644 --- a/dbaccess/Executable_odbcconfig.mk +++ b/dbaccess/Executable_odbcconfig.mk @@ -34,7 +34,11 @@ $(eval $(call gb_Executable_set_include,odbcconfig,\ -I$(realpath $(SRCDIR)/dbaccess/inc) \ -I$(realpath $(SRCDIR)/dbaccess/inc/pch) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_add_api,odbcconfig,\ + offapi \ + udkapi \ )) $(eval $(call gb_Executable_add_linked_libs,odbcconfig,\ diff --git a/dbaccess/Library_dba.mk b/dbaccess/Library_dba.mk index 368eaa192e4a..eabd13a9b74d 100644 --- a/dbaccess/Library_dba.mk +++ b/dbaccess/Library_dba.mk @@ -40,13 +40,17 @@ $(eval $(call gb_Library_set_include,dba,\ -I$(realpath $(SRCDIR)/dbaccess/source/inc) \ -I$(realpath $(SRCDIR)/dbaccess/source/core/inc) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ )) $(eval $(call gb_Library_add_defs,dba,\ -DOOO_DLLIMPLEMENTATION_DBA \ )) +$(eval $(call gb_Library_add_api,dba,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_Library_add_linked_libs,dba,\ comphelper \ cppu \ diff --git a/dbaccess/Library_dbaxml.mk b/dbaccess/Library_dbaxml.mk index e0a190898c24..477f86b53db6 100644 --- a/dbaccess/Library_dbaxml.mk +++ b/dbaccess/Library_dbaxml.mk @@ -34,7 +34,11 @@ $(eval $(call gb_Library_set_include,dbaxml,\ -I$(realpath $(SRCDIR)/dbaccess/inc/pch) \ -I$(realpath $(SRCDIR)/dbaccess/source/inc) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_add_api,dbaxml,\ + offapi \ + udkapi \ )) $(eval $(call gb_Library_add_linked_libs,dbaxml,\ diff --git a/dbaccess/Library_dbmm.mk b/dbaccess/Library_dbmm.mk index db6b152b2d4f..023157ddae65 100644 --- a/dbaccess/Library_dbmm.mk +++ b/dbaccess/Library_dbmm.mk @@ -38,7 +38,11 @@ $(eval $(call gb_Library_set_include,dbmm,\ -I$(realpath $(SRCDIR)/dbaccess/inc) \ -I$(realpath $(SRCDIR)/dbaccess/inc/pch) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_add_api,dbmm,\ + offapi \ + udkapi \ )) $(eval $(call gb_Library_add_linked_libs,dbmm,\ diff --git a/dbaccess/Library_sdbt.mk b/dbaccess/Library_sdbt.mk index a93bc256bdc0..5338fcf56997 100644 --- a/dbaccess/Library_sdbt.mk +++ b/dbaccess/Library_sdbt.mk @@ -40,7 +40,11 @@ $(eval $(call gb_Library_set_include,sdbt,\ -I$(realpath $(SRCDIR)/dbaccess/source/inc/) \ -I$(realpath $(SRCDIR)/dbaccess/source/sdbtools/inc) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_add_api,sdbt,\ + offapi \ + udkapi \ )) $(eval $(call gb_Library_add_linked_libs,sdbt,\ diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx index 2aa99a9ff767..79738dc6b7b5 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.cxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx @@ -203,7 +203,7 @@ Sequence< sal_Int8 > ORowSetDataColumn::getImplementationId() throw (RuntimeExce void ORowSetDataColumn::fireValueChange(const ORowSetValue& _rOldValue) { - if ( !m_aColumnValue.isNull() && m_aColumnValue->is() && (!(((*m_aColumnValue)->get())[m_nPos] == _rOldValue)) ) + if ( !m_aColumnValue.isNull() && m_aColumnValue->is() && (((*m_aColumnValue)->get())[m_nPos] != _rOldValue) ) { sal_Int32 nHandle = PROPERTY_ID_VALUE; m_aOldValue = _rOldValue.makeAny(); diff --git a/dbaccess/source/core/misc/services.cxx b/dbaccess/source/core/misc/services.cxx index 61e9c65d2e59..e1b47a6e831c 100644 --- a/dbaccess/source/core/misc/services.cxx +++ b/dbaccess/source/core/misc/services.cxx @@ -96,22 +96,13 @@ extern "C" void SAL_CALL createRegistryInfo_DBA() } //--------------------------------------------------------------------------------------- - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** - ) -{ - createRegistryInfo_DBA(); - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -//--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( +extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dba_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* pRegistryKey) { + createRegistryInfo_DBA(); + Reference< XInterface > xRet; if (pServiceManager && pImplementationName) { diff --git a/dbaccess/source/ext/adabas/Aservices.cxx b/dbaccess/source/ext/adabas/Aservices.cxx index eb83f464b473..dbe21ca8c9f4 100644 --- a/dbaccess/source/ext/adabas/Aservices.cxx +++ b/dbaccess/source/ext/adabas/Aservices.cxx @@ -57,22 +57,13 @@ extern "C" void SAL_CALL createRegistryInfo_adabasui() } //--------------------------------------------------------------------------------------- - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** - ) -{ - createRegistryInfo_adabasui(); - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -//--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( +extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL adabasui_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* /*pRegistryKey*/) { + createRegistryInfo_adabasui(); + Reference< XInterface > xRet; if (pServiceManager && pImplementationName) { diff --git a/dbaccess/source/ext/adabas/adabasui.component b/dbaccess/source/ext/adabas/adabasui.component index e547a0cffd4e..e9a79b1d59c1 100644 --- a/dbaccess/source/ext/adabas/adabasui.component +++ b/dbaccess/source/ext/adabas/adabasui.component @@ -26,7 +26,7 @@ * **********************************************************************--> -<component loader="com.sun.star.loader.SharedLibrary" +<component loader="com.sun.star.loader.SharedLibrary" prefix="adabasui" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="org.openoffice.comp.adabasui.AdabasCreateDialog"> <service name="com.sun.star.sdb.AdabasCreationDialog"/> diff --git a/dbaccess/source/ext/adabas/adabasui.dxp b/dbaccess/source/ext/adabas/adabasui.dxp deleted file mode 100644 index 926e49f5f1a5..000000000000 --- a/dbaccess/source/ext/adabas/adabasui.dxp +++ /dev/null @@ -1,3 +0,0 @@ -component_getImplementationEnvironment -component_getFactory - diff --git a/dbaccess/source/ext/adabas/exports.dxp b/dbaccess/source/ext/adabas/exports.dxp deleted file mode 100644 index f0e1c69934bc..000000000000 --- a/dbaccess/source/ext/adabas/exports.dxp +++ /dev/null @@ -1,2 +0,0 @@ -component_getImplementationEnvironment -component_getFactory diff --git a/dbaccess/source/ext/macromigration/dbmm.component b/dbaccess/source/ext/macromigration/dbmm.component index a74e94510aeb..cb91044f5ee6 100644 --- a/dbaccess/source/ext/macromigration/dbmm.component +++ b/dbaccess/source/ext/macromigration/dbmm.component @@ -26,7 +26,7 @@ * **********************************************************************--> -<component loader="com.sun.star.loader.SharedLibrary" +<component loader="com.sun.star.loader.SharedLibrary" prefix="dbmm" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.comp.dbaccess.macromigration.MacroMigrationDialogService"> <service name="com.sun.star.sdb.application.MacroMigrationWizard"/> diff --git a/dbaccess/source/ext/macromigration/dbmm_services.cxx b/dbaccess/source/ext/macromigration/dbmm_services.cxx index 5d595c63c7bc..c88c6de887d4 100644 --- a/dbaccess/source/ext/macromigration/dbmm_services.cxx +++ b/dbaccess/source/ext/macromigration/dbmm_services.cxx @@ -49,6 +49,11 @@ namespace dbmm } // namespace dbmm //........................................................................ -IMPLEMENT_COMPONENT_LIBRARY_API( ::dbmm::MacroMigrationModule, ::dbmm::initializeModule ) +extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbmm_component_getFactory( + const sal_Char* pImplementationName, void* pServiceManager, void* pRegistryKey ) +{ + ::dbmm::initializeModule(); + return ::dbmm::MacroMigrationModule::getInstance().getComponentFactory( pImplementationName, pServiceManager, pRegistryKey ); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/dbaxml.component b/dbaccess/source/filter/xml/dbaxml.component index 23b3a5c1a776..86816c9f2128 100644 --- a/dbaccess/source/filter/xml/dbaxml.component +++ b/dbaccess/source/filter/xml/dbaxml.component @@ -26,7 +26,7 @@ * **********************************************************************--> -<component loader="com.sun.star.loader.SharedLibrary" +<component loader="com.sun.star.loader.SharedLibrary" prefix="dbaxml" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.comp.sdb.DBExportFilter"> <service name="com.sun.star.document.ExportFilter"/> diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index bef47dc01ade..a7eb078f8f29 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -120,9 +120,8 @@ namespace dbaxml { ::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM(m_xFactory); } - catch(uno::Exception& ex) + catch (const uno::Exception&) { - (void)ex; OSL_ASSERT(0); } } @@ -167,9 +166,8 @@ namespace dbaxml ::comphelper::disposeComponent(xModel); } } - catch(uno::Exception& ex) + catch (const uno::Exception&) { - (void)ex; OSL_ASSERT(0); } } @@ -268,33 +266,31 @@ sal_Int32 ReadThroughComponent( { xParser->parseStream( aParserInput ); } -#if OSL_DEBUG_LEVEL > 1 - catch( SAXParseException& r ) + catch (const SAXParseException& r) { - ByteString aError( "SAX parse exception catched while importing:\n" ); - aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US ); - aError += ByteString::CreateFromInt32( r.LineNumber ); - aError += ','; - aError += ByteString::CreateFromInt32( r.ColumnNumber ); - - OSL_FAIL( aError.GetBuffer() ); - return 1; - } +#if OSL_DEBUG_LEVEL > 1 + rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM( + "SAX parse exception catched while importing:\n")); + aError.append(rtl::OUStringToOString(r.Message, + RTL_TEXTENCODING_ASCII_US)); + aError.append(r.LineNumber); + aError.append(','); + aError.append(r.ColumnNumber); + OSL_FAIL(aError.getStr()); #else - catch( SAXParseException& ) - { + (void)r; +#endif return 1; } -#endif - catch( SAXException& ) + catch (const SAXException&) { return 1; } - catch( packages::zip::ZipIOException& ) + catch (const packages::zip::ZipIOException&) { return ERRCODE_IO_BROKENPACKAGE; } - catch( Exception& ) + catch (const Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -346,11 +342,11 @@ sal_Int32 ReadThroughComponent( uno::Any aAny = xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Encrypted") ) ); aAny >>= bEncrypted; } - catch( packages::WrongPasswordException& ) + catch (const packages::WrongPasswordException&) { return ERRCODE_SFX_WRONGPASSWORD; } - catch ( uno::Exception& ) + catch (const uno::Exception&) { return 1; // TODO/LATER: error handling } @@ -457,7 +453,7 @@ sal_Bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) { xStorage.set( pMedium->GetStorage( sal_False ), UNO_QUERY_THROW ); } - catch( const Exception& ) + catch (const Exception&) { Any aError = ::cppu::getCaughtException(); if ( aError.isExtractableTo( ::cppu::UnoType< RuntimeException >::get() ) ) @@ -908,7 +904,7 @@ void ODBFilter::setPropertyInfo() { xDataSource->setPropertyValue(PROPERTY_INFO,makeAny(aInfo)); } - catch(const Exception&) + catch (const Exception&) { DBG_UNHANDLED_EXCEPTION(); } diff --git a/dbaccess/source/filter/xml/xmlservices.cxx b/dbaccess/source/filter/xml/xmlservices.cxx index 93df97d58ca2..119418209286 100644 --- a/dbaccess/source/filter/xml/xmlservices.cxx +++ b/dbaccess/source/filter/xml/xmlservices.cxx @@ -68,22 +68,13 @@ extern "C" void SAL_CALL createRegistryInfo_dbaxml() } //--------------------------------------------------------------------------------------- - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** - ) -{ - createRegistryInfo_dbaxml(); - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -//--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( +extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbaxml_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* /*pRegistryKey*/) { + createRegistryInfo_dbaxml(); + Reference< XInterface > xRet; if (pServiceManager && pImplementationName) { diff --git a/dbaccess/source/sdbtools/misc/sdbt_services.cxx b/dbaccess/source/sdbtools/misc/sdbt_services.cxx index 3bef9a0b26b4..9956d7a8d03b 100644 --- a/dbaccess/source/sdbtools/misc/sdbt_services.cxx +++ b/dbaccess/source/sdbtools/misc/sdbt_services.cxx @@ -54,22 +54,13 @@ extern "C" void SAL_CALL sdbt_initializeModule() } //--------------------------------------------------------------------------------------- - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** - ) -{ - sdbt_initializeModule(); - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -//--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( +extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL sdbt_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* /*pRegistryKey*/) { + sdbt_initializeModule(); + Reference< XInterface > xRet; if (pServiceManager && pImplementationName) { diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index 74be4d23d182..7f24b7b37fe1 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -100,20 +100,7 @@ using namespace ::com::sun::star::util; namespace { - // ----------------------------------------------------------------------------- - double checkDoubleForDateFormat(double _nValue,sal_Int32 _nFormatKey,const Reference< ::com::sun::star::util::XNumberFormatter>& _xNumberFormatter) - { - double nValue = _nValue; - sal_Int32 nNumberFormat = ::comphelper::getNumberFormatType(_xNumberFormatter,_nFormatKey); - if( (nNumberFormat & ::com::sun::star::util::NumberFormat::DATE) == ::com::sun::star::util::NumberFormat::DATE - || (nNumberFormat & ::com::sun::star::util::NumberFormat::DATETIME) == ::com::sun::star::util::NumberFormat::DATETIME ) - { - nValue = DBTypeConversion::toStandardDbDate(DBTypeConversion::getNULLDate(_xNumberFormatter->getNumberFormatsSupplier()),nValue); - } - return nValue; - } - // ----------------------------------------------------------------------------- template< typename T1, typename T2> void lcl_HideAndDeleteControl(short& _nPos,T1** _pControl,T2** _pControlText) { if ( *_pControl ) diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 464aba52b7df..f9c7ec0fed77 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -42,6 +42,7 @@ #include <unotools/pathoptions.hxx> #include <ucbhelper/content.hxx> #include <svl/filenotation.hxx> +#include <rtl/strbuf.hxx> //......................................................................... @@ -493,14 +494,13 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const // Erst einmal alle Tabellenindizes loeschen ByteString aNDX; sal_uInt16 nKeyCnt = aInfFile.GetKeyCount(); - ByteString aKeyName; ByteString aEntry; sal_uInt16 nKey = 0; while( nKey < nKeyCnt ) { // Verweist der Key auf ein Indexfile?... - aKeyName = aInfFile.GetKeyName( nKey ); + ByteString aKeyName = aInfFile.GetKeyName( nKey ); aNDX = aKeyName.Copy(0,3); //...wenn ja, Indexfile loeschen, nKey steht dann auf nachfolgendem Key @@ -521,10 +521,13 @@ void OTableInfo::WriteInfFile( const String& rDSN ) const ++aIndex, ++nPos ) { - aKeyName = "NDX"; + rtl::OStringBuffer aKeyName(RTL_CONSTASCII_STRINGPARAM("NDX")); if( nPos > 0 ) // Erster Index erhaelt keine Ziffer - aKeyName += ByteString::CreateFromInt32( nPos ); - aInfFile.WriteKey( aKeyName, ByteString(aIndex->GetIndexFileName(), gsl_getSystemTextEncoding()) ); + aKeyName.append(static_cast<sal_Int32>(nPos)); + aInfFile.WriteKey( + aKeyName.makeStringAndClear(), + rtl::OUStringToOString(aIndex->GetIndexFileName(), + gsl_getSystemTextEncoding())); } aInfFile.Flush(); diff --git a/dbaccess/source/ui/misc/uiservices.cxx b/dbaccess/source/ui/misc/uiservices.cxx index dfce75ace0df..68405fcaadcd 100644 --- a/dbaccess/source/ui/misc/uiservices.cxx +++ b/dbaccess/source/ui/misc/uiservices.cxx @@ -107,22 +107,13 @@ extern "C" void SAL_CALL createRegistryInfo_DBU() } //--------------------------------------------------------------------------------------- - -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char **ppEnvTypeName, - uno_Environment ** - ) -{ - createRegistryInfo_DBU(); - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -//--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( +extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbu_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* /*pRegistryKey*/) { + createRegistryInfo_DBU(); + Reference< XInterface > xRet; if (pServiceManager && pImplementationName) { diff --git a/dbaccess/util/dba.component b/dbaccess/util/dba.component index b25768dbfab6..5b5155a6c604 100644 --- a/dbaccess/util/dba.component +++ b/dbaccess/util/dba.component @@ -26,7 +26,7 @@ * **********************************************************************--> -<component loader="com.sun.star.loader.SharedLibrary" +<component loader="com.sun.star.loader.SharedLibrary" prefix="dba" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.comp.chart2.data.DatabaseDataProvider"> <service name="com.sun.star.chart2.data.DatabaseDataProvider"/> diff --git a/dbaccess/util/dbu.component b/dbaccess/util/dbu.component index ce0dc45cf0be..e5260ed164e9 100644 --- a/dbaccess/util/dbu.component +++ b/dbaccess/util/dbu.component @@ -26,7 +26,7 @@ * **********************************************************************--> -<component loader="com.sun.star.loader.SharedLibrary" +<component loader="com.sun.star.loader.SharedLibrary" prefix="dbu" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.comp.dbaccess.DatabaseInteractionHandler"> <service name="com.sun.star.sdb.DatabaseInteractionHandler"/> diff --git a/dbaccess/util/sdbt.component b/dbaccess/util/sdbt.component index 0038c0cad27f..9c0dec30405f 100644 --- a/dbaccess/util/sdbt.component +++ b/dbaccess/util/sdbt.component @@ -26,7 +26,7 @@ * **********************************************************************--> -<component loader="com.sun.star.loader.SharedLibrary" +<component loader="com.sun.star.loader.SharedLibrary" prefix="sdbt" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.comp.dbaccess.ConnectionTools"> <service name="com.sun.star.sdb.tools.ConnectionTools"/> diff --git a/reportdesign/Library_rpt.mk b/reportdesign/Library_rpt.mk index a717e372cfa7..bfd0564ed886 100644 --- a/reportdesign/Library_rpt.mk +++ b/reportdesign/Library_rpt.mk @@ -36,13 +36,17 @@ $(eval $(call gb_Library_set_include,rpt,\ -I$(realpath $(SRCDIR)/reportdesign/source/inc) \ -I$(realpath $(SRCDIR)/reportdesign/source/core/inc) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ )) $(eval $(call gb_Library_add_defs,rpt,\ -DREPORTDESIGN_DLLIMPLEMENTATION \ )) +$(eval $(call gb_Library_add_api,rpt,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_Library_add_linked_libs,rpt,\ comphelper \ cppu \ diff --git a/reportdesign/Library_rptui.mk b/reportdesign/Library_rptui.mk index 8fcfb7161a63..4183b8473865 100644 --- a/reportdesign/Library_rptui.mk +++ b/reportdesign/Library_rptui.mk @@ -36,7 +36,11 @@ $(eval $(call gb_Library_set_include,rptui,\ -I$(realpath $(SRCDIR)/reportdesign/source/inc) \ -I$(realpath $(SRCDIR)/reportdesign/source/ui/inc) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_add_api,rptui,\ + offapi \ + udkapi \ )) $(eval $(call gb_Library_add_linked_libs,rptui,\ diff --git a/reportdesign/Library_rptxml.mk b/reportdesign/Library_rptxml.mk index 5333cfd7598a..4e4bd0935c42 100644 --- a/reportdesign/Library_rptxml.mk +++ b/reportdesign/Library_rptxml.mk @@ -35,9 +35,13 @@ $(eval $(call gb_Library_set_include,rptxml,\ -I$(realpath $(SRCDIR)/reportdesign/inc/pch) \ -I$(realpath $(SRCDIR)/reportdesign/source/inc) \ -I$(OUTDIR)/inc \ - -I$(OUTDIR)/inc/offuh \ )) +)) + +$(eval $(call gb_Library_add_api,rptxml,\ + offapi \ + udkapi \ $(eval $(call gb_Library_add_linked_libs,rptxml,\ comphelper \ cppu \ diff --git a/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java b/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java index 6dfb6f719daf..fc7048d0c7ec 100644 --- a/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java +++ b/reportdesign/qa/complex/reportdesign/ReportDesignerTest.java @@ -250,7 +250,6 @@ public class ReportDesignerTest private String m_sMailAddress = null; private String m_sUPDMinor; - private String m_sCWS_WORK_STAMP; private static final int WRITER = 1; private static final int CALC = 2; @@ -272,8 +271,6 @@ public class ReportDesignerTest System.out.println("Assumed mail address: " + m_sMailAddress); m_sUPDMinor = System.getProperty("UPDMINOR"); - m_sCWS_WORK_STAMP = System.getProperty("CWS_WORK_STAMP"); - System.out.println("Current CWS: " + m_sCWS_WORK_STAMP); System.out.println("Current MWS: " + m_sUPDMinor); // sAppExecutionCommand = sAppExecutionCommand.replaceAll( "\\$\\{USERNAME\\}", sUser); @@ -383,11 +380,7 @@ public class ReportDesignerTest String sDBConnection = ""; // (String)param.get( convwatch.PropertyName.DB_CONNECTION_STRING ); System.out.println("DBConnection: " + sDBConnection); DB.init(sDBConnection); - String sDestinationVersion = m_sCWS_WORK_STAMP; - if (sDestinationVersion.length() == 0) - { - sDestinationVersion = m_sUPDMinor; - } + String sDestinationVersion = m_sUPDMinor; String sDestinationName = ""; String sDestinationCreatorType = ""; String sDocumentPoolDir = getOutputPath(_nType); diff --git a/reportdesign/source/core/api/services.cxx b/reportdesign/source/core/api/services.cxx index 91db354a02e3..bbb7db0f5c76 100644 --- a/reportdesign/source/core/api/services.cxx +++ b/reportdesign/source/core/api/services.cxx @@ -78,19 +78,13 @@ cppu::ImplementationEntry entries[] = { extern "C" { -SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL rpt_component_getFactory( char const * implName, void * serviceManager, void * registryKey) { return cppu::component_getFactoryHelper( implName, serviceManager, registryKey, entries); } -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - char const ** envTypeName, uno_Environment **) -{ - *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - } // extern "C" /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index ab13aa78d22d..bcf6289ca558 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -182,37 +182,35 @@ sal_Int32 ReadThroughComponent( { xParser->parseStream( aParserInput ); } - catch( SAXParseException& - -#if OSL_DEBUG_LEVEL > 1 -r -#endif -) + catch (const SAXParseException& r) { #if OSL_DEBUG_LEVEL > 1 - ByteString aError( "SAX parse exception catched while importing:\n" ); - aError += ByteString( String( r.Message), RTL_TEXTENCODING_ASCII_US ); - aError += ByteString::CreateFromInt32( r.LineNumber ); - aError += ','; - aError += ByteString::CreateFromInt32( r.ColumnNumber ); - - OSL_FAIL( aError.GetBuffer() ); + rtl::OStringBuffer aError(RTL_CONSTASCII_STRINGPARAM( + "SAX parse exception caught while importing:\n")); + aError.append(rtl::OUStringToOString(r.Message, + RTL_TEXTENCODING_ASCII_US)); + aError.append(r.LineNumber); + aError.append(','); + aError.append(r.ColumnNumber); + OSL_FAIL(aError.getStr()); +#else + (void)r; #endif return 1; } - catch( SAXException& ) + catch (const SAXException&) { return 1; } - catch( packages::zip::ZipIOException& ) + catch (const packages::zip::ZipIOException&) { return ERRCODE_IO_BROKENPACKAGE; } - catch( IOException& ) + catch (const IOException&) { return 1; } - catch( Exception& ) + catch (const Exception&) { return 1; } @@ -266,11 +264,11 @@ sal_Int32 ReadThroughComponent( uno::Reference< beans::XPropertySet > xProps( xDocStream, uno::UNO_QUERY_THROW ); xProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Encrypted") ) ) >>= bEncrypted; } - catch( packages::WrongPasswordException& ) + catch (const packages::WrongPasswordException&) { return ERRCODE_SFX_WRONGPASSWORD; } - catch ( uno::Exception& ) + catch (const uno::Exception&) { return 1; // TODO/LATER: error handling } @@ -517,7 +515,7 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) { xStorage = pMedium->GetStorage(); } - catch(const Exception&) + catch (const Exception&) { } } @@ -594,7 +592,7 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) { xProp->setPropertyValue(s_sOld,uno::makeAny(!(xStorage->hasByName(s_sMeta) || xStorage->isStreamElement( s_sMeta )))); } - catch(uno::Exception&) + catch (const uno::Exception&) { xProp->setPropertyValue(s_sOld,uno::makeAny(sal_True)); } diff --git a/reportdesign/source/filter/xml/xmlservices.cxx b/reportdesign/source/filter/xml/xmlservices.cxx index d5a4dd4d2861..2561fb475856 100644 --- a/reportdesign/source/filter/xml/xmlservices.cxx +++ b/reportdesign/source/filter/xml/xmlservices.cxx @@ -81,18 +81,11 @@ cppu::ImplementationEntry entries[] = { }; } -extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( +extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL rptxml_component_getFactory( char const * implName, void * serviceManager, void * registryKey) { return cppu::component_getFactoryHelper( implName, serviceManager, registryKey, entries); } -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - char const ** envTypeName, uno_Environment **) -{ - *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx index 77b6e2e4ca86..60e97c7257a5 100644 --- a/reportdesign/source/ui/dlg/Formula.cxx +++ b/reportdesign/source/ui/dlg/Formula.cxx @@ -101,7 +101,7 @@ FormulaDialog::~FormulaDialog() if ( m_pAddField ) { SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromAscii( HID_RPT_FIELD_SEL_WIN ) ); - aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pAddField->GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)).GetBuffer() ) ); + aDlgOpt.SetWindowState(::rtl::OStringToOUString(m_pAddField->GetWindowState((WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y | WINDOWSTATE_MASK_STATE | WINDOWSTATE_MASK_MINIMIZED)), RTL_TEXTENCODING_ASCII_US)); ::std::auto_ptr<Window> aTemp2(m_pAddField); m_pAddField = NULL; diff --git a/reportdesign/source/ui/misc/rptuiservices.cxx b/reportdesign/source/ui/misc/rptuiservices.cxx index bd97ae04a6bc..2d051a3ca361 100644 --- a/reportdesign/source/ui/misc/rptuiservices.cxx +++ b/reportdesign/source/ui/misc/rptuiservices.cxx @@ -69,18 +69,11 @@ cppu::ImplementationEntry entries[] = { }; } -extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( +extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL rptui_component_getFactory( char const * implName, void * serviceManager, void * registryKey) { return cppu::component_getFactoryHelper( implName, serviceManager, registryKey, entries); } -extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - char const ** envTypeName, uno_Environment **) -{ - *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 4e9f88f30a98..26aa98a447d1 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -202,7 +202,7 @@ ODesignView::~ODesignView() if ( m_pAddField ) { SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromAscii( UID_RPT_RPT_APP_VIEW ) ); - aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pAddField->GetWindowState(WINDOWSTATE_MASK_ALL).GetBuffer() ) ); + aDlgOpt.SetWindowState(::rtl::OStringToOUString(m_pAddField->GetWindowState(WINDOWSTATE_MASK_ALL), RTL_TEXTENCODING_ASCII_US)); notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); ::std::auto_ptr<Window> aTemp2(m_pAddField); m_pAddField = NULL; @@ -210,7 +210,7 @@ ODesignView::~ODesignView() if ( m_pReportExplorer ) { SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( RID_NAVIGATOR ) ); - aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pReportExplorer->GetWindowState(WINDOWSTATE_MASK_ALL).GetBuffer() ) ); + aDlgOpt.SetWindowState(::rtl::OStringToOUString(m_pReportExplorer->GetWindowState(WINDOWSTATE_MASK_ALL), RTL_TEXTENCODING_ASCII_US)); notifySystemWindow(this,m_pReportExplorer,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); ::std::auto_ptr<Window> aTemp2(m_pReportExplorer); m_pReportExplorer = NULL; @@ -559,7 +559,7 @@ void ODesignView::toggleReportExplorer() m_pReportExplorer = new ONavigator(this,rReportController); SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( RID_NAVIGATOR ) ); if ( aDlgOpt.Exists() ) - m_pReportExplorer->SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) ); + m_pReportExplorer->SetWindowState(rtl::OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US)); m_pReportExplorer->AddEventListener(LINK(&rReportController,OReportController,EventLstHdl)); notifySystemWindow(this,m_pReportExplorer,::comphelper::mem_fun(&TaskPaneList::AddWindow)); } @@ -596,7 +596,7 @@ void ODesignView::toggleAddField() m_pAddField->SetCreateHdl(LINK( &rReportController, OReportController, OnCreateHdl ) ); SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromAscii( UID_RPT_RPT_APP_VIEW ) ); if ( aDlgOpt.Exists() ) - m_pAddField->SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) ); + m_pAddField->SetWindowState(::rtl::OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US)); m_pAddField->Update(); m_pAddField->AddEventListener(LINK(&rReportController,OReportController,EventLstHdl)); notifySystemWindow(this,m_pAddField,::comphelper::mem_fun(&TaskPaneList::AddWindow)); diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index df3881327ded..781a78aec69b 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -350,7 +350,7 @@ void OReportController::disposing() if ( m_pGroupsFloater ) { SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( RID_GROUPS_SORTING ) ); - aDlgOpt.SetWindowState( ::rtl::OUString::createFromAscii( m_pGroupsFloater->GetWindowState(WINDOWSTATE_MASK_ALL).GetBuffer() ) ); + aDlgOpt.SetWindowState(::rtl::OStringToOUString(m_pGroupsFloater->GetWindowState(WINDOWSTATE_MASK_ALL), RTL_TEXTENCODING_ASCII_US)); ::std::auto_ptr<FloatingWindow> aTemp(m_pGroupsFloater); m_pGroupsFloater = NULL; } @@ -2551,7 +2551,7 @@ void OReportController::openSortingAndGroupingDialog() m_pGroupsFloater = new OGroupsSortingDialog(getView(),!isEditable(),this); SvtViewOptions aDlgOpt( E_WINDOW, String::CreateFromInt32( RID_GROUPS_SORTING ) ); if ( aDlgOpt.Exists() ) - m_pGroupsFloater->SetWindowState( ByteString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) ); + m_pGroupsFloater->SetWindowState(::rtl::OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US)); m_pGroupsFloater->AddEventListener(LINK(this,OReportController,EventLstHdl)); } else if ( isUiVisible() ) diff --git a/reportdesign/util/rpt.component b/reportdesign/util/rpt.component index ef5b2cc4c78d..20fc9d19cf98 100644 --- a/reportdesign/util/rpt.component +++ b/reportdesign/util/rpt.component @@ -26,7 +26,7 @@ * **********************************************************************--> -<component loader="com.sun.star.loader.SharedLibrary" +<component loader="com.sun.star.loader.SharedLibrary" prefix="rpt" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.comp.report.OFixedLine"> <service name="com.sun.star.report.FixedLine"/> diff --git a/reportdesign/util/rptui.component b/reportdesign/util/rptui.component index 593f06d0b582..e4d61aaca0f9 100644 --- a/reportdesign/util/rptui.component +++ b/reportdesign/util/rptui.component @@ -26,7 +26,7 @@ * **********************************************************************--> -<component loader="com.sun.star.loader.SharedLibrary" +<component loader="com.sun.star.loader.SharedLibrary" prefix="rptui" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.comp.report.DataProviderHandler"> <service name="com.sun.star.report.inspection.DataProviderHandler"/> diff --git a/reportdesign/util/rptxml.component b/reportdesign/util/rptxml.component index 8a0021ecdf9a..ccc4486b100f 100644 --- a/reportdesign/util/rptxml.component +++ b/reportdesign/util/rptxml.component @@ -26,7 +26,7 @@ * **********************************************************************--> -<component loader="com.sun.star.loader.SharedLibrary" +<component loader="com.sun.star.loader.SharedLibrary" prefix="rptxml" xmlns="http://openoffice.org/2010/uno-components"> <implementation name="com.sun.star.comp.Report.XMLOasisContentImporter"> <service name="com.sun.star.comp.document.ImportFilter"/> |