diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-24 19:22:58 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-24 19:22:58 +0200 |
commit | bd0ad3fad8ec90b5560a783cd47be20c2a9e7b87 (patch) | |
tree | 225da0ac3714ded27754b8c71448caa4fcc10f12 | |
parent | e851f4185bcda511f33fb38e0aba9162252b7fce (diff) | |
parent | 68a37ad726dcfc2f254286f21aa36283daa7b705 (diff) |
Merge branch 'master' into feature/gnumake4feature/gnumake4
-rw-r--r-- | dbaccess/Library_dbu.mk | 11 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/adodatalinks.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/HtmlReader.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/HtmlReader.cxx | 60 |
4 files changed, 37 insertions, 42 deletions
diff --git a/dbaccess/Library_dbu.mk b/dbaccess/Library_dbu.mk index 5c6b31e20..c90e3d320 100644 --- a/dbaccess/Library_dbu.mk +++ b/dbaccess/Library_dbu.mk @@ -56,8 +56,8 @@ $(eval $(call gb_Library_add_defs,dbu,\ endif ifeq ($(GUI)$(COM),WNTGCC) # for adoint.h -$(eval $(call gb_Library_set_cflags,dbu,\ - $$(CFLAGS) \ +$(eval $(call gb_Library_set_cxxflags,dbu,\ + $$(CXXFLAGS) \ -fpermissive \ )) endif @@ -286,17 +286,10 @@ $(eval $(call gb_Library_add_noexception_objects,dbu,\ )) ifeq ($(GUI),WNT) -ifneq (,$(strip $(WINDOWS_VISTA_PSDK))) -ifeq (,$(strip $(PROF_EDITION))) -dbu_DISABLE_ADO := $(true) -endif -endif -ifneq ($(dbu_DISABLE_ADO),$(true)) $(eval $(call gb_Library_add_noexception_objects,dbu,\ dbaccess/source/ui/dlg/adodatalinks \ )) endif -endif # workaround for issue http://qa.openoffice.org/issues/show_bug.cgi?id=102305 Linux specific ifeq ($(COM),GCC) diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx b/dbaccess/source/ui/dlg/adodatalinks.cxx index f03a37a00..65362200d 100644 --- a/dbaccess/source/ui/dlg/adodatalinks.cxx +++ b/dbaccess/source/ui/dlg/adodatalinks.cxx @@ -47,6 +47,12 @@ #include "adodatalinks.hxx" +#ifdef __MINGW32__ +const IID IID_IDataSourceLocator = { 0x2206CCB2, 0x19C1, 0x11D1, { 0x89, 0xE0, 0x00, 0xC0, 0x4F, 0xD7, 0xA8, 0x29 } }; +const CLSID CLSID_DataLinks = { 0x2206CDB2, 0x19C1, 0x11D1, { 0x89, 0xE0, 0x00, 0xC0, 0x4F, 0xD7, 0xA8, 0x29 } }; +#endif + + BSTR PromptEdit(long hWnd,BSTR connstr); BSTR PromptNew(long hWnd); diff --git a/dbaccess/source/ui/inc/HtmlReader.hxx b/dbaccess/source/ui/inc/HtmlReader.hxx index 410a87961..7c17348f9 100644 --- a/dbaccess/source/ui/inc/HtmlReader.hxx +++ b/dbaccess/source/ui/inc/HtmlReader.hxx @@ -57,7 +57,7 @@ namespace dbaui void TableDataOn(SvxCellHorJustify& eVal); void TableFontOn(::com::sun::star::awt::FontDescriptor& _rFont,sal_Int32 &_rTextColor); - sal_Int16 GetWidthPixel( const HTMLOption* pOption ); + sal_Int16 GetWidthPixel( const HTMLOption& rOption ); void setTextEncoding(); void fetchOptions(); virtual ~OHTMLReader(); diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx index 782eb61f6..f146560b6 100644 --- a/dbaccess/source/ui/misc/HtmlReader.cxx +++ b/dbaccess/source/ui/misc/HtmlReader.cxx @@ -168,16 +168,15 @@ void OHTMLReader::NextToken( int nToken ) case HTML_TABLE_ON: ++m_nTableCount; { // es kann auch TD oder TH sein, wenn es vorher kein TABLE gab - const HTMLOptions* pHtmlOptions = GetOptions(); - sal_Int16 nArrLen = pHtmlOptions->Count(); - for ( sal_Int16 i = 0; i < nArrLen; i++ ) + const HTMLOptions& rHtmlOptions = GetOptions(); + for (size_t i = 0, n = rHtmlOptions.size(); i < n; ++i) { - const HTMLOption* pOption = (*pHtmlOptions)[i]; - switch( pOption->GetToken() ) + const HTMLOption& rOption = rHtmlOptions[i]; + switch( rOption.GetToken() ) { case HTML_O_WIDTH: { // Prozent: von Dokumentbreite bzw. aeusserer Zelle - m_nColumnWidth = GetWidthPixel( pOption ); + m_nColumnWidth = GetWidthPixel( rOption ); } break; } @@ -327,21 +326,20 @@ void OHTMLReader::fetchOptions() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::fetchOptions" ); m_bInTbl = sal_True; - const HTMLOptions* options = GetOptions(); - sal_Int16 nArrLen = options->Count(); - for ( sal_Int16 i = 0; i < nArrLen; i++ ) + const HTMLOptions& options = GetOptions(); + for (size_t i = 0, n = options.size(); i < n; ++i) { - const HTMLOption* pOption = (*options)[i]; - switch( pOption->GetToken() ) + const HTMLOption& rOption = options[i]; + switch( rOption.GetToken() ) { case HTML_O_SDVAL: { - m_sValToken = pOption->GetString(); + m_sValToken = rOption.GetString(); m_bSDNum = sal_True; } break; case HTML_O_SDNUM: - m_sNumToken = pOption->GetString(); + m_sNumToken = rOption.GetString(); break; } } @@ -351,16 +349,15 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::TableDataOn" ); DBG_CHKTHIS(OHTMLReader,NULL); - const HTMLOptions* pHtmlOptions = GetOptions(); - sal_Int16 nArrLen = pHtmlOptions->Count(); - for ( sal_Int16 i = 0; i < nArrLen; i++ ) + const HTMLOptions& rHtmlOptions = GetOptions(); + for (size_t i = 0, n = rHtmlOptions.size(); i < n; ++i) { - const HTMLOption* pOption = (*pHtmlOptions)[i]; - switch( pOption->GetToken() ) + const HTMLOption& rOption = rHtmlOptions[i]; + switch( rOption.GetToken() ) { case HTML_O_ALIGN: { - const String& rOptVal = pOption->GetString(); + const String& rOptVal = rOption.GetString(); if (rOptVal.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_right )) eVal = SVX_HOR_JUSTIFY_RIGHT; else if (rOptVal.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_center )) @@ -372,7 +369,7 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal) } break; case HTML_O_WIDTH: - m_nWidth = GetWidthPixel( pOption ); + m_nWidth = GetWidthPixel( rOption ); break; } } @@ -383,23 +380,22 @@ void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::TableFontOn" ); DBG_CHKTHIS(OHTMLReader,NULL); - const HTMLOptions* pHtmlOptions = GetOptions(); - sal_Int16 nArrLen = pHtmlOptions->Count(); - for ( sal_Int16 i = 0; i < nArrLen; i++ ) + const HTMLOptions& rHtmlOptions = GetOptions(); + for (size_t i = 0, n = rHtmlOptions.size(); i < n; ++i) { - const HTMLOption* pOption = (*pHtmlOptions)[i]; - switch( pOption->GetToken() ) + const HTMLOption& rOption = rHtmlOptions[i]; + switch( rOption.GetToken() ) { case HTML_O_COLOR: { Color aColor; - pOption->GetColor( aColor ); + rOption.GetColor( aColor ); _rTextColor = aColor.GetRGBColor(); } break; case HTML_O_FACE : { - const String& rFace = pOption->GetString(); + const String& rFace = rOption.GetString(); String aFontName; xub_StrLen nPos = 0; while( nPos != STRING_NOTFOUND ) @@ -416,7 +412,7 @@ void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor) break; case HTML_O_SIZE : { - sal_Int16 nSize = (sal_Int16) pOption->GetNumber(); + sal_Int16 nSize = (sal_Int16) rOption.GetNumber(); if ( nSize == 0 ) nSize = 1; else if ( nSize < DBAUI_HTML_FONTSIZES ) @@ -429,15 +425,15 @@ void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor) } } // --------------------------------------------------------------------------- -sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption* pOption ) +sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption& rOption ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLReader::GetWidthPixel" ); DBG_CHKTHIS(OHTMLReader,NULL); - const String& rOptVal = pOption->GetString(); + const String& rOptVal = rOption.GetString(); if ( rOptVal.Search('%') != STRING_NOTFOUND ) { // Prozent OSL_ENSURE( m_nColumnWidth, "WIDTH Option: m_nColumnWidth==0 und Width%" ); - return (sal_Int16)((pOption->GetNumber() * m_nColumnWidth) / 100); + return (sal_Int16)((rOption.GetNumber() * m_nColumnWidth) / 100); } else { @@ -447,7 +443,7 @@ sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption* pOption ) return 0; } else - return (sal_Int16)pOption->GetNumber(); // Pixel + return (sal_Int16)rOption.GetNumber(); // Pixel } } // --------------------------------------------------------------------------- |