[Libreoffice-commits] core.git: 13 commits - basic/source config_host/config_kde4.h.in config_host/README connectivity/source cppuhelper/source cppunit/UnpackedTarball_cppunit.mk cppunit/wundef.patch filter/source i18npool/qa icu/icu4c-warnings.patch libwpg/StaticLibrary_wpg.mk mdds/UnpackedTarball_mdds.mk mdds/wundef.patch np_sdk/mozsrc oox/inc oox/source pyuno/source sax/source sc/source sfx2/source solenv/gbuild svl/source sw/source test/source toolkit/source ucb/source vcl/source vcl/unx writerfilter/source xmloff/source xmlscript/source xmlsecurity/source
LuboÅ¡ LuÅák
l.lunak at suse.cz
Mon Mar 18 09:16:39 PDT 2013
basic/source/sbx/sbxcurr.cxx | 8 +-
config_host/README | 9 ++
config_host/config_kde4.h.in | 3
connectivity/source/drivers/mork/MNSFolders.cxx | 2
connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx | 2
cppuhelper/source/shlib.cxx | 4 -
cppunit/UnpackedTarball_cppunit.mk | 1
cppunit/wundef.patch | 12 +++
filter/source/svg/svgexport.cxx | 2
i18npool/qa/cppunit/test_breakiterator.cxx | 6 -
icu/icu4c-warnings.patch | 11 +++
libwpg/StaticLibrary_wpg.mk | 2
mdds/UnpackedTarball_mdds.mk | 1
mdds/wundef.patch | 42 +++++++++++++
np_sdk/mozsrc/jri_md.h | 2
np_sdk/mozsrc/npupp.h | 4 +
oox/inc/oox/core/contexthandler.hxx | 2
oox/inc/oox/ole/olehelper.hxx | 4 -
oox/source/core/xmlfilterbase.cxx | 12 +--
oox/source/dump/pptxdumper.cxx | 2
oox/source/ole/axcontrol.cxx | 2
oox/source/ole/olehelper.cxx | 2
pyuno/source/loader/pyuno_loader.cxx | 2
sax/source/tools/fastserializer.cxx | 6 -
sax/source/tools/fastserializer.hxx | 4 -
sc/source/filter/excel/read.cxx | 2
sfx2/source/doc/sfxacldetect.cxx | 2
solenv/gbuild/platform/com_GCC_defs.mk | 2
svl/source/numbers/zforlist.cxx | 4 -
sw/source/core/layout/pagechg.cxx | 2
sw/source/core/unocore/unotext.cxx | 14 ----
sw/source/filter/ww8/ww8par.cxx | 4 -
sw/source/ui/inc/popup.hrc | 2
test/source/diff/diff.cxx | 2
toolkit/source/awt/scrollabledialog.cxx | 2
toolkit/source/awt/vclxtoolkit.cxx | 2
ucb/source/ucp/webdav-neon/NeonSession.cxx | 6 -
vcl/source/gdi/pdfwriter_impl2.cxx | 2
vcl/unx/kde4/KDEXLib.cxx | 24 ++++---
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 2
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 11 ---
writerfilter/source/dmapper/NumberingManager.cxx | 2
writerfilter/source/dmapper/ThemeTable.cxx | 2
xmloff/source/style/bordrhdl.cxx | 4 -
xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx | 2
xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx | 2
xmlsecurity/source/xmlsec/nss/secerror.cxx | 1
47 files changed, 152 insertions(+), 91 deletions(-)
New commits:
commit 30844869ccc3109a747f6ec8e94789af39688f6b
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 18 17:10:39 2013 +0100
update config HAVE_FOO instructions
Feature macros should now always be set (even if to 0), and should be
checked with #if, in order to avoid missing including the config_xxx.hxx header.
http://lists.freedesktop.org/archives/libreoffice/2013-March/047769.html
Change-Id: Id15f536240d032b3c523e33856cb40af78be65df
diff --git a/config_host/README b/config_host/README
index 349c4bc..dd6aa86 100644
--- a/config_host/README
+++ b/config_host/README
@@ -20,5 +20,10 @@ Adding a new setting:
- add AC_CONFIG_HEADERS([config_host/config_xxx.h]) next to the others
in configure.ac
- add config_hxx.h to config_host/.gitignore
-- add #undef HAVE_FOO to the config_host/config_hxx.h , possibly with a comment
-- add #include <config_xxx.h> before any #ifdef HAVE_XXX in a source file
+- add #undef HAVE_FOO to the config_host/config_hxx.h , possibly with a comment,
+ and add the following block right after it
+#ifndef HAVE_FOO
+#define HAVE_FOO 0
+#endif
+- add #include <config_xxx.h> before any #if HAVE_FOO in a source file
+- make sure you use #if HAVE_FOO, do not use #ifdef
commit 1af22c05c6b1bb2cee534146d9049da0c7e0f9bc
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 18 17:08:59 2013 +0100
fix other problems found by Wundef
Change-Id: Ib4aba95436f82d2a20b07a092f0fd07e0620fdcf
diff --git a/sfx2/source/doc/sfxacldetect.cxx b/sfx2/source/doc/sfxacldetect.cxx
index 2cfabed..c829c1d 100644
--- a/sfx2/source/doc/sfxacldetect.cxx
+++ b/sfx2/source/doc/sfxacldetect.cxx
@@ -18,7 +18,7 @@
*/
-
+#include "sfxacldetect.hxx"
#if EXTRA_ACL_CHECK
diff --git a/sw/source/ui/inc/popup.hrc b/sw/source/ui/inc/popup.hrc
index dc03238..b263d2e 100644
--- a/sw/source/ui/inc/popup.hrc
+++ b/sw/source/ui/inc/popup.hrc
@@ -39,7 +39,7 @@
#define MN_HEADERFOOTER_BUTTON (RC_POPUPS_BEGIN + 18)
#define MN_PAGEBREAK_BUTTON (RC_POPUPS_BEGIN + 19)
-#if MN_PAGEBREAK_POPUPMENU > RC_POPUPS_END
+#if MN_PAGEBREAK_BUTTON > RC_POPUPS_END
#error Resource-Id Ueberlauf in #file, #line
#endif
diff --git a/test/source/diff/diff.cxx b/test/source/diff/diff.cxx
index 8757104..361d6f3 100644
--- a/test/source/diff/diff.cxx
+++ b/test/source/diff/diff.cxx
@@ -354,7 +354,7 @@ bool XMLDiff::compareAttributes(xmlNodePtr node1, xmlNodePtr node2)
}
// unequal number of attributes
-#if CPPUNIT_ASSERT
+#ifdef CPPUNIT_ASSERT
CPPUNIT_ASSERT(!attr1);
CPPUNIT_ASSERT(!attr2);
#else
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 1f9853b..be4e05f 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -239,7 +239,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
break;
case NS_ooxml::LN_CT_TcPrBase_gridSpan: //number of grid positions spanned by this cell
{
-#if DEBUG_DOMAINMAPPER
+#ifdef DEBUG_DOMAINMAPPER
dmapper_logger->startElement("tablemanager.GridSpan");
dmapper_logger->attribute("gridSpan", nIntValue);
dmapper_logger->endElement();
diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx
index 4e70888..bd89130 100644
--- a/writerfilter/source/dmapper/ThemeTable.cxx
+++ b/writerfilter/source/dmapper/ThemeTable.cxx
@@ -22,7 +22,7 @@
#include <ooxml/resourceids.hxx>
#include "dmapperLoggers.hxx"
-#if DEBUG_DOMAINMAPPER
+#ifdef DEBUG_DOMAINMAPPER
#include <resourcemodel/QNameToString.hxx>
#endif
diff --git a/xmlsecurity/source/xmlsec/nss/secerror.cxx b/xmlsecurity/source/xmlsec/nss/secerror.cxx
index 5b82736..98aecbe 100644
--- a/xmlsecurity/source/xmlsec/nss/secerror.cxx
+++ b/xmlsecurity/source/xmlsec/nss/secerror.cxx
@@ -21,6 +21,7 @@
#include "secerr.h"
#include "sslerr.h"
#include "nspr.h"
+#include "nss.h"
#include "certt.h"
#include <sal/macros.h>
commit 2c17beb796a29e7d160522a800e647ddd7a8b2b3
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 18 17:07:50 2013 +0100
Wundef, fix various more or less broken debug code
Change-Id: I347495f7960da099afdfbf3db608e0347b832f99
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index 0408c37..d2ed0cf 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -95,7 +95,7 @@ namespace
}
m_aAccessDPath.push_back( aFileUrl );
} while( nIndex != -1 );
- #if OSL_G_LEVEL > 1
+ #if OSL_DEBUG_LEVEL > 1
out( "> cpld: acknowledged following access path(s): \"" );
::std::vector< OUString >::const_iterator iPos( m_aAccessDPath.begin() );
while (iPos != m_aAccessDPath.end())
@@ -111,7 +111,7 @@ namespace
else
{
// no access path env set
- #if OSL_G_LEVEL > 1
+ #if OSL_DEBUG_LEVEL > 1
out( "=> no CPLD_ACCESSPATH set.\n" );
#endif
}
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index 31aac1e..9966b856 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -28,7 +28,7 @@
#include <string.h>
-#if DEBUG
+#if OSL_DEBUG_LEVEL > 0
#include <iostream>
#endif
@@ -295,7 +295,7 @@ namespace sax_fastparser {
return maData;
}
-#if DEBUG
+#if OSL_DEBUG_LEVEL > 0
void FastSaxSerializer::ForMerge::print( )
{
std::cerr << "Data: ";
@@ -398,7 +398,7 @@ namespace sax_fastparser {
return ForMerge::getData();
}
-#if DEBUG
+#if OSL_DEBUG_LEVEL > 0
void FastSaxSerializer::ForSort::print( )
{
std::map< sal_Int32, Int8Sequence >::iterator iter = maData.begin();
diff --git a/sax/source/tools/fastserializer.hxx b/sax/source/tools/fastserializer.hxx
index 70bc153..4e9f871 100644
--- a/sax/source/tools/fastserializer.hxx
+++ b/sax/source/tools/fastserializer.hxx
@@ -163,7 +163,7 @@ private:
virtual void setCurrentElement( ::sal_Int32 /*nToken*/ ) {}
virtual Int8Sequence& getData();
-#if DEBUG
+#if OSL_DEBUG_LEVEL > 0
virtual void print();
#endif
@@ -194,7 +194,7 @@ private:
virtual Int8Sequence& getData();
-#if DEBUG
+#if OSL_DEBUG_LEVEL > 0
virtual void print();
#endif
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index 8b95ee6..7915bc9 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -178,7 +178,7 @@ void SwBodyFrm::Format( const SwBorderAttrs * )
void SwBodyFrm::Paint( const SwRect& rRect, const SwPrintData* ) const
{
-#if OSL_DEBUG_LAYOUT > 1
+#if OSL_DEBUG_LEVEL > 1
// Paint a red border around the SwBodyFrm in debug mode
ViewShell *pSh = GetShell();
OutputDevice* pOut = pSh->GetOut();
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index f2e0bd0..0aafea9 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -2286,18 +2286,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
}
catch (const uno::Exception& e)
{
-#if DEBUG
- std::clog << "Exception when setting property: ";
- std::clog << rtl::OUStringToOString(
- pTableProperties[nProperty].Name, RTL_TEXTENCODING_UTF8)
- .getStr();
- std::clog << ". Message: ";
- std::clog << rtl::OUStringToOString( e.Message,
- RTL_TEXTENCODING_UTF8 ).getStr();
- std::clog << std::endl;
-#else
- (void)e;
-#endif
+ SAL_WARN( "sw.uno", "Exception when setting property: "
+ + pTableProperties[nProperty].Name + ". Message: " + e.Message );
}
}
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 39144e9..45aeba0 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4244,7 +4244,7 @@ void SwWW8ImplReader::ReadDocInfo()
if (!aSttb.Read( *pTableStream ) )
OSL_TRACE("** Read of SttbAssoc data failed!!!! ");
pTableStream->Seek( nCur ); // return to previous position, is that necessary?
-#if DEBUG
+#if OSL_DEBUG_LEVEL > 1
aSttb.Print( stderr );
#endif
String sPath = aSttb.getStringAtIndex( 0x1 );
@@ -4324,7 +4324,7 @@ bool WW8Customizations::Import( SwDocShell* pShell )
SAL_WARN("sw.ww8", "** Read of Customization data failed!!!! ");
return false;
}
-#if DEBUG
+#if OSL_DEBUG_LEVEL > 1
aTCG.Print( stderr );
#endif
return aTCG.ImportCustomToolBar( *pShell );
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 423019c..62e91e6b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -62,11 +62,6 @@
#endif
#include <ooxml/OOXMLFastTokens.hxx>
-#if DEBUG
-#include <stdio.h>
-#include <com/sun/star/style/TabStop.hpp>
-#endif
-
#include <map>
#include <comphelper/configurationhelper.hxx>
@@ -3596,11 +3591,7 @@ bool DomainMapper_Impl::ExecuteFrameConversion()
}
catch( const uno::Exception& rEx)
{
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "Exception caught when converting to frame: %s\n",
- OUStringToOString( rEx.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
- (void)rEx;
+ SAL_WARN( "writerfilter", "Exception caught when converting to frame: " + rEx.Message );
bRet = false;
}
m_xFrameStartRange = 0;
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index cb76320..2a61ec1 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -565,7 +565,7 @@ void ListDef::CreateNumberingRules( DomainMapper& rDMapper,
// Get the merged level properties
uno::Sequence< beans::PropertyValue > aLvlProps = aProps[sal_Int32( nLevel )];
-#if DEBUG
+#if OSL_DEBUG_LEVEL > 1
lcl_printProperties( aLvlProps );
#endif
diff --git a/xmloff/source/style/bordrhdl.cxx b/xmloff/source/style/bordrhdl.cxx
index ed62843..9da972d 100644
--- a/xmloff/source/style/bordrhdl.cxx
+++ b/xmloff/source/style/bordrhdl.cxx
@@ -26,10 +26,6 @@
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/table/BorderLine2.hpp>
-#if DEBUG
-#include <cstdio>
-#endif
-
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
commit e03d9e97a65a7323657f1a04cfba03afc24670b1
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 18 17:06:39 2013 +0100
avoid Wundef in netscape plugins headers
Change-Id: I23f65de88a3c33f0820ce16d8b7836739fb83ce9
diff --git a/np_sdk/mozsrc/jri_md.h b/np_sdk/mozsrc/jri_md.h
index e5df4db..ab631d1 100644
--- a/np_sdk/mozsrc/jri_md.h
+++ b/np_sdk/mozsrc/jri_md.h
@@ -119,7 +119,7 @@ extern "C" {
# endif
/* Mac */
-#elif defined (macintosh) || Macintosh || THINK_C
+#elif defined (macintosh) || defined(Macintosh) || defined(THINK_C)
# if defined(__MWERKS__) /* Metrowerks */
# if !__option(enumsalwaysint)
# error You need to define 'Enums Always Int' for your project.
diff --git a/np_sdk/mozsrc/npupp.h b/np_sdk/mozsrc/npupp.h
index 320aa74..e0812ec 100644
--- a/np_sdk/mozsrc/npupp.h
+++ b/np_sdk/mozsrc/npupp.h
@@ -66,6 +66,10 @@
/* NPP_Initialize */
+#ifndef TARGET_RT_MAC_CFM
+#define TARGET_RT_MAC_CFM 0
+#endif
+
#define _NPUPP_USE_UPP_ (TARGET_RT_MAC_CFM && !TARGET_API_MAC_CARBON)
#if _NPUPP_USE_UPP_
commit 9be25f14bdd801106efcfae34c8f1492cddfa714
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 18 17:05:51 2013 +0100
avoid Wundef for various FIXME, FEATURE_NOT_DONE_YET and what not
Change-Id: I8e409ba63d32dca9a1c7f09d143165d1d702d642
diff --git a/basic/source/sbx/sbxcurr.cxx b/basic/source/sbx/sbxcurr.cxx
index 4df61fc..7b4bde2 100644
--- a/basic/source/sbx/sbxcurr.cxx
+++ b/basic/source/sbx/sbxcurr.cxx
@@ -32,7 +32,7 @@ static rtl::OUString ImpCurrencyToString( const sal_Int64 &rVal )
sal_Int64 absVal = isNeg ? -rVal : rVal;
sal_Unicode cDecimalSep = '.';
-#if MAYBEFUTURE
+#ifdef MAYBEFUTURE
sal_Unicode cThousandSep = ',';
ImpGetIntntlSep( cDecimalSep, cThousandSep );
#endif
@@ -51,7 +51,7 @@ static rtl::OUString ImpCurrencyToString( const sal_Int64 &rVal )
if ( !bLessThanOne )
{
nCapacity = initialLen + 1;
-#if MAYBEFUTURE
+#ifdef MAYBEFUTURE
if ( initialLen > 5 )
{
sal_Int32 nThouSeperators = ( initialLen - 5 ) / 3;
@@ -74,7 +74,7 @@ static rtl::OUString ImpCurrencyToString( const sal_Int64 &rVal )
{
if ( nDigitCount == 4 )
aBuf[nInsertIndex--] = cDecimalSep;
-#if MAYBEFUTURE
+#ifdef MAYBEFUTURE
if ( nDigitCount > 4 && ! ( ( nDigitCount - 4 ) % 3) )
aBuf[nInsertIndex--] = cThousandSep;
#endif
@@ -110,7 +110,7 @@ static sal_Int64 ImpStringToCurrency( const rtl::OUString &rStr )
sal_Unicode cDeciPnt = sal_Unicode('.');
sal_Unicode c1000Sep = sal_Unicode(',');
-#if MAYBEFUTURE
+#ifdef MAYBEFUTURE
sal_Unicode cLocaleDeciPnt, cLocale1000Sep;
ImpGetIntntlSep( cLocaleDeciPnt, cLocale1000Sep );
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 5017d99..81a4435 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -1830,7 +1830,7 @@ sal_Bool SVGFilter::implCreateObjects()
if( xDrawPage.is() )
{
-#if ENABLE_EXPORT_CUSTOM_SLIDE_BACKGROUND
+#ifdef ENABLE_EXPORT_CUSTOM_SLIDE_BACKGROUND
// TODO complete the implementation for exporting custom background for each slide
// implementation status:
// - hatch stroke color is set to 'none' so the hatch is not visible, why ?
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index 5730d0d..665747b 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -57,7 +57,7 @@ public:
void testWeak();
void testAsian();
void testThai();
-#if TODO
+#ifdef TODO
void testNorthernThai();
#endif
void testKhmer();
@@ -69,7 +69,7 @@ public:
CPPUNIT_TEST(testWeak);
CPPUNIT_TEST(testAsian);
CPPUNIT_TEST(testThai);
-#if TODO
+#ifdef TODO
CPPUNIT_TEST(testNorthernThai);
#endif
@@ -851,7 +851,7 @@ void TestBreakIterator::testThai()
}
}
-#if TODO
+#ifdef TODO
void TestBreakIterator::testNorthernThai()
{
lang::Locale aLocale;
diff --git a/oox/inc/oox/ole/olehelper.hxx b/oox/inc/oox/ole/olehelper.hxx
index 8825baf..68d3133 100644
--- a/oox/inc/oox/ole/olehelper.hxx
+++ b/oox/inc/oox/ole/olehelper.hxx
@@ -151,7 +151,7 @@ private:
// implementation into the sd module itself.
class OOX_DLLPUBLIC MSConvertOCXControls : public SvxMSConvertOCXControls
{
-#if SvxMSConvertOCXControlsRemoved
+#ifdef SvxMSConvertOCXControlsRemoved
com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > mxShapes;
com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > mxDrawPage;
com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer > mxFormComps;
@@ -176,7 +176,7 @@ public:
sal_Int32 nPos, sal_Int32 nSize );
static sal_Bool WriteOCXStream( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel, SotStorageRef &rSrc1, const com::sun::star::uno::Reference< com::sun::star::awt::XControlModel > &rControlModel, const com::sun::star::awt::Size& rSize,rtl::OUString &rName);
-#if SvxMSConvertOCXControlsRemoved
+#ifdef SvxMSConvertOCXControlsRemoved
const com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > & GetShapes();
const com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer > & GetFormComps();
virtual const com::sun::star::uno::Reference<
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 13515b6..2289e4d 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -540,7 +540,7 @@ writeCoreProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xPro
FSNS( XML_xmlns, XML_xsi ), "http://www.w3.org/2001/XMLSchema-instance",
FSEND );
-#if OOXTODO
+#ifdef OOXTODO
writeElement( pCoreProps, FSNS( XML_cp, XML_category ), "category" );
writeElement( pCoreProps, FSNS( XML_cp, XML_contentStatus ), "status" );
writeElement( pCoreProps, FSNS( XML_cp, XML_contentType ), "contentType" );
@@ -548,7 +548,7 @@ writeCoreProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xPro
writeElement( pCoreProps, FSNS( XML_dcterms, XML_created ), xProperties->getCreationDate() );
writeElement( pCoreProps, FSNS( XML_dc, XML_creator ), xProperties->getAuthor() );
writeElement( pCoreProps, FSNS( XML_dc, XML_description ), xProperties->getDescription() );
-#if OOXTODO
+#ifdef OOXTODO
writeElement( pCoreProps, FSNS( XML_dc, XML_identifier ), "ident" );
#endif /* def OOXTODO */
writeElement( pCoreProps, FSNS( XML_cp, XML_keywords ), xProperties->getKeywords() );
@@ -559,7 +559,7 @@ writeCoreProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xPro
writeElement( pCoreProps, FSNS( XML_cp, XML_revision ), xProperties->getEditingCycles() );
writeElement( pCoreProps, FSNS( XML_dc, XML_subject ), xProperties->getSubject() );
writeElement( pCoreProps, FSNS( XML_dc, XML_title ), xProperties->getTitle() );
-#if OOXTODO
+#ifdef OOXTODO
writeElement( pCoreProps, FSNS( XML_cp, XML_version ), "version" );
#endif /* def OOXTODO */
@@ -581,7 +581,7 @@ writeAppProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xProp
FSEND );
writeElement( pAppProps, XML_Template, xProperties->getTemplateName() );
-#if OOXTODO
+#ifdef OOXTODO
writeElement( pAppProps, XML_Manager, "manager" );
writeElement( pAppProps, XML_Company, "company" );
writeElement( pAppProps, XML_Pages, "pages" );
@@ -594,7 +594,7 @@ writeAppProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xProp
writeElement( pAppProps, XML_Notes, "notes" );
#endif /* def OOXTODO */
writeElement( pAppProps, XML_TotalTime, xProperties->getEditingDuration() );
-#if OOXTODO
+#ifdef OOXTODO
writeElement( pAppProps, XML_HiddenSlides, "hidden slides" );
writeElement( pAppProps, XML_MMClips, "mm clips" );
writeElement( pAppProps, XML_ScaleCrop, "scale crop" );
@@ -609,7 +609,7 @@ writeAppProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xProp
writeElement( pAppProps, XML_DigSig, "digital signature" );
#endif /* def OOXTODO */
writeElement( pAppProps, XML_Application, xProperties->getGenerator() );
-#if OOXTODO
+#ifdef OOXTODO
writeElement( pAppProps, XML_AppVersion, "app version" );
writeElement( pAppProps, XML_DocSecurity, "doc security" );
#endif /* def OOXTODO */
diff --git a/oox/source/dump/pptxdumper.cxx b/oox/source/dump/pptxdumper.cxx
index f406fcf..1e372a6 100644
--- a/oox/source/dump/pptxdumper.cxx
+++ b/oox/source/dump/pptxdumper.cxx
@@ -53,7 +53,7 @@ void RootStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm,
{
Dumper( getContext(), rxStrm, rSysFileName ).dump();
}
-#if FIXME
+#ifdef FIXME
else if(
aExt.equalsIgnoreAsciiCaseAscii("xlsb") ||
aExt.equalsIgnoreAsciiCaseAscii("xlsm") ||
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 648b10d..813b78b 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -2379,7 +2379,7 @@ void AxFrameModel::convertProperties( PropertyMap& rPropMap, const ControlConver
{
rPropMap.setProperty( PROP_Label, maCaption );
rPropMap.setProperty( PROP_Enabled, getFlag( mnFlags, AX_CONTAINER_ENABLED ) );
-#if SCROLLABLEFRAME
+#ifdef SCROLLABLEFRAME
rConv.convertScrollabilitySettings( rPropMap, maScrollPos, maLogicalSize, mnScrollBars );
#endif
AxContainerModelBase::convertProperties( rPropMap, rConv );
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index 8e67c6d..6ab01af 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -604,7 +604,7 @@ sal_Bool MSConvertOCXControls::WriteOCXStream( const Reference< XModel >& rxMode
return sal_True;
}
-#if SvxMSConvertOCXControlsRemoved
+#ifdef SvxMSConvertOCXControlsRemoved
const Reference< com::sun::star::lang::XMultiServiceFactory > & MSConvertOCXControls::GetServiceFactory()
{
if ( !mxServiceFactory.is() && mxModel.is() )
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index 694b9dd..8ffa935 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -769,7 +769,7 @@ FltError ImportExcel::Read( void )
FltError ImportExcel8::Read( void )
{
-#if EXC_INCL_DUMPER
+#ifdef EXC_INCL_DUMPER
{
Biff8RecDumper aDumper( GetRoot(), sal_True );
if( aDumper.Dump( aIn ) )
diff --git a/toolkit/source/awt/scrollabledialog.cxx b/toolkit/source/awt/scrollabledialog.cxx
index 968ec9f..91edeff 100644
--- a/toolkit/source/awt/scrollabledialog.cxx
+++ b/toolkit/source/awt/scrollabledialog.cxx
@@ -176,7 +176,7 @@ void ScrollableWrapper<T>::ResetScrollBars()
}
template class ScrollableWrapper< Dialog >;
-#if SCROLLABLEFRAME
+#ifdef SCROLLABLEFRAME
template class ScrollableWrapper< GroupBox >;
#endif
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index eaba013..cb6668d 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -692,7 +692,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
break;
case WINDOW_GROUPBOX:
{
-#if SCROLLABLEFRAME
+#ifdef SCROLLABLEFRAME
if ( bFrameControl )
{
pNewWindow = new toolkit::ScrollableWrapper< GroupBox >( pParent, nWinBits | WB_VSCROLL );
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 469f492..03401a3 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -529,7 +529,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
if( pGradAction )
{
- #if USE_PDFGRADIENTS
+ #ifdef USE_PDFGRADIENTS
m_rOuterFace.DrawGradient( pGradAction->GetPolyPolygon(), pGradAction->GetGradient() );
#else
implWriteGradient( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), pDummyVDev, i_rContext );
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
index 52c6a0d..30b6628 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
@@ -124,7 +124,7 @@ void ElementDescriptor::readFrameModel( StyleBag * all_styles )
title->addAttribute( XMLNS_DIALOGS_PREFIX ":value", aTitle );
addSubElement( title );
}
-#if SCROLLABLEFRAME
+#ifdef SCROLLABLEFRAME
readScrollableSettings();
#endif
uno::Reference< container::XNameContainer > xControlContainer( _xProps, uno::UNO_QUERY );
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index 93649f5..eccf7ea 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -97,7 +97,7 @@ void Frame::endElement()
{
xControlModel->setPropertyValue( "Label" , makeAny( _label ) );
}
-#if SCROLLABLEFRAME
+#ifdef SCROLLABLEFRAME
ctx.importScollableSettings( _xAttributes );
#endif
ctx.importEvents( _events );
commit a09124e6f585a128b4f130804f4a1f1ee8a31c93
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 18 17:03:23 2013 +0100
avoid Wundef in cases where the usage seems otherwise ok
Change-Id: Iabccc31c59cec32235661f5225f45bb13f76a68f
diff --git a/connectivity/source/drivers/mork/MNSFolders.cxx b/connectivity/source/drivers/mork/MNSFolders.cxx
index ccebd62..561b1ce 100644
--- a/connectivity/source/drivers/mork/MNSFolders.cxx
+++ b/connectivity/source/drivers/mork/MNSFolders.cxx
@@ -69,7 +69,7 @@ namespace
{ "Mozilla/SeaMonkey/", NULL, NULL, NULL },
{ "Mozilla/Firefox/", NULL, NULL, NULL },
{ "Thunderbird/", "Mozilla/Thunderbird/", NULL, NULL }
- #elif(MACOSX)
+ #elif defined(MACOSX)
{ "../Mozilla/SeaMonkey/", NULL, NULL, NULL },
{ "Firefox/", NULL, NULL, NULL },
{ "../Thunderbird/", NULL, NULL, NULL }
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
index ccebd62..561b1ce 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx
@@ -69,7 +69,7 @@ namespace
{ "Mozilla/SeaMonkey/", NULL, NULL, NULL },
{ "Mozilla/Firefox/", NULL, NULL, NULL },
{ "Thunderbird/", "Mozilla/Thunderbird/", NULL, NULL }
- #elif(MACOSX)
+ #elif defined(MACOSX)
{ "../Mozilla/SeaMonkey/", NULL, NULL, NULL },
{ "Firefox/", NULL, NULL, NULL },
{ "../Thunderbird/", NULL, NULL, NULL }
diff --git a/oox/inc/oox/core/contexthandler.hxx b/oox/inc/oox/core/contexthandler.hxx
index f9f6bb8..c6b3f06 100644
--- a/oox/inc/oox/core/contexthandler.hxx
+++ b/oox/inc/oox/core/contexthandler.hxx
@@ -96,7 +96,7 @@ protected:
void implSetLocator( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator >& rxLocator );
-#if _MSC_VER
+#ifdef _MSC_VER
ContextHandler() {} // workaround
#endif
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index 329a1c7..3905360 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -200,7 +200,7 @@ Reference< XInterface > CreateInstance( const Reference< XComponentContext > & c
if( !pythonPath.isEmpty() )
prependPythonPath( pythonPath );
-#if WNT
+#ifdef WNT
//extend PATH under windows to include the branddir/program so ssl libs will be found
//for use by terminal mailmerge dependency _ssl.pyd
rtl::OUString sEnvName(RTL_CONSTASCII_USTRINGPARAM("PATH"));
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 76f853c..603e1a0 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -4477,9 +4477,9 @@ sal_Char NfCurrencyEntry::GetEuroSymbol( rtl_TextEncoding eTextEncoding )
case RTL_TEXTENCODING_APPLE_ROMAN : // MAC
return '\xDB';
default: // default system
-#if WNT
+#if defined(WNT)
return '\x80';
-#elif UNX
+#elif defined(UNX)
// return '\xA4'; // #56121# 0xA4 would be correct for iso-8859-15
return '\x80'; // but Windows code for the converted TrueType fonts
#else
commit 6104b4306dafa5315cf4a987b3b2f89f64de79f0
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 18 16:59:17 2013 +0100
no warnings in libwpg (there's at least Wundef)
Change-Id: Ib3e6dd7ec9279c306444a747989843e3b9f56c01
diff --git a/libwpg/StaticLibrary_wpg.mk b/libwpg/StaticLibrary_wpg.mk
index faaa5a3..3cb79fe 100644
--- a/libwpg/StaticLibrary_wpg.mk
+++ b/libwpg/StaticLibrary_wpg.mk
@@ -19,6 +19,8 @@ $(eval $(call gb_StaticLibrary_use_externals,wpglib,\
$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,wpglib,cpp))
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,wpglib))
+
$(eval $(call gb_StaticLibrary_add_generated_exception_objects,wpglib,\
UnpackedTarball/wpg/src/lib/WPG1Parser \
UnpackedTarball/wpg/src/lib/WPG2Parser \
commit 7fddc27bd311d668904e5fc4e132331a28a74ad5
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 18 16:58:23 2013 +0100
incorrect NEON_VERSION usage
First of all, NEON_VERSION is undefined, and second, it's actually
a text string, so this is all broken.
Change-Id: Iba841c78e9034bf9ef74eb4f31c9893608180b77
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index 81bb6ab..cad3157 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -38,14 +38,10 @@
#include <ne_redirect.h>
#include <ne_ssl.h>
-#if NEON_VERSION < 0x0260
// old neon versions forgot to set this
extern "C" {
-#endif
#include <ne_compress.h>
-#if NEON_VERSION < 0x0260
}
-#endif
#include "libxml/parser.h"
#include "rtl/ustrbuf.hxx"
@@ -838,7 +834,7 @@ void NeonSession::Init()
ne_redirect_register( m_pHttpSession );
// authentication callbacks.
-#if NEON_VERSION >= 0x0260
+#if 1
ne_add_server_auth( m_pHttpSession, NE_AUTH_ALL, NeonSession_NeonAuth, this );
ne_add_proxy_auth ( m_pHttpSession, NE_AUTH_ALL, NeonSession_NeonAuth, this );
#else
commit 7544a11670208ef38af7bf6b0104dedd4d19d545
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 18 16:57:51 2013 +0100
Wundef for icu
Change-Id: I064b82e691fb5d58da6252f394f13894f252776d
diff --git a/icu/icu4c-warnings.patch b/icu/icu4c-warnings.patch
index 72566bc..1407f3b 100644
--- a/icu/icu4c-warnings.patch
+++ b/icu/icu4c-warnings.patch
@@ -8,3 +8,14 @@
} \
}
+--- misc/icu/source/common/unicode/utypes.h
++++ misc/build/icu/source/common/unicode/utypes.h
+@@ -399,7 +399,7 @@ typedef double UDate;
+ * some Linux/Unix compilers have problems with defining global new/delete.
+ * On Windows, it is _MSC_VER>=1200 for MSVC 6.0 and higher.
+ */
+-#if defined(__cplusplus) && U_DEBUG && U_OVERRIDE_CXX_ALLOCATION && (_MSC_VER>=1200) && !defined(U_STATIC_IMPLEMENTATION) && (defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION))
++#if defined(__cplusplus) && U_DEBUG && U_OVERRIDE_CXX_ALLOCATION && defined (_MSC_VER) && (_MSC_VER>=1200) && !defined(U_STATIC_IMPLEMENTATION) && (defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION))
+
+ #ifndef U_HIDE_INTERNAL_API
+ /**
commit 8c2711e771bebf1e33f185ff98e4eaed7eb7f95b
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 18 16:57:22 2013 +0100
change #ifdef -> #if for KDE4 feature macros
Change-Id: I289744eaa62ad819620f0b31a54efd5ebbdb9dc2
diff --git a/config_host/config_kde4.h.in b/config_host/config_kde4.h.in
index 6e5cddf..654d235 100644
--- a/config_host/config_kde4.h.in
+++ b/config_host/config_kde4.h.in
@@ -6,5 +6,8 @@ Settings for KDE4 integration.
#define CONFIG_KDE4_H
#undef KDE_HAVE_GLIB
+#ifndef KDE_HAVE_GLIB
+#define KDE_HAVE_GLIB 0
+#endif
#endif
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 86495eb..ee5735b 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -47,14 +47,18 @@
#include <config_kde4.h>
#if QT_VERSION >= QT_VERSION_CHECK( 4, 9, 0 )
-#define QT_UNIX_EVENT_LOOP_SUPPORT
+#define QT_UNIX_EVENT_LOOP_SUPPORT 1
+#else
+#define QT_UNIX_EVENT_LOOP_SUPPORT 0
#endif
-#ifdef KDE_HAVE_GLIB
-#define GLIB_EVENT_LOOP_SUPPORT
+#if KDE_HAVE_GLIB
+#define GLIB_EVENT_LOOP_SUPPORT 1
+#else
+#define GLIB_EVENT_LOOP_SUPPORT 0
#endif
-#ifdef GLIB_EVENT_LOOP_SUPPORT
+#if GLIB_EVENT_LOOP_SUPPORT
#include <glib-2.0/glib.h>
#endif
@@ -176,11 +180,11 @@ void KDEXLib::Init()
// needs to be unlocked shortly before entering the main sleep (e.g. select()) and locked
// immediatelly after. So we need to know which event loop implementation is used and
// hook accordingly.
-#ifdef GLIB_EVENT_LOOP_SUPPORT
+#if GLIB_EVENT_LOOP_SUPPORT
static GPollFunc old_gpoll = NULL;
static gint gpoll_wrapper( GPollFD*, guint, gint );
#endif
-#ifdef QT_UNIX_EVENT_LOOP_SUPPORT
+#if QT_UNIX_EVENT_LOOP_SUPPORT
static int (*qt_select)(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
const struct timeval *orig_timeout);
static int lo_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
@@ -200,7 +204,7 @@ static bool qt_event_filter( void* m )
void KDEXLib::setupEventLoop()
{
old_qt_event_filter = QAbstractEventDispatcher::instance()->setEventFilter( qt_event_filter );
-#ifdef GLIB_EVENT_LOOP_SUPPORT
+#if GLIB_EVENT_LOOP_SUPPORT
// Glib is simple, it has g_main_context_set_poll_func() for wrapping the sleep call.
// The catch is that Qt has a bug that allows triggering timers even when they should
// not be, leading to crashes caused by QClipboard re-entering the event loop.
@@ -219,7 +223,7 @@ void KDEXLib::setupEventLoop()
}
#endif
#endif
-#ifdef QT_UNIX_EVENT_LOOP_SUPPORT
+#if QT_UNIX_EVENT_LOOP_SUPPORT
// When Qt does not use Glib support, it uses its own Unix event dispatcher.
// That one has aboutToBlock() and awake() signals, but they are broken (either
// functionality or semantics), as e.g. awake() is not emitted right after the dispatcher
@@ -239,7 +243,7 @@ void KDEXLib::setupEventLoop()
#endif
}
-#ifdef GLIB_EVENT_LOOP_SUPPORT
+#if GLIB_EVENT_LOOP_SUPPORT
gint gpoll_wrapper( GPollFD* ufds, guint nfds, gint timeout )
{
SalYieldMutexReleaser release; // release YieldMutex (and re-acquire at block end)
@@ -247,7 +251,7 @@ gint gpoll_wrapper( GPollFD* ufds, guint nfds, gint timeout )
}
#endif
-#ifdef QT_UNIX_EVENT_LOOP_SUPPORT
+#if QT_UNIX_EVENT_LOOP_SUPPORT
int lo_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
const struct timeval *orig_timeout)
{
commit 58d8ad3678d988c86f94a8de3a6c5800336b5800
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 18 16:53:23 2013 +0100
fix Wundef in mdds
Change-Id: I5abf3c7c71b3d0d26194dd89067b1b0a2cea4fde
diff --git a/mdds/UnpackedTarball_mdds.mk b/mdds/UnpackedTarball_mdds.mk
index 702086d..0f1de08 100644
--- a/mdds/UnpackedTarball_mdds.mk
+++ b/mdds/UnpackedTarball_mdds.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,mdds,\
mdds/mdds_0.6.0.patch \
mdds/0001-Workaround-for-gcc-bug.patch \
mdds/mdds_0.7.0_unreachable_warning.patch.1 \
+ mdds/wundef.patch \
))
$(eval $(call gb_UnpackedTarball_mark_output_files,mdds,\
diff --git a/mdds/wundef.patch b/mdds/wundef.patch
new file mode 100644
index 0000000..628f3dd
--- /dev/null
+++ b/mdds/wundef.patch
@@ -0,0 +1,42 @@
+--- misc/mdds_0.6.0/include/mdds/segment_tree.hpp
++++ misc/build/mdds_0.6.0/include/mdds/segment_tree.hpp
+@@ -285,7 +285,7 @@ public:
+ }
+ };
+
+-#if UNIT_TEST
++#ifdef UNIT_TEST
+ struct node_printer : public ::std::unary_function<const node*, void>
+ {
+ void operator() (const node* p) const
+--- misc/mdds_0.6.0/include/mdds/multi_type_vector_def.inl
++++ misc/build/mdds_0.6.0/include/mdds/multi_type_vector_def.inl
+@@ -29,7 +29,7 @@
+
+ #include <stdexcept>
+
+-#if UNIT_TEST
++#ifdef UNIT_TEST
+ #include <iostream>
+ using std::cout;
+ using std::endl;
+--- misc/mdds_0.6.0/include/mdds/mixed_type_matrix_flag_storage.hpp
++++ misc/build/mdds_0.6.0/include/mdds/mixed_type_matrix_flag_storage.hpp
+@@ -25,7 +25,7 @@
+ *
+ ************************************************************************/
+
+-#if UNIT_TEST
++#ifdef UNIT_TEST
+ #include <iostream>
+ #endif
+
+@@ -74,7 +74,7 @@ public:
+ // Flag is stored at this position. Remove it.
+ m_flags.erase(itr);
+ }
+-#if UNIT_TEST
++#ifdef UNIT_TEST
+ void dump() const
+ {
+ using namespace std;
commit 92a3408646c5932a29e1a658f50283891c1de2b6
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 18 16:52:55 2013 +0100
fix Wundef in cppunit
Change-Id: Ide5f9d36cf7e5e8cd3442a1b5f098a85cb8d6de0
diff --git a/cppunit/UnpackedTarball_cppunit.mk b/cppunit/UnpackedTarball_cppunit.mk
index c8cb69e..733a302 100644
--- a/cppunit/UnpackedTarball_cppunit.mk
+++ b/cppunit/UnpackedTarball_cppunit.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,cppunit,$(CPPUNIT_TARBALL)))
$(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
cppunit/windows.patch \
cppunit/unix.patch \
+ cppunit/wundef.patch \
))
ifeq ($(OS),ANDROID)
$(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
diff --git a/cppunit/wundef.patch b/cppunit/wundef.patch
new file mode 100644
index 0000000..5f701cd
--- /dev/null
+++ b/cppunit/wundef.patch
@@ -0,0 +1,12 @@
+--- misc/cppunit-1.13.1/include/cppunit/Portability.h 2012-09-24 19:10:36.000000000 +0200
++++ misc/build/cppunit-1.13.1/include/cppunit/Portability.h 2013-03-18 14:23:48.880718714 +0100
+@@ -68,6 +68,9 @@
+ * std::allocator. On some compilers, you may need to change this to
+ * std::allocator<T>.
+ */
++#ifndef CPPUNIT_STD_NEED_ALLOCATOR /* avoid -Wundef warning */
++#define CPPUNIT_STD_NEED_ALLOCATOR 0
++#endif
+ #if CPPUNIT_STD_NEED_ALLOCATOR
+ # if !defined(CPPUNIT_STD_ALLOCATOR)
+ # define CPPUNIT_STD_ALLOCATOR std::allocator
commit 22771babcc47b294d528d56cec360e2a94daec26
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Mon Mar 18 16:51:18 2013 +0100
add -Wundef to compiler flags
http://lists.freedesktop.org/archives/libreoffice/2013-March/047769.html
Change-Id: I61ab4b6b536e77d153f44b9f8569b49e0be60002
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index a691e27..d20b9f7 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -66,6 +66,7 @@ gb_CFLAGS_COMMON := \
-Wall \
-Wendif-labels \
-Wextra \
+ -Wundef \
-fmessage-length=0 \
-fno-common \
-pipe \
@@ -74,6 +75,7 @@ gb_CXXFLAGS_COMMON := \
-Wall \
-Wendif-labels \
-Wextra \
+ -Wundef \
-fmessage-length=0 \
-fno-common \
-pipe \
More information about the Libreoffice-commits
mailing list