[Libreoffice-commits] .: Branch 'feature/gnumake4' - 5 commits - dbaccess/Library_dbu.mk dbaccess/source

Bjoern Michaelsen bmichaelsen at kemper.freedesktop.org
Sun Jul 24 11:39:08 PDT 2011


 dbaccess/Library_dbu.mk                 |   11 +----
 dbaccess/source/ui/dlg/adodatalinks.cxx |    6 +++
 dbaccess/source/ui/inc/HtmlReader.hxx   |    2 -
 dbaccess/source/ui/misc/HtmlReader.cxx  |   60 ++++++++++++++------------------
 4 files changed, 37 insertions(+), 42 deletions(-)

New commits:
commit bd0ad3fad8ec90b5560a783cd47be20c2a9e7b87
Merge: e851f41... 68a37ad...
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Sun Jul 24 19:22:58 2011 +0200

    Merge branch 'master' into feature/gnumake4

commit 68a37ad726dcfc2f254286f21aa36283daa7b705
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Fri Jul 22 16:04:43 2011 -0400

    Adjusted for HTMLParser::GetOptions return type change.

diff --git a/dbaccess/source/ui/inc/HtmlReader.hxx b/dbaccess/source/ui/inc/HtmlReader.hxx
index 410a879..7c17348 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 782eb61..f146560 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 at 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 at 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 at 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 at 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
     }
 }
 // ---------------------------------------------------------------------------
commit 60b2a3d0d4d68a25cc4c30dd2919f86c9d370ebc
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Jul 22 14:58:37 2011 +0300

    Plug MinGW gaps

diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx b/dbaccess/source/ui/dlg/adodatalinks.cxx
index f03a37a..6536220 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);
 
commit a7e45a6611a038f06450d4bfde9a84d68e70549c
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Jul 22 14:56:08 2011 +0300

    Do compile adodatalinks.cxx always for Windows
    
    Don't test any bogus PROF_EDITION, and don't bother with
    WINDOWS_VISTA_PSDK either.

diff --git a/dbaccess/Library_dbu.mk b/dbaccess/Library_dbu.mk
index 0490071..0e3d6c2 100644
--- a/dbaccess/Library_dbu.mk
+++ b/dbaccess/Library_dbu.mk
@@ -288,17 +288,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)
commit bfe2adf93a3c4029e80d449e7769d7752083beb1
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Fri Jul 22 12:39:52 2011 +0300

    Set CXXFLAGS, not CFLAGS

diff --git a/dbaccess/Library_dbu.mk b/dbaccess/Library_dbu.mk
index 61910cf..0490071 100644
--- a/dbaccess/Library_dbu.mk
+++ b/dbaccess/Library_dbu.mk
@@ -58,8 +58,8 @@ $(eval $(call gb_Library_set_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


More information about the Libreoffice-commits mailing list