Kaydet (Commit) 47b17ca7 authored tarafından Lubos Lunak's avatar Lubos Lunak

ignore #include inside #if

üst 32bd430f
......@@ -45,7 +45,6 @@
#include <cppuhelper/propshlp.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <i18npool/mslangid.hxx>
#include <iostream>
#include <iterator>
#include <osl/diagnose.h>
#include <osl/nlsupport.h>
......
......@@ -196,6 +196,7 @@
#include <com/sun/star/form/binding/XListEntrySink.hpp>
#include <com/sun/star/form/binding/XListEntrySource.hpp>
#include <com/sun/star/form/binding/XValueBinding.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XFramesSupplier.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/graphic/GraphicObject.hpp>
......@@ -295,7 +296,6 @@
#include <com/sun/star/xml/sax/XLocator.hpp>
#include <comphelper/configurationhelper.hxx>
#include <comphelper/docpasswordhelper.hxx>
#include <comphelper/genericpropertyset.hxx>
#include <comphelper/mediadescriptor.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/seqstream.hxx>
......@@ -360,7 +360,6 @@
#include <vcl/cvtgrf.hxx>
#include <vcl/graph.hxx>
#include <vcl/outdev.hxx>
#include <vcl/unohelp.hxx>
#include <vector>
#include <xmlscript/xmldlg_imexp.hxx>
......
......@@ -184,6 +184,7 @@
#include <com/sun/star/form/FormButtonType.hpp>
#include <com/sun/star/form/XFormsSupplier.hpp>
#include <com/sun/star/form/XFormsSupplier2.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XController.hpp>
......@@ -530,6 +531,7 @@
#include <mdds/multi_type_vector_types.hpp>
#include <memory>
#include <numeric>
#include <officecfg/Office/Calc.hxx>
#include <officecfg/Office/Common.hxx>
#include <osl/diagnose.h>
#include <osl/file.hxx>
......@@ -673,7 +675,6 @@
#include <svx/compressgraphicdialog.hxx>
#include <svx/dataaccessdescriptor.hxx>
#include <svx/dbaexchange.hxx>
#include <svx/dbcharsethelper.hxx>
#include <svx/dialmgr.hxx>
#include <svx/drawitem.hxx>
#include <svx/extedit.hxx>
......
......@@ -7,7 +7,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "svtools/colrdlg.hxx"
#include "avmedia/mediawindow.hxx"
#include "canvas/elapsedtime.hxx"
#include "com/sun/star/office/XAnnotationEnumeration.hpp"
......@@ -24,6 +23,7 @@
#include "sal/log.hxx"
#include "sal/types.h"
#include "sfx2/viewfrm.hxx"
#include "svtools/colrdlg.hxx"
#include "svtools/slidesorterbaropt.hxx"
#include "svtools/svlbitm.hxx"
#include "svtools/toolpanelopt.hxx"
......@@ -187,6 +187,7 @@
#include <com/sun/star/embed/XVisualObject.hpp>
#include <com/sun/star/form/FormButtonType.hpp>
#include <com/sun/star/frame/AutoRecovery.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
#include <com/sun/star/frame/DocumentTemplates.hpp>
#include <com/sun/star/frame/FrameAction.hpp>
......@@ -196,7 +197,6 @@
#include <com/sun/star/frame/UnknownModuleException.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XDocumentTemplates.hpp>
......
......@@ -48,7 +48,32 @@ for x in $headers; do
elif ! test -f "$root/$file".cxx ; then
echo No file $file in $module/$makefile >&2
else
cat "$root/$file".cxx | grep -e '^\s*#include' | sed 's/\(#include [<"][^>"]*[>"]\).*/\1/' | sed 's#\.\./##g#' >>$tmpfile
function list_file_includes()
(
ifdepth=0
# filter out only preprocessor lines, get the first and second "words" after the #,
# also replace " with @ (would cause trouble when doing echo of the line)
cat "$1" | grep '^\s*#' | sed 's/^\s*#/#/' | sed 's/^\(#\w*\s+\w*\)\s+.*/\1/' | sed 's/"/@/g' | \
while read line; do
# skip everything surrounded by any #if
if echo "$line" | grep -q "#if" ; then
ifdepth=$((ifdepth + 1))
lastif="$line"
elif echo "$line" | grep -q "#endif" ; then
ifdepth=$((ifdepth - 1))
lastif="#if"
elif echo "$line" | grep -q "#include"; then
if test $ifdepth -eq 0; then
echo $line | sed 's/@/"/g'
else
echo "#include in $lastif : $line" | sed 's/@/"/g' >&2
fi
fi
done
)
list_file_includes "$root/$file".cxx | sed 's/\(#include [<@][^>@]*[>@]\).*/\1/' | sed 's#\.\./##g#' >>$tmpfile
fi
fi
done
......@@ -97,16 +122,12 @@ function filter_ignore()
# - sores.hxx provides BMP_PLUGIN, which is redefined
# - some sources play ugly #define tricks with editeng/eeitemid.hxx
# - jerror.h and jpeglib.h are not self-contained
# - prewin.h, postwin.h and shlobj.h are WNT-only (to be fixed in a better way)
grep -e '\.h[">]$' -e '\.hpp[">]$' -e '\.hdl[">]$' -e '\.hxx[">]$' -e '^[^\.]*>$' | \
grep -v -F -e '#include "gperffasttoken.hxx"' | \
grep -v -F -e '#include <svtools/sores.hxx>' | \
grep -v -F -e '#include <editeng/eeitemid.hxx>' | \
grep -v -F -e '#include "jerror.h"' | \
grep -v -F -e '#include "jpeglib.h"' | \
grep -v -F -e '#include <prewin.h>' | \
grep -v -F -e '#include <postwin.h>' | \
grep -v -F -e '#include <shlobj.h>'
grep -v -F -e '#include "jpeglib.h"'
)
# " in #include "foo" breaks echo down below, so " -> @
......
......@@ -7,7 +7,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "stdio.h"
#include "com/sun/star/beans/XPropertySet.hpp"
#include "com/sun/star/document/XDocumentProperties.hpp"
#include "com/sun/star/script/Converter.hpp"
......@@ -27,6 +26,7 @@
#include "rtl/ustring.hxx"
#include "sal/config.h"
#include "sal/types.h"
#include "stdio.h"
#include "svl/filenotation.hxx"
#include "svl/inettype.hxx"
#include "svl/urihelper.hxx"
......@@ -324,7 +324,6 @@
#include <osl/module.hxx>
#include <osl/mutex.hxx>
#include <osl/security.hxx>
#include <pwd.h>
#include <rtl/bootstrap.hxx>
#include <rtl/crc.h>
#include <rtl/instance.hxx>
......@@ -370,7 +369,6 @@
#include <svl/urlfilter.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <sys/types.h>
#include <toolkit/awt/vclxaccessiblecomponent.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <toolkit/awt/vclxwindow.hxx>
......
......@@ -106,6 +106,7 @@
#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
#include <com/sun/star/frame/AutoRecovery.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
......
......@@ -18,9 +18,7 @@
#include "editeng/boxitem.hxx"
#include "editeng/editobj.hxx"
#include "editeng/editstat.hxx"
#include "editeng/editview.hxx"
#include "editeng/fhgtitem.hxx"
#include "editeng/flditem.hxx"
#include "editeng/fontitem.hxx"
#include "editeng/forbiddencharacterstable.hxx"
#include "editeng/frmdiritem.hxx"
......@@ -63,8 +61,6 @@
#include <basegfx/point/b3dpoint.hxx>
#include <basegfx/polygon/b2dlinegeometry.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygonclipper.hxx>
#include <basegfx/polygon/b2dpolygoncutandtouch.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
......@@ -598,7 +594,6 @@
#include <vcl/window.hxx>
#include <vcl/wrkwin.hxx>
#include <vector>
#include <wchar.h>
#include <xmloff/xmlictxt.hxx>
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -165,13 +165,13 @@
#include <com/sun/star/form/XFormController.hpp>
#include <com/sun/star/form/XFormsSupplier.hpp>
#include <com/sun/star/form/XImageProducerSupplier.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/DispatchHelper.hpp>
#include <com/sun/star/frame/DispatchResultState.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/frame/UICommandDescription.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/frame/XFrame.hpp>
......
......@@ -86,7 +86,6 @@
#include <com/sun/star/style/NumberingType.hpp>
#include <com/sun/star/style/PageStyleLayout.hpp>
#include <com/sun/star/style/ParagraphAdjust.hpp>
#include <com/sun/star/style/TabStop.hpp>
#include <com/sun/star/style/XStyle.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/table/BorderLine2.hpp>
......@@ -182,7 +181,6 @@
#include <osl/file.hxx>
#include <osl/module.hxx>
#include <osl/mutex.hxx>
#include <osl/process.h>
#include <rtl/instance.hxx>
#include <rtl/strbuf.hxx>
#include <rtl/string.hxx>
......@@ -205,7 +203,6 @@
#include <tools/resmgr.hxx>
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <unotools/localfilehelper.hxx>
#include <unotools/streamwrap.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <vcl/graph.hxx>
......
......@@ -7,7 +7,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <osl/thread.h>
#include "com/sun/star/beans/XPropertySet.hpp"
#include "com/sun/star/beans/XPropertySetInfo.hpp"
#include "com/sun/star/text/XLineNumberingProperties.hpp"
......@@ -26,7 +25,6 @@
#include <basegfx/vector/b2dvector.hxx>
#include <basegfx/vector/b3dvector.hxx>
#include <boost/bind.hpp>
#include <boost/iterator/transform_iterator.hpp>
#include <boost/iterator_adaptors.hpp>
#include <boost/ptr_container/ptr_set.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
......@@ -484,7 +482,6 @@
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase3.hxx>
#include <cppuhelper/weakref.hxx>
#include <cstdio>
#include <functional>
#include <i18npool/languagetag.hxx>
#include <i18npool/mslangid.hxx>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment