[Libreoffice-commits] core.git: accessibility/inc basctl/inc basegfx/inc basic/inc bin/update_pch bin/update_pch_autotune.sh bin/update_pch_bisect bin/update_pch.sh chart2/inc comphelper/inc configmgr/inc connectivity/inc cppcanvas/inc cppuhelper/inc cui/inc dbaccess/inc desktop/inc drawinglayer/inc editeng/inc forms/inc framework/inc hwpfilter/inc lotuswordpro/inc oox/inc package/inc reportdesign/inc sal/inc sc/inc sdext/inc sd/inc sfx2/inc slideshow/inc sot/inc starmath/inc svgio/inc svl/inc svtools/inc svx/inc sw/inc tools/inc unotools/inc unoxml/inc uui/inc vbahelper/inc vcl/inc writerfilter/inc xmloff/inc xmlscript/inc xmlsecurity/inc

Ashod Nakashian ashodnakashian at yahoo.com
Sun Nov 15 12:32:01 PST 2015


 accessibility/inc/pch/precompiled_acc.hxx                 |  355 +++
 basctl/inc/pch/precompiled_basctl.hxx                     |  662 +++++--
 basegfx/inc/pch/precompiled_basegfx.hxx                   |   99 -
 basic/inc/pch/precompiled_sb.hxx                          |  106 -
 bin/update_pch                                            | 1177 ++++++++++++
 bin/update_pch.sh                                         |  170 -
 bin/update_pch_autotune.sh                                |  210 ++
 bin/update_pch_bisect                                     |    9 
 chart2/inc/pch/precompiled_chartcontroller.hxx            |  708 ++++---
 chart2/inc/pch/precompiled_chartcore.hxx                  |  325 +--
 chart2/inc/pch/precompiled_chartopengl.hxx                |   66 
 comphelper/inc/pch/precompiled_comphelper.hxx             |  295 +--
 configmgr/inc/pch/precompiled_configmgr.hxx               |  149 -
 connectivity/inc/pch/precompiled_ado.hxx                  |   58 
 connectivity/inc/pch/precompiled_calc.hxx                 |   64 
 connectivity/inc/pch/precompiled_dbase.hxx                |  214 +-
 connectivity/inc/pch/precompiled_dbpool2.hxx              |  113 -
 connectivity/inc/pch/precompiled_dbtools.hxx              |  184 +
 connectivity/inc/pch/precompiled_file.hxx                 |  181 +
 connectivity/inc/pch/precompiled_firebird_sdbc.hxx        |   80 
 connectivity/inc/pch/precompiled_flat.hxx                 |  202 +-
 connectivity/inc/pch/precompiled_mysql.hxx                |  168 +
 connectivity/inc/pch/precompiled_odbc.hxx                 |   58 
 connectivity/inc/pch/precompiled_postgresql-sdbc-impl.hxx |   58 
 cppcanvas/inc/pch/precompiled_cppcanvas.hxx               |  258 ++
 cppuhelper/inc/pch/precompiled_cppuhelper.hxx             |  148 -
 cui/inc/pch/precompiled_cui.hxx                           |  899 ++++-----
 dbaccess/inc/pch/precompiled_dba.hxx                      |  514 ++---
 dbaccess/inc/pch/precompiled_dbaxml.hxx                   |  138 -
 dbaccess/inc/pch/precompiled_dbmm.hxx                     |  267 ++
 dbaccess/inc/pch/precompiled_dbu.hxx                      |  531 +----
 dbaccess/inc/pch/precompiled_sdbt.hxx                     |   13 
 desktop/inc/pch/precompiled_deployment.hxx                |  150 -
 desktop/inc/pch/precompiled_deploymentgui.hxx             |  193 --
 desktop/inc/pch/precompiled_deploymentmisc.hxx            |  104 -
 desktop/inc/pch/precompiled_sofficeapp.hxx                |  390 ++--
 drawinglayer/inc/pch/precompiled_drawinglayer.hxx         |  235 +-
 editeng/inc/pch/precompiled_editeng.hxx                   |  567 +++---
 forms/inc/pch/precompiled_frm.hxx                         |  318 +--
 framework/inc/pch/precompiled_fwe.hxx                     |  289 ++-
 framework/inc/pch/precompiled_fwi.hxx                     |  182 +
 framework/inc/pch/precompiled_fwk.hxx                     |  559 ++----
 framework/inc/pch/precompiled_fwl.hxx                     |  386 +++-
 hwpfilter/inc/pch/precompiled_hwp.hxx                     |   57 
 lotuswordpro/inc/pch/precompiled_lwpft.hxx                |   96 -
 oox/inc/pch/precompiled_oox.hxx                           |  532 +----
 package/inc/pch/precompiled_package2.hxx                  |  169 +
 package/inc/pch/precompiled_xstor.hxx                     |   90 
 reportdesign/inc/pch/precompiled_rpt.hxx                  |  477 +++--
 reportdesign/inc/pch/precompiled_rptui.hxx                |  748 +++++---
 reportdesign/inc/pch/precompiled_rptxml.hxx               |  132 -
 sal/inc/pch/precompiled_sal.hxx                           |  100 -
 sc/inc/pch/precompiled_sc.hxx                             | 1240 ++++---------
 sc/inc/pch/precompiled_scfilt.hxx                         |  596 +-----
 sc/inc/pch/precompiled_scui.hxx                           |   94 -
 sc/inc/pch/precompiled_vbaobj.hxx                         |   73 
 sd/inc/pch/precompiled_sd.hxx                             |  825 ++------
 sd/inc/pch/precompiled_sdui.hxx                           |  582 +++++-
 sdext/inc/pch/precompiled_PresentationMinimizer.hxx       |  129 -
 sdext/inc/pch/precompiled_PresenterScreen.hxx             |  166 -
 sfx2/inc/pch/precompiled_sfx.hxx                          |  765 ++------
 slideshow/inc/pch/precompiled_slideshow.hxx               |  383 ++--
 sot/inc/pch/precompiled_sot.hxx                           |  118 -
 starmath/inc/pch/precompiled_sm.hxx                       |  306 +--
 svgio/inc/pch/precompiled_svgio.hxx                       |   96 -
 svl/inc/pch/precompiled_svl.hxx                           |  195 --
 svtools/inc/pch/precompiled_svt.hxx                       |  658 +++----
 svx/inc/pch/precompiled_svx.hxx                           |  643 +++---
 svx/inc/pch/precompiled_svxcore.hxx                       | 1039 ++++-------
 sw/inc/pch/precompiled_msword.hxx                         |  776 ++++++--
 sw/inc/pch/precompiled_sw.hxx                             | 1298 +++-----------
 sw/inc/pch/precompiled_swui.hxx                           |  677 +++++--
 sw/inc/pch/precompiled_vbaswobj.hxx                       |  517 ++++-
 tools/inc/pch/precompiled_tl.hxx                          |   83 
 unotools/inc/pch/precompiled_utl.hxx                      |  234 +-
 unoxml/inc/pch/precompiled_unoxml.hxx                     |   32 
 uui/inc/pch/precompiled_uui.hxx                           |  167 -
 vbahelper/inc/pch/precompiled_msforms.hxx                 |  393 +++-
 vbahelper/inc/pch/precompiled_vbahelper.hxx               |  250 +-
 vcl/inc/pch/precompiled_vcl.hxx                           |  560 ++----
 writerfilter/inc/pch/precompiled_writerfilter.hxx         |  245 --
 xmloff/inc/pch/precompiled_xo.hxx                         |  631 +-----
 xmloff/inc/pch/precompiled_xof.hxx                        |   30 
 xmlscript/inc/pch/precompiled_xmlscript.hxx               |   79 
 xmlsecurity/inc/pch/precompiled_xmlsecurity.hxx           |  351 ++-
 xmlsecurity/inc/pch/precompiled_xsec_fw.hxx               |   58 
 xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx           |  121 -
 87 files changed, 15314 insertions(+), 13349 deletions(-)

New commits:
commit 06116bd15b1fb8b03e65e1166f5ddad929614246
Author: Ashod Nakashian <ashodnakashian at yahoo.com>
Date:   Sat Nov 14 18:48:49 2015 -0500

    Fast PCH generator and optimized PCH files
    
    Ported update_pch.sh to Python with improved performance
    and features. The new script is invoked from the same
    update_pch.sh which calls it for each library in
    parallel, although it can be invoked directly.
    
    The ported script (update_pch) updates all PCH files
    in ~15 seconds where the old script took ~4500 seconds.
    In addition, the new script supports 3-tiered headers
    (system, module, and local) and is very flexible to
    support other improvement. It has a per-library
    optimal configuration settings that can be updated
    using another new scripts (update_pch_autotune.sh)
    which finds optimal per-PCH settings.
    
    PCH files have been generated using the new scripts
    which builds significantly faster (2-3x, depending
    on module and configuration) and the intermediate
    binaries are noticably smaller (by several GBs).
    
    The new script stamps each generated PCH file with
    the command that generated it to make it trivial
    for users to update them, and also adds the command
    to invoke another script (update_pch_bisect) that
    helps find missing headers or conflicting headers
    that may break the build after updating the PCH.
    
    Finally update_pch has built-in unit-tests for
    makefile parsing and other core functionality.
    
    Change-Id: Ib933b50e50374d7e2e7e3e95ba8799b0cc8a27fa
    Reviewed-on: https://gerrit.libreoffice.org/19965
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/accessibility/inc/pch/precompiled_acc.hxx b/accessibility/inc/pch/precompiled_acc.hxx
index 353903b..71b57e5 100644
--- a/accessibility/inc/pch/precompiled_acc.hxx
+++ b/accessibility/inc/pch/precompiled_acc.hxx
@@ -8,97 +8,356 @@
  */
 
 /*
- This file has been autogenerated by update_pch.sh . It is possible to edit it
- manually (such as when an include file has been moved/renamed/removed. All such
+ This file has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
  manual changes will be rewritten by the next run of update_pch.sh (which presumably
  also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2015-11-14 14:16:28 using:
+ ./bin/update_pch accessibility acc --cutoff=4 --exclude:system --include:module --include:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./accessibility/inc/pch/precompiled_acc.hxx "/opt/lo/bin/make accessibility.build" --find-conflicts
 */
 
 #include <algorithm>
+#include <cassert>
+#include <config_global.h>
+#include <config_typesizes.h>
+#include <config_vcl.h>
+#include <cstddef>
+#include <cstdlib>
+#include <cstring>
+#include <deque>
+#include <exception>
+#include <float.h>
+#include <functional>
+#include <iomanip>
+#include <limits.h>
+#include <limits>
+#include <list>
+#include <map>
+#include <math.h>
+#include <memory>
+#include <new>
+#include <ostream>
+#include <set>
+#include <sstream>
+#include <stack>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <string>
+#include <type_traits>
+#include <typeinfo>
+#include <utility>
+#include <vector>
+#include <boost/current_function.hpp>
+#include <boost/functional/hash.hpp>
+#include <boost/intrusive_ptr.hpp>
 #include <boost/noncopyable.hpp>
+#include <boost/optional.hpp>
+#include <osl/diagnose.h>
+#include <osl/doublecheckedlocking.h>
+#include <osl/endian.h>
+#include <osl/file.h>
+#include <osl/getglobalmutex.hxx>
+#include <osl/interlck.h>
+#include <osl/module.h>
+#include <osl/module.hxx>
+#include <osl/mutex.h>
+#include <osl/mutex.hxx>
+#include <osl/pipe.h>
+#include <osl/process.h>
+#include <osl/security.h>
+#include <osl/socket.h>
+#include <osl/time.h>
+#include <rtl/alloc.h>
+#include <rtl/byteseq.h>
+#include <rtl/instance.hxx>
+#include <rtl/locale.h>
+#include <rtl/math.h>
+#include <rtl/math.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/strbuf.hxx>
+#include <rtl/string.h>
+#include <rtl/string.hxx>
+#include <rtl/stringutils.hxx>
+#include <rtl/tencinfo.h>
+#include <rtl/textcvt.h>
+#include <rtl/textenc.h>
+#include <rtl/ustrbuf.h>
+#include <rtl/ustrbuf.hxx>
+#include <rtl/ustring.h>
+#include <rtl/ustring.hxx>
+#include <sal/config.h>
+#include <sal/detail/log.h>
+#include <sal/log.hxx>
+#include <sal/macros.h>
+#include <sal/mathconf.h>
+#include <sal/saldllapi.h>
+#include <sal/types.h>
+#include <sal/typesizes.h>
+#include <salhelper/salhelperdllapi.h>
+#include <salhelper/simplereferenceobject.hxx>
+#include <vcl/accel.hxx>
+#include <vcl/alpha.hxx>
+#include <vcl/animate.hxx>
+#include <vcl/bitmap.hxx>
+#include <vcl/bitmapex.hxx>
+#include <vcl/builder.hxx>
+#include <vcl/button.hxx>
+#include <vcl/cairo.hxx>
+#include <vcl/checksum.hxx>
+#include <vcl/cmdevt.hxx>
+#include <vcl/combobox.hxx>
+#include <vcl/controllayout.hxx>
+#include <vcl/ctrl.hxx>
+#include <vcl/devicecoordinate.hxx>
+#include <vcl/dllapi.h>
+#include <vcl/dndhelp.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/event.hxx>
+#include <vcl/floatwin.hxx>
+#include <vcl/fntstyle.hxx>
+#include <vcl/font.hxx>
+#include <vcl/gdimtf.hxx>
+#include <vcl/gfxlink.hxx>
+#include <vcl/gradient.hxx>
+#include <vcl/graph.h>
+#include <vcl/graph.hxx>
+#include <vcl/hatch.hxx>
+#include <vcl/idle.hxx>
+#include <vcl/image.hxx>
+#include <vcl/impdel.hxx>
+#include <vcl/keycod.hxx>
+#include <vcl/keycodes.hxx>
+#include <vcl/lineinfo.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/mapmod.hxx>
+#include <vcl/menu.hxx>
+#include <vcl/metaact.hxx>
+#include <vcl/metaactiontypes.hxx>
+#include <vcl/mnemonicengine.hxx>
+#include <vcl/outdev.hxx>
+#include <vcl/outdevmap.hxx>
+#include <vcl/outdevstate.hxx>
+#include <vcl/quickselectionengine.hxx>
+#include <vcl/region.hxx>
+#include <vcl/salnativewidgets.hxx>
+#include <vcl/scheduler.hxx>
+#include <vcl/scopedbitmapaccess.hxx>
+#include <vcl/seleng.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/svgdata.hxx>
+#include <vcl/syswin.hxx>
+#include <vcl/timer.hxx>
+#include <vcl/unohelp2.hxx>
+#include <vcl/vclenum.hxx>
+#include <vcl/vclptr.hxx>
+#include <vcl/wall.hxx>
+#include <vcl/window.hxx>
+#include <basegfx/basegfxdllapi.h>
+#include <basegfx/color/bcolor.hxx>
+#include <basegfx/color/bcolormodifier.hxx>
+#include <basegfx/numeric/ftools.hxx>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/point/b2ipoint.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/range/b2drange.hxx>
+#include <basegfx/range/basicrange.hxx>
+#include <basegfx/tuple/b2dtuple.hxx>
+#include <basegfx/tuple/b2ituple.hxx>
+#include <basegfx/tuple/b3dtuple.hxx>
+#include <basegfx/vector/b2dvector.hxx>
+#include <basegfx/vector/b2enums.hxx>
+#include <basegfx/vector/b2ivector.hxx>
 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
 #include <com/sun/star/accessibility/AccessibleRelationType.hpp>
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
-#include <com/sun/star/accessibility/AccessibleTableModelChange.hpp>
-#include <com/sun/star/accessibility/AccessibleTableModelChangeType.hpp>
+#include <com/sun/star/accessibility/TextSegment.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleAction.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleEditableText.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
+#include <com/sun/star/accessibility/XAccessibleKeyBinding.hpp>
 #include <com/sun/star/accessibility/XAccessibleSelection.hpp>
+#include <com/sun/star/accessibility/XAccessibleStateSet.hpp>
+#include <com/sun/star/accessibility/XAccessibleTable.hpp>
 #include <com/sun/star/accessibility/XAccessibleText.hpp>
 #include <com/sun/star/accessibility/XAccessibleValue.hpp>
+#include <com/sun/star/awt/Key.hpp>
+#include <com/sun/star/awt/KeyGroup.hpp>
 #include <com/sun/star/awt/KeyModifier.hpp>
 #include <com/sun/star/awt/Point.hpp>
 #include <com/sun/star/awt/Rectangle.hpp>
-#include <com/sun/star/awt/ScrollBarOrientation.hpp>
 #include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/awt/XFocusListener.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/datatransfer/XTransferable2.hpp>
 #include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
+#include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp>
 #include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp>
+#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
+#include <com/sun/star/datatransfer/dnd/DropTargetDragEvent.hpp>
+#include <com/sun/star/datatransfer/dnd/DropTargetDropEvent.hpp>
+#include <com/sun/star/datatransfer/dnd/XDragGestureListener.hpp>
+#include <com/sun/star/datatransfer/dnd/XDragGestureRecognizer.hpp>
+#include <com/sun/star/datatransfer/dnd/XDragSourceListener.hpp>
+#include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
+#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
+#include <com/sun/star/drawing/LineCap.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XTerminateListener.hpp>
+#include <com/sun/star/graphic/XPrimitive2D.hpp>
+#include <com/sun/star/i18n/XBreakIterator.hpp>
+#include <com/sun/star/i18n/XCharacterClassification.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
 #include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/lang/EventObject.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/uno/Any.h>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Type.h>
+#include <com/sun/star/uno/Type.hxx>
+#include <com/sun/star/uno/TypeClass.hdl>
+#include <com/sun/star/uno/XAggregation.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/XWeak.hpp>
+#include <com/sun/star/uno/genfunc.h>
+#include <com/sun/star/uno/genfunc.hxx>
+#include <comphelper/accessiblecomponenthelper.hxx>
+#include <comphelper/accessiblecontexthelper.hxx>
 #include <comphelper/accessibleeventnotifier.hxx>
 #include <comphelper/accessiblekeybindinghelper.hxx>
 #include <comphelper/accessibletexthelper.hxx>
-#include <comphelper/accessiblewrapper.hxx>
-#include <comphelper/processfactory.hxx>
+#include <comphelper/accimplaccess.hxx>
+#include <comphelper/broadcasthelper.hxx>
+#include <comphelper/comphelperdllapi.h>
+#include <comphelper/fileformat.h>
 #include <comphelper/sequence.hxx>
 #include <comphelper/servicehelper.hxx>
-#include <comphelper/string.hxx>
 #include <comphelper/types.hxx>
-#include <config_features.h>
+#include <comphelper/uno3.hxx>
+#include <cppu/cppudllapi.h>
+#include <cppu/unotype.hxx>
+#include <cppuhelper/compbase2.hxx>
+#include <cppuhelper/compbase3.hxx>
+#include <cppuhelper/compbase4.hxx>
+#include <cppuhelper/compbase5.hxx>
+#include <cppuhelper/compbase_ex.hxx>
+#include <cppuhelper/cppuhelperdllapi.h>
+#include <cppuhelper/implbase.hxx>
 #include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase5.hxx>
+#include <cppuhelper/implbase_ex.hxx>
+#include <cppuhelper/implbase_ex_post.hxx>
+#include <cppuhelper/implbase_ex_pre.hxx>
+#include <cppuhelper/interfacecontainer.h>
+#include <cppuhelper/interfacecontainer.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <cppuhelper/typeprovider.hxx>
-#include <osl/mutex.hxx>
-#include <sot/exchange.hxx>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/weakagg.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <i18nlangtag/i18nlangtagdllapi.h>
+#include <i18nlangtag/lang.h>
+#include <i18nlangtag/languagetag.hxx>
+#include <o3tl/cow_wrapper.hxx>
+#include <o3tl/typed_flags_set.hxx>
+#include <rsc/rsc-vcl-shared-types.hxx>
 #include <sot/formats.hxx>
-#include <string.h>
-#include <svtools/accessiblefactory.hxx>
+#include <svl/hint.hxx>
+#include <svl/smplhint.hxx>
+#include <svl/svldllapi.h>
+#include <svtools/AccessibleBrowseBoxObjType.hxx>
 #include <svtools/accessibletable.hxx>
 #include <svtools/accessibletableprovider.hxx>
-#include <svtools/editbrowsebox.hxx>
-#include <svtools/ivctrl.hxx>
-#include <svtools/stringtransfer.hxx>
-#include <svtools/svlbitm.hxx>
-#include <svtools/svtabbx.hxx>
+#include <svtools/headbar.hxx>
+#include <svtools/svtdllapi.h>
 #include <svtools/tabbar.hxx>
-#include <svtools/toolpanel/paneltabbar.hxx>
-#include <svtools/toolpanel/toolpaneldeck.hxx>
+#include <svtools/transfer.hxx>
+#include <svtools/treelist.hxx>
 #include <svtools/treelistbox.hxx>
-#include <svtools/treelistentry.hxx>
+#include <svtools/treelistentries.hxx>
+#include <svtools/viewdataentry.hxx>
 #include <toolkit/awt/vclxaccessiblecomponent.hxx>
-#include <toolkit/awt/vclxfont.hxx>
 #include <toolkit/awt/vclxwindow.hxx>
 #include <toolkit/awt/vclxwindows.hxx>
-#include <toolkit/helper/accessiblefactory.hxx>
+#include <toolkit/dllapi.h>
 #include <toolkit/helper/convert.hxx>
 #include <toolkit/helper/externallock.hxx>
-#include <toolkit/helper/macros.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
-#include <tools/diagnose_ex.h>
+#include <tools/color.hxx>
+#include <tools/contnr.hxx>
+#include <tools/debug.hxx>
+#include <tools/errinf.hxx>
+#include <tools/fldunit.hxx>
+#include <tools/fontenum.hxx>
 #include <tools/gen.hxx>
-#include <tools/multisel.hxx>
-#include <tools/simplerm.hxx>
+#include <tools/globname.hxx>
+#include <tools/lineend.hxx>
+#include <tools/link.hxx>
+#include <tools/mapunit.hxx>
+#include <tools/poly.hxx>
+#include <tools/rc.hxx>
+#include <tools/ref.hxx>
+#include <tools/resid.hxx>
+#include <tools/resmgr.hxx>
+#include <tools/solar.h>
+#include <tools/stream.hxx>
+#include <tools/toolsdllapi.h>
+#include <tools/wintypes.hxx>
+#include <typelib/typeclass.h>
+#include <typelib/typedescription.h>
+#include <typelib/uik.h>
+#include <uno/any2.h>
+#include <uno/data.h>
+#include <uno/sequence2.h>
 #include <unotools/accessiblerelationsethelper.hxx>
 #include <unotools/accessiblestatesethelper.hxx>
-#include <vcl/button.hxx>
-#include <vcl/combobox.hxx>
-#include <vcl/controllayout.hxx>
-#include <vcl/ctrl.hxx>
-#include <vcl/edit.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/help.hxx>
-#include <vcl/lstbox.hxx>
-#include <vcl/menu.hxx>
-#include <vcl/popupmenuwindow.hxx>
-#include <vcl/scrbar.hxx>
-#include <vcl/settings.hxx>
-#include <vcl/status.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/tabctrl.hxx>
-#include <vcl/tabpage.hxx>
-#include <vcl/toolbox.hxx>
-#include <vcl/unohelp.hxx>
-#include <vcl/unohelp2.hxx>
-#include <vcl/window.hxx>
-#include <vector>
+#include <unotools/fontdefs.hxx>
+#include <unotools/options.hxx>
+#include <unotools/unotoolsdllapi.h>
+#include <accessibility/extended/AccessibleBrowseBox.hxx>
+#include <accessibility/extended/AccessibleBrowseBoxBase.hxx>
+#include <accessibility/extended/AccessibleBrowseBoxTableBase.hxx>
+#include <accessibility/extended/AccessibleGridControl.hxx>
+#include <accessibility/extended/AccessibleGridControlBase.hxx>
+#include <accessibility/extended/AccessibleGridControlTableCell.hxx>
+#include <accessibility/extended/accessibletabbarbase.hxx>
+#include <accessibility/helper/accresmgr.hxx>
+#include <accessibility/helper/characterattributeshelper.hxx>
+#include <accessibility/helper/listboxhelper.hxx>
+#include <accessibility/standard/accessiblemenubasecomponent.hxx>
+#include <accessibility/standard/accessiblemenuitemcomponent.hxx>
+#include <accessibility/standard/vclxaccessiblebox.hxx>
+#include <accessibility/standard/vclxaccessibleedit.hxx>
+#include <accessibility/standard/vclxaccessiblelist.hxx>
+#include <accessibility/standard/vclxaccessibletextcomponent.hxx>
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/inc/pch/precompiled_basctl.hxx b/basctl/inc/pch/precompiled_basctl.hxx
index a2214ff..b6da33e 100644
--- a/basctl/inc/pch/precompiled_basctl.hxx
+++ b/basctl/inc/pch/precompiled_basctl.hxx
@@ -8,192 +8,572 @@
  */
 
 /*
- This file has been autogenerated by update_pch.sh . It is possible to edit it
- manually (such as when an include file has been moved/renamed/removed. All such
+ This file has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
  manual changes will be rewritten by the next run of update_pch.sh (which presumably
  also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2015-11-14 14:16:28 using:
+ ./bin/update_pch basctl basctl --cutoff=3 --exclude:system --include:module --exclude:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./basctl/inc/pch/precompiled_basctl.hxx "/opt/lo/bin/make basctl.build" --find-conflicts
 */
 
-#include <basic/basicmanagerrepository.hxx>
+#include <algorithm>
+#include <cassert>
+#include <climits>
+#include <config_features.h>
+#include <config_global.h>
+#include <config_typesizes.h>
+#include <config_vcl.h>
+#include <cstdarg>
+#include <cstddef>
+#include <cstdlib>
+#include <cstring>
+#include <deque>
+#include <float.h>
+#include <functional>
+#include <iomanip>
+#include <iterator>
+#include <limits.h>
+#include <limits>
+#include <list>
+#include <map>
+#include <math.h>
+#include <memory>
+#include <new>
+#include <ostream>
+#include <set>
+#include <sstream>
+#include <stack>
+#include <stddef.h>
+#include <string.h>
+#include <string>
+#include <type_traits>
+#include <typeinfo>
+#include <unordered_map>
+#include <utility>
+#include <vector>
+#include <boost/functional/hash.hpp>
+#include <boost/intrusive_ptr.hpp>
+#include <boost/noncopyable.hpp>
+#include <boost/shared_array.hpp>
+#include <osl/conditn.h>
+#include <osl/conditn.hxx>
+#include <osl/diagnose.h>
+#include <osl/doublecheckedlocking.h>
+#include <osl/endian.h>
+#include <osl/file.h>
+#include <osl/file.hxx>
+#include <osl/getglobalmutex.hxx>
+#include <osl/interlck.h>
+#include <osl/module.h>
+#include <osl/module.hxx>
+#include <osl/mutex.h>
+#include <osl/mutex.hxx>
+#include <osl/pipe.h>
+#include <osl/process.h>
+#include <osl/security.h>
+#include <osl/socket.h>
+#include <osl/time.h>
+#include <rtl/alloc.h>
+#include <rtl/byteseq.h>
+#include <rtl/byteseq.hxx>
+#include <rtl/character.hxx>
+#include <rtl/instance.hxx>
+#include <rtl/locale.h>
+#include <rtl/math.h>
+#include <rtl/math.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/strbuf.h>
+#include <rtl/strbuf.hxx>
+#include <rtl/string.h>
+#include <rtl/string.hxx>
+#include <rtl/stringutils.hxx>
+#include <rtl/tencinfo.h>
+#include <rtl/textcvt.h>
+#include <rtl/textenc.h>
+#include <rtl/unload.h>
+#include <rtl/uri.hxx>
+#include <rtl/ustrbuf.h>
+#include <rtl/ustrbuf.hxx>
+#include <rtl/ustring.h>
+#include <rtl/ustring.hxx>
+#include <rtl/uuid.h>
+#include <sal/config.h>
+#include <sal/detail/log.h>
+#include <sal/log.hxx>
+#include <sal/macros.h>
+#include <sal/mathconf.h>
+#include <sal/saldllapi.h>
+#include <sal/types.h>
+#include <sal/typesizes.h>
+#include <salhelper/salhelperdllapi.h>
+#include <salhelper/simplereferenceobject.hxx>
+#include <salhelper/singletonref.hxx>
+#include <vcl/accel.hxx>
+#include <vcl/alpha.hxx>
+#include <vcl/animate.hxx>
+#include <vcl/apptypes.hxx>
+#include <vcl/bitmap.hxx>
+#include <vcl/bitmapex.hxx>
+#include <vcl/builder.hxx>
+#include <vcl/builderfactory.hxx>
+#include <vcl/button.hxx>
+#include <vcl/cairo.hxx>
+#include <vcl/checksum.hxx>
+#include <vcl/cmdevt.hxx>
+#include <vcl/combobox.h>
+#include <vcl/combobox.hxx>
+#include <vcl/ctrl.hxx>
+#include <vcl/cursor.hxx>
+#include <vcl/devicecoordinate.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/dllapi.h>
+#include <vcl/dndhelp.hxx>
+#include <vcl/edit.hxx>
+#include <vcl/event.hxx>
+#include <vcl/field.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/floatwin.hxx>
+#include <vcl/fntstyle.hxx>
+#include <vcl/font.hxx>
+#include <vcl/gdimtf.hxx>
+#include <vcl/gfxlink.hxx>
+#include <vcl/gradient.hxx>
+#include <vcl/graph.h>
+#include <vcl/graph.hxx>
+#include <vcl/hatch.hxx>
+#include <vcl/idle.hxx>
+#include <vcl/image.hxx>
+#include <vcl/impdel.hxx>
+#include <vcl/inputctx.hxx>
+#include <vcl/keycod.hxx>
+#include <vcl/keycodes.hxx>
+#include <vcl/layout.hxx>
+#include <vcl/lineinfo.hxx>
+#include <vcl/lstbox.h>
+#include <vcl/lstbox.hxx>
+#include <vcl/mapmod.hxx>
+#include <vcl/menu.hxx>
+#include <vcl/metaact.hxx>
+#include <vcl/metaactiontypes.hxx>
+#include <vcl/mnemonicengine.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/outdev.hxx>
+#include <vcl/outdevmap.hxx>
+#include <vcl/outdevstate.hxx>
+#include <vcl/pointr.hxx>
+#include <vcl/ptrstyle.hxx>
+#include <vcl/quickselectionengine.hxx>
+#include <vcl/region.hxx>
+#include <vcl/salnativewidgets.hxx>
+#include <vcl/scheduler.hxx>
+#include <vcl/scopedbitmapaccess.hxx>
+#include <vcl/seleng.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/spinfld.hxx>
+#include <vcl/status.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/svgdata.hxx>
+#include <vcl/syswin.hxx>
+#include <vcl/timer.hxx>
+#include <vcl/vclenum.hxx>
+#include <vcl/vclevent.hxx>
+#include <vcl/vclmedit.hxx>
+#include <vcl/vclptr.hxx>
+#include <vcl/virdev.hxx>
+#include <vcl/wall.hxx>
+#include <vcl/window.hxx>
+#include <vcl/xtextedt.hxx>
+#include <basebmp/basebmpdllapi.h>
+#include <basebmp/bitmapdevice.hxx>
+#include <basebmp/drawmodes.hxx>
+#include <basebmp/scanlineformats.hxx>
+#include <basegfx/basegfxdllapi.h>
+#include <basegfx/color/bcolor.hxx>
+#include <basegfx/color/bcolormodifier.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/numeric/ftools.hxx>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/point/b2ipoint.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/range/b2drange.hxx>
+#include <basegfx/range/basicrange.hxx>
+#include <basegfx/tuple/b2dtuple.hxx>
+#include <basegfx/tuple/b2ituple.hxx>
+#include <basegfx/tuple/b3dtuple.hxx>
+#include <basegfx/vector/b2dvector.hxx>
+#include <basegfx/vector/b2enums.hxx>
+#include <basegfx/vector/b2ivector.hxx>
+#include <basic/basicdllapi.h>
 #include <basic/basmgr.hxx>
-#include <basic/basrdll.hxx>
 #include <basic/sbmeth.hxx>
 #include <basic/sbmod.hxx>
-#include <basic/sbuno.hxx>
-#include <com/sun/star/accessibility/AccessibleEventId.hpp>
-#include <com/sun/star/accessibility/AccessibleRole.hpp>
-#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-#include <com/sun/star/awt/PosSize.hpp>
-#include <com/sun/star/awt/ScrollBarOrientation.hpp>
-#include <com/sun/star/awt/Toolkit.hpp>
-#include <com/sun/star/awt/UnoControlDialog.hpp>
-#include <com/sun/star/awt/XDialog.hpp>
-#include <com/sun/star/awt/XUnoControlContainer.hpp>
-#include <com/sun/star/awt/XVclContainerPeer.hpp>
-#include <com/sun/star/awt/XWindow2.hpp>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <basic/sbxcore.hxx>
+#include <basic/sbxdef.hxx>
+#include <basic/sbxvar.hxx>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/awt/GradientStyle.hpp>
+#include <com/sun/star/awt/Key.hpp>
+#include <com/sun/star/awt/KeyGroup.hpp>
+#include <com/sun/star/awt/XControlContainer.hpp>
+#include <com/sun/star/awt/XDevice.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/beans/Property.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/XFastPropertySet.hpp>
 #include <com/sun/star/beans/XMultiPropertySet.hpp>
-#include <com/sun/star/beans/XPropertiesChangeListener.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/container/XContainer.hpp>
+#include <com/sun/star/beans/XPropertySetOption.hpp>
+#include <com/sun/star/beans/XPropertyState.hpp>
+#include <com/sun/star/bridge/oleautomation/Decimal.hpp>
 #include <com/sun/star/container/XNameContainer.hpp>
-#include <com/sun/star/container/XNamed.hpp>
-#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp>
-#include <com/sun/star/datatransfer/XMimeContentType.hpp>
-#include <com/sun/star/document/MacroExecMode.hpp>
-#include <com/sun/star/document/XEmbeddedScripts.hpp>
-#include <com/sun/star/document/XScriptInvocationContext.hpp>
-#include <com/sun/star/form/binding/XBindableValue.hpp>
-#include <com/sun/star/form/binding/XListEntrySink.hpp>
-#include <com/sun/star/form/binding/XValueBinding.hpp>
+#include <com/sun/star/datatransfer/XTransferable2.hpp>
+#include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp>
+#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
+#include <com/sun/star/datatransfer/dnd/DropTargetDragEvent.hpp>
+#include <com/sun/star/datatransfer/dnd/DropTargetDropEvent.hpp>
+#include <com/sun/star/datatransfer/dnd/XDragGestureListener.hpp>
+#include <com/sun/star/datatransfer/dnd/XDragGestureRecognizer.hpp>
+#include <com/sun/star/datatransfer/dnd/XDragSourceListener.hpp>
+#include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
+#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
+#include <com/sun/star/drawing/DashStyle.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/HatchStyle.hpp>
+#include <com/sun/star/drawing/LineCap.hpp>
+#include <com/sun/star/drawing/LineStyle.hpp>
+#include <com/sun/star/embed/Aspects.hpp>
+#include <com/sun/star/embed/VerbDescriptor.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
 #include <com/sun/star/frame/Desktop.hpp>
-#include <com/sun/star/frame/Frame.hpp>
-#include <com/sun/star/frame/FrameSearchFlag.hpp>
-#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/frame/FeatureStateEvent.hpp>
+#include <com/sun/star/frame/XController2.hpp>
+#include <com/sun/star/frame/XDispatch.hpp>
+#include <com/sun/star/frame/XDispatchProvider.hpp>
+#include <com/sun/star/frame/XDispatchRecorderSupplier.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XFrameActionListener.hpp>
 #include <com/sun/star/frame/XLayoutManager.hpp>
-#include <com/sun/star/frame/XModel2.hpp>
-#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/frame/XTitle.hpp>
-#include <com/sun/star/frame/theGlobalEventBroadcaster.hpp>
-#include <com/sun/star/i18n/Boundary.hpp>
-#include <com/sun/star/i18n/WordType.hpp>
-#include <com/sun/star/i18n/XBreakIterator.hpp>
-#include <com/sun/star/inspection/XObjectInspector.hpp>
-#include <com/sun/star/io/Pipe.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XStatusListener.hpp>
+#include <com/sun/star/frame/XStatusbarController.hpp>
+#include <com/sun/star/frame/XSubToolbarController.hpp>
+#include <com/sun/star/frame/XTerminateListener.hpp>
+#include <com/sun/star/frame/XToolbarController.hpp>
+#include <com/sun/star/frame/status/Verb.hpp>
+#include <com/sun/star/graphic/XPrimitive2D.hpp>
+#include <com/sun/star/i18n/ForbiddenCharacters.hpp>
+#include <com/sun/star/i18n/KCharacterType.hpp>
+#include <com/sun/star/i18n/KParseTokens.hpp>
+#include <com/sun/star/i18n/KParseType.hpp>
+#include <com/sun/star/i18n/LocaleItem.hpp>
+#include <com/sun/star/i18n/ParseResult.hpp>
+#include <com/sun/star/i18n/XCharacterClassification.hpp>
+#include <com/sun/star/i18n/XCollator.hpp>
+#include <com/sun/star/i18n/XLocaleData4.hpp>
+#include <com/sun/star/i18n/reservedWords.hpp>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+#include <com/sun/star/io/XStream.hpp>
+#include <com/sun/star/io/XTruncate.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/lang/EventObject.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/packages/manifest/ManifestWriter.hpp>
-#include <com/sun/star/reflection/theCoreReflection.hpp>
-#include <com/sun/star/resource/StringResource.hpp>
-#include <com/sun/star/resource/StringResourceWithLocation.hpp>
-#include <com/sun/star/resource/XStringResourceSupplier.hpp>
-#include <com/sun/star/script/DocumentDialogLibraryContainer.hpp>
-#include <com/sun/star/script/DocumentScriptLibraryContainer.hpp>
-#include <com/sun/star/script/ModuleSizeExceededRequest.hpp>
+#include <com/sun/star/lang/XServiceName.hpp>
+#include <com/sun/star/lang/XSingleComponentFactory.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <com/sun/star/lang/XTypeProvider.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/registry/XRegistryKey.hpp>
 #include <com/sun/star/script/ModuleType.hpp>
-#include <com/sun/star/script/XLibraryContainer.hpp>
-#include <com/sun/star/script/XLibraryContainer2.hpp>
-#include <com/sun/star/script/XLibraryContainerExport.hpp>
 #include <com/sun/star/script/XLibraryContainerPassword.hpp>
-#include <com/sun/star/script/XScriptEventsSupplier.hpp>
-#include <com/sun/star/script/vba/XVBACompatibility.hpp>
-#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
-#include <com/sun/star/task/InteractionHandler.hpp>
-#include <com/sun/star/ucb/NameClash.hpp>
-#include <com/sun/star/ucb/SimpleFileAccess.hpp>
-#include <com/sun/star/ucb/XCommandEnvironment.hpp>
-#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
+#include <com/sun/star/style/XStyle.hpp>
+#include <com/sun/star/ucb/CommandAbortedException.hpp>
+#include <com/sun/star/ucb/ContentCreationException.hpp>
+#include <com/sun/star/ui/XStatusbarItem.hpp>
 #include <com/sun/star/ui/dialogs/FilePicker.hpp>
-#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
-#include <com/sun/star/uri/UriReferenceFactory.hpp>
-#include <com/sun/star/util/NumberFormatsSupplier.hpp>
-#include <com/sun/star/util/VetoException.hpp>
-#include <com/sun/star/util/XCloneable.hpp>
-#include <com/sun/star/util/theMacroExpander.hpp>
-#include <comphelper/documentinfo.hxx>
+#include <com/sun/star/uno/Any.h>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Exception.hpp>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Type.h>
+#include <com/sun/star/uno/Type.hxx>
+#include <com/sun/star/uno/TypeClass.hdl>
+#include <com/sun/star/uno/TypeClass.hpp>
+#include <com/sun/star/uno/XAggregation.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/uno/XInterface.hpp>
+#include <com/sun/star/uno/XWeak.hpp>
+#include <com/sun/star/uno/genfunc.h>
+#include <com/sun/star/uno/genfunc.hxx>
+#include <com/sun/star/util/Date.hpp>
+#include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/util/Time.hpp>
+#include <com/sun/star/util/URL.hpp>
+#include <com/sun/star/util/URLTransformer.hpp>
+#include <com/sun/star/util/XURLTransformer.hpp>
+#include <com/sun/star/util/XUpdatable.hpp>
+#include <comphelper/broadcasthelper.hxx>
+#include <comphelper/comphelperdllapi.h>
+#include <comphelper/extract.hxx>
+#include <comphelper/fileformat.h>
+#include <comphelper/namedvaluecollection.hxx>
 #include <comphelper/processfactory.hxx>
-#include <comphelper/unique_disposing_ptr.hxx>
-#include <comphelper/stl_types.hxx>
-#include <comphelper/string.hxx>
+#include <comphelper/propagg.hxx>
+#include <comphelper/proparrhlp.hxx>
+#include <comphelper/property.hxx>
+#include <comphelper/propertycontainer.hxx>
+#include <comphelper/propertycontainerhelper.hxx>
+#include <comphelper/propertysequence.hxx>
+#include <comphelper/propstate.hxx>
+#include <comphelper/sequence.hxx>
+#include <comphelper/servicehelper.hxx>
 #include <comphelper/types.hxx>
-#include <config_options.h>
-#include <cppuhelper/basemutex.hxx>
-#include <cppuhelper/compbase.hxx>
-#include <cppuhelper/component_context.hxx>
+#include <comphelper/uno3.hxx>
+#include <comphelper/weak.hxx>
+#include <cppu/cppudllapi.h>
+#include <cppu/unotype.hxx>
+#include <cppuhelper/compbase1.hxx>
+#include <cppuhelper/compbase2.hxx>
+#include <cppuhelper/compbase_ex.hxx>
+#include <cppuhelper/cppuhelperdllapi.h>
 #include <cppuhelper/factory.hxx>
+#include <cppuhelper/implbase.hxx>
+#include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase5.hxx>
+#include <cppuhelper/implbase_ex.hxx>
+#include <cppuhelper/implbase_ex_post.hxx>
+#include <cppuhelper/implbase_ex_pre.hxx>
+#include <cppuhelper/interfacecontainer.h>
+#include <cppuhelper/interfacecontainer.hxx>
+#include <cppuhelper/propshlp.hxx>
+#include <cppuhelper/proptypehlp.h>
+#include <cppuhelper/proptypehlp.hxx>
+#include <cppuhelper/queryinterface.hxx>
 #include <cppuhelper/supportsservice.hxx>
-#include <editeng/sizeitem.hxx>
-#include <editeng/unolingu.hxx>
-#include <framework/documentundoguard.hxx>
-#include <initializer_list>
-#include <map>
-#include <o3tl/functional.hxx>
-#include <officecfg/Office/Common.hxx>
-#include <osl/diagnose.h>
-#include <osl/file.hxx>
-#include <osl/mutex.hxx>
-#include <rtl/uri.hxx>
-#include <set>
+#include <cppuhelper/typeprovider.hxx>
+#include <cppuhelper/weak.hxx>
+#include <cppuhelper/weakagg.hxx>
+#include <cppuhelper/weakref.hxx>
+#include <drawinglayer/drawinglayerdllapi.h>
+#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
+#include <editeng/editengdllapi.h>
+#include <editeng/forbiddencharacterstable.hxx>
+#include <i18nlangtag/i18nlangtagdllapi.h>
+#include <i18nlangtag/lang.h>
+#include <i18nlangtag/languagetag.hxx>
+#include <o3tl/cow_wrapper.hxx>
+#include <o3tl/enumarray.hxx>
+#include <o3tl/make_unique.hxx>
+#include <o3tl/typed_flags_set.hxx>
+#include <rsc/rsc-vcl-shared-types.hxx>
+#include <rsc/rscsfx.hxx>
 #include <sfx2/app.hxx>
+#include <sfx2/basedlgs.hxx>
 #include <sfx2/bindings.hxx>
+#include <sfx2/chalign.hxx>
 #include <sfx2/childwin.hxx>
+#include <sfx2/ctrlitem.hxx>
 #include <sfx2/dinfdlg.hxx>
 #include <sfx2/dispatch.hxx>
-#include <sfx2/docfac.hxx>
-#include <sfx2/docfile.hxx>
-#include <sfx2/imagemgr.hxx>
-#include <sfx2/infobar.hxx>
+#include <sfx2/dllapi.h>
+#include <sfx2/frame.hxx>
 #include <sfx2/minfitem.hxx>
-#include <sfx2/objface.hxx>
+#include <sfx2/module.hxx>
 #include <sfx2/objsh.hxx>
-#include <sfx2/passwd.hxx>
 #include <sfx2/printer.hxx>
 #include <sfx2/request.hxx>
-#include <sfx2/sfxmodelfactory.hxx>
-#include <sfx2/signaturestate.hxx>
-#include <sfx2/viewfac.hxx>
+#include <sfx2/sfxstatuslistener.hxx>
+#include <sfx2/sfxuno.hxx>
+#include <sfx2/shell.hxx>
+#include <sfx2/stbitem.hxx>
 #include <sfx2/viewfrm.hxx>
+#include <sot/formats.hxx>
+#include <svl/SfxBroadcaster.hxx>
 #include <svl/aeitem.hxx>
+#include <svl/cenumitm.hxx>
+#include <svl/cintitem.hxx>
+#include <svl/custritm.hxx>
+#include <svl/eitem.hxx>
+#include <svl/hint.hxx>
 #include <svl/intitem.hxx>
-#include <svl/itempool.hxx>
 #include <svl/itemset.hxx>
+#include <svl/languageoptions.hxx>
+#include <svl/lstner.hxx>
+#include <svl/poolitem.hxx>
+#include <svl/smplhint.hxx>
 #include <svl/srchitem.hxx>
 #include <svl/stritem.hxx>
-#include <svl/urihelper.hxx>
+#include <svl/style.hxx>
+#include <svl/stylesheetuser.hxx>
+#include <svl/svldllapi.h>
+#include <svl/undo.hxx>
 #include <svl/visitem.hxx>
 #include <svl/whiter.hxx>
-#include <svtools/imagemgr.hxx>
-#include <svtools/langtab.hxx>
-#include <svtools/svlbitm.hxx>
-#include <svtools/textwindowpeer.hxx>
+#include <svtools/colorcfg.hxx>
+#include <svtools/framestatuslistener.hxx>
+#include <svtools/grfmgr.hxx>
+#include <svtools/imgdef.hxx>
+#include <svtools/optionsdrawinglayer.hxx>
+#include <svtools/statusbarcontroller.hxx>
+#include <svtools/svtdllapi.h>
+#include <svtools/toolboxcontroller.hxx>
+#include <svtools/transfer.hxx>
+#include <svtools/treelist.hxx>
+#include <svtools/treelistentries.hxx>
 #include <svtools/treelistentry.hxx>
-#include <svx/insctrl.hxx>
-#include <svx/langbox.hxx>
-#include <svx/passwd.hxx>
-#include <svx/pszctrl.hxx>
-#include <svx/sdrpaintwindow.hxx>
-#include <svx/srchdlg.hxx>
-#include <svx/svditer.hxx>
-#include <svx/svdview.hxx>
-#include <svx/tbcontrl.hxx>
-#include <svx/xmlsecctrl.hxx>
-#include <toolkit/awt/vclxdevice.hxx>
-#include <toolkit/awt/vclxfont.hxx>
-#include <toolkit/helper/convert.hxx>
-#include <toolkit/helper/externallock.hxx>
+#include <svtools/valueset.hxx>
+#include <svtools/viewdataentry.hxx>
+#include <svx/Palette.hxx>
+#include <svx/SvxColorValueSet.hxx>
+#include <svx/XPropertyEntry.hxx>
+#include <svx/grfcrop.hxx>
+#include <svx/ipolypolygoneditorcontroller.hxx>
+#include <svx/itextprovider.hxx>
+#include <svx/pageitem.hxx>
+#include <svx/sdangitm.hxx>
+#include <svx/sdasaitm.hxx>
+#include <svx/sdasitm.hxx>
+#include <svx/sderitm.hxx>
+#include <svx/sdgcoitm.hxx>
+#include <svx/sdgcpitm.hxx>
+#include <svx/sdggaitm.hxx>
+#include <svx/sdginitm.hxx>
+#include <svx/sdgluitm.hxx>
+#include <svx/sdgmoitm.hxx>
+#include <svx/sdgtritm.hxx>
+#include <svx/sdmetitm.hxx>
+#include <svx/sdooitm.hxx>
+#include <svx/sdprcitm.hxx>
+#include <svx/sdr/animation/scheduler.hxx>
+#include <svx/sdr/overlay/overlayobject.hxx>
+#include <svx/sdr/overlay/overlayobjectlist.hxx>
+#include <svx/sdrobjectuser.hxx>
+#include <svx/sdshcitm.hxx>
+#include <svx/sdshitm.hxx>
+#include <svx/sdshtitm.hxx>
+#include <svx/sdsxyitm.hxx>
+#include <svx/sdtaaitm.hxx>
+#include <svx/sdtacitm.hxx>
+#include <svx/sdtaditm.hxx>
+#include <svx/sdtagitm.hxx>
+#include <svx/sdtaiitm.hxx>
+#include <svx/sdtaitm.hxx>
+#include <svx/sdtakitm.hxx>
+#include <svx/sdtayitm.hxx>
+#include <svx/sdtcfitm.hxx>
+#include <svx/sdtditm.hxx>
+#include <svx/sdtfsitm.hxx>
+#include <svx/sdtmfitm.hxx>
+#include <svx/sdynitm.hxx>
+#include <svx/selectioncontroller.hxx>
+#include <svx/shapeproperty.hxx>
+#include <svx/svdattr.hxx>
+#include <svx/svddef.hxx>
+#include <svx/svddrag.hxx>
+#include <svx/svddrgv.hxx>
+#include <svx/svdedtv.hxx>
+#include <svx/svdedxv.hxx>
+#include <svx/svdglev.hxx>
+#include <svx/svdglue.hxx>
+#include <svx/svdhdl.hxx>
+#include <svx/svdhlpln.hxx>
+#include <svx/svdlayer.hxx>
+#include <svx/svdmark.hxx>
+#include <svx/svdmodel.hxx>
+#include <svx/svdmrkv.hxx>
+#include <svx/svdoattr.hxx>
+#include <svx/svdobj.hxx>
+#include <svx/svdoedge.hxx>
+#include <svx/svdotext.hxx>
+#include <svx/svdpagv.hxx>
+#include <svx/svdpntv.hxx>
+#include <svx/svdpoev.hxx>
+#include <svx/svdsnpv.hxx>
+#include <svx/svdsob.hxx>
+#include <svx/svdtext.hxx>
+#include <svx/svdtrans.hxx>
+#include <svx/svdtypes.hxx>
+#include <svx/svdxcgv.hxx>
+#include <svx/svxdllapi.h>
+#include <svx/tbxcolorupdate.hxx>
+#include <svx/xcolit.hxx>
+#include <svx/xdash.hxx>
+#include <svx/xdef.hxx>
+#include <svx/xenum.hxx>
+#include <svx/xfillit0.hxx>
+#include <svx/xflasit.hxx>
+#include <svx/xgrad.hxx>
+#include <svx/xhatch.hxx>
+#include <svx/xit.hxx>
+#include <svx/xlineit0.hxx>
+#include <svx/xlnasit.hxx>
+#include <svx/xpoly.hxx>
+#include <svx/xtable.hxx>
+#include <svx/xtextit0.hxx>
+#include <toolkit/dllapi.h>
 #include <toolkit/helper/vclunohelper.hxx>
+#include <tools/color.hxx>
+#include <tools/contnr.hxx>
+#include <tools/date.hxx>
+#include <tools/datetime.hxx>
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
-#include <tools/multisel.hxx>
+#include <tools/errinf.hxx>
+#include <tools/fldunit.hxx>
+#include <tools/fontenum.hxx>
+#include <tools/fract.hxx>
+#include <tools/gen.hxx>
+#include <tools/globname.hxx>
+#include <tools/lineend.hxx>
+#include <tools/link.hxx>
+#include <tools/mapunit.hxx>
+#include <tools/poly.hxx>
+#include <tools/rc.hxx>
+#include <tools/ref.hxx>
 #include <tools/resary.hxx>
+#include <tools/resid.hxx>
+#include <tools/resmgr.hxx>
+#include <tools/solar.h>
+#include <tools/stream.hxx>
+#include <tools/svborder.hxx>
+#include <tools/time.hxx>
+#include <tools/toolsdllapi.h>
 #include <tools/urlobj.hxx>
-#include <ucbhelper/content.hxx>
-#include <unotools/accessiblerelationsethelper.hxx>
-#include <unotools/accessiblestatesethelper.hxx>
-#include <unotools/collatorwrapper.hxx>
-#include <unotools/moduleoptions.hxx>
-#include <unotools/pathoptions.hxx>
-#include <unotools/sharedunocomponent.hxx>
-#include <unotools/syslocale.hxx>
-#include <vcl/help.hxx>
-#include <vcl/layout.hxx>
-#include <vcl/msgbox.hxx>
-#include <vcl/scrbar.hxx>
-#include <vcl/seleng.hxx>
-#include <vcl/settings.hxx>
-#include <vcl/stdtext.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/syswin.hxx>
-#include <vcl/taskpanelist.hxx>
-#include <vcl/toolbox.hxx>
-#include <vcl/txtattr.hxx>
-#include <vcl/unohelp.hxx>
-#include <vcl/xtextedt.hxx>
-#include <vector>
-#include <xmlscript/xml_helper.hxx>
+#include <tools/weakbase.h>
+#include <tools/weakbase.hxx>
+#include <tools/wintypes.hxx>
+#include <typelib/typeclass.h>
+#include <typelib/typedescription.h>
+#include <typelib/uik.h>
+#include <ucbhelper/ucbhelperdllapi.h>
+#include <uno/any2.h>
+#include <uno/data.h>
+#include <uno/sequence2.h>
+#include <unotools/configitem.hxx>
+#include <unotools/fontdefs.hxx>
+#include <unotools/options.hxx>
+#include <unotools/readwritemutexguard.hxx>
+#include <unotools/unotoolsdllapi.h>
 #include <xmlscript/xmldlg_imexp.hxx>
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basegfx/inc/pch/precompiled_basegfx.hxx b/basegfx/inc/pch/precompiled_basegfx.hxx
index b13cf78..1590126 100644
--- a/basegfx/inc/pch/precompiled_basegfx.hxx
+++ b/basegfx/inc/pch/precompiled_basegfx.hxx
@@ -8,57 +8,76 @@
  */
 
 /*
- This file has been autogenerated by update_pch.sh . It is possible to edit it
- manually (such as when an include file has been moved/renamed/removed. All such
+ This file has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
  manual changes will be rewritten by the next run of update_pch.sh (which presumably
  also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2015-11-14 14:16:28 using:
+ ./bin/update_pch basegfx basegfx --cutoff=3 --exclude:system --exclude:module --include:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./basegfx/inc/pch/precompiled_basegfx.hxx "/opt/lo/bin/make basegfx.build" --find-conflicts
 */
 
 #include <algorithm>
-#include <boost/tuple/tuple.hpp>
-#include <boost/noncopyable.hpp>
-#include <com/sun/star/awt/Point.hpp>
-#include <com/sun/star/awt/Rectangle.hpp>
-#include <com/sun/star/awt/Size.hpp>
-#include <com/sun/star/drawing/DoubleSequence.hpp>
-#include <com/sun/star/drawing/FlagSequence.hpp>
-#include <com/sun/star/drawing/LineCap.hpp>
-#include <com/sun/star/drawing/PointSequence.hpp>
-#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
-#include <com/sun/star/geometry/AffineMatrix2D.hpp>
-#include <com/sun/star/geometry/AffineMatrix3D.hpp>
-#include <com/sun/star/geometry/IntegerPoint2D.hpp>
-#include <com/sun/star/geometry/IntegerRectangle2D.hpp>
-#include <com/sun/star/geometry/IntegerSize2D.hpp>
-#include <com/sun/star/geometry/Matrix2D.hpp>
-#include <com/sun/star/geometry/RealBezierSegment2D.hpp>
-#include <com/sun/star/geometry/RealPoint2D.hpp>
-#include <com/sun/star/geometry/RealRectangle2D.hpp>
-#include <com/sun/star/geometry/RealRectangle3D.hpp>
-#include <com/sun/star/geometry/RealSize2D.hpp>
-#include <com/sun/star/rendering/CompositeOperation.hpp>
-#include <com/sun/star/rendering/RenderState.hpp>
-#include <com/sun/star/rendering/ViewState.hpp>
-#include <com/sun/star/rendering/XCanvas.hpp>
-#include <com/sun/star/rendering/XGraphicDevice.hpp>
-#include <com/sun/star/rendering/XPolyPolygon2D.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <comphelper/sequence.hxx>
-#include <cppuhelper/supportsservice.hxx>
-#include <cstdio>
-#include <deque>
-#include <functional>
+#include <cassert>
+#include <cstddef>
+#include <cstdlib>
 #include <limits>
-#include <list>
 #include <numeric>
-#include <o3tl/vector_pool.hxx>
+#include <ostream>
+#include <sstream>
+#include <string>
+#include <vector>
+#include <boost/next_prior.hpp>
 #include <osl/diagnose.h>
+#include <osl/interlck.h>
 #include <rtl/instance.hxx>
 #include <rtl/math.hxx>
 #include <rtl/ustrbuf.hxx>
-#include <rtl/ustring.hxx>
+#include <sal/config.h>
+#include <sal/detail/log.h>
 #include <sal/log.hxx>
-#include <utility>
-#include <vector>
+#include <sal/saldllapi.h>
+#include <sal/types.h>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/genfunc.hxx>
+#include <cppu/unotype.hxx>
+#include <typelib/typedescription.h>
+#include <uno/data.h>
+#include <basegfx/basegfxdllapi.h>
+#include <basegfx/color/bcolor.hxx>
+#include <basegfx/curve/b2dcubicbezier.hxx>
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <basegfx/matrix/b3dhommatrix.hxx>
+#include <basegfx/numeric/ftools.hxx>
+#include <basegfx/point/b2dpoint.hxx>
+#include <basegfx/point/b2ipoint.hxx>
+#include <basegfx/point/b3dpoint.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/polygon/b2dpolygoncutandtouch.hxx>
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <basegfx/polygon/b3dpolygon.hxx>
+#include <basegfx/polygon/b3dpolypolygon.hxx>
+#include <basegfx/range/b2dpolyrange.hxx>
+#include <basegfx/range/b2drange.hxx>
+#include <basegfx/range/b2drangeclipper.hxx>
+#include <basegfx/range/b3drange.hxx>
+#include <basegfx/range/basicrange.hxx>
+#include <basegfx/tuple/b2dtuple.hxx>
+#include <basegfx/tuple/b2i64tuple.hxx>
+#include <basegfx/tuple/b2ituple.hxx>
+#include <basegfx/tuple/b3dtuple.hxx>
+#include <basegfx/tuple/b3ituple.hxx>
+#include <basegfx/vector/b2dvector.hxx>
+#include <basegfx/vector/b2enums.hxx>
+#include <basegfx/vector/b3dvector.hxx>
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/inc/pch/precompiled_sb.hxx b/basic/inc/pch/precompiled_sb.hxx
index a10d094..f7a0d4d 100644
--- a/basic/inc/pch/precompiled_sb.hxx
+++ b/basic/inc/pch/precompiled_sb.hxx
@@ -8,78 +8,90 @@
  */
 
 /*
- This file has been autogenerated by update_pch.sh . It is possible to edit it
- manually (such as when an include file has been moved/renamed/removed. All such
+ This file has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
  manual changes will be rewritten by the next run of update_pch.sh (which presumably
  also fixes all possible problems, so it's usually better to use it).
+
+ Generated on 2015-11-14 14:16:28 using:
+ ./bin/update_pch basic sb --cutoff=2 --exclude:system --exclude:module --include:local
+
+ If after updating build fails, use the following command to locate conflicting headers:
+ ./bin/update_pch_bisect ./basic/inc/pch/precompiled_sb.hxx "/opt/lo/bin/make basic.build" --find-conflicts
 */
 
-#include "math.h"
-#include <boost/optional.hpp>
-#include <memory>
-#include <com/sun/star/bridge/oleautomation/Decimal.hpp>
-#include <com/sun/star/bridge/oleautomation/XAutomationObject.hpp>
-#include <com/sun/star/i18n/LocaleCalendar2.hpp>
-#include <com/sun/star/lang/Locale.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/script/XErrorQuery.hpp>
-#include <com/sun/star/sheet/XFunctionAccess.hpp>
-#include <com/sun/star/ucb/SimpleFileAccess.hpp>
-#include <com/sun/star/uno/Sequence.hxx>
-#include <com/sun/star/uno/XInterface.hpp>
-#include <com/sun/star/util/DateTime.hpp>
-#include <comphelper/processfactory.hxx>
-#include <comphelper/string.hxx>
+#include <cassert>
 #include <config_features.h>
-#include <config_version.h>
 #include <cstddef>
+#include <cstdlib>
 #include <ctype.h>
-#include <errno.h>
-#include <float.h>
-#include <i18nlangtag/lang.h>
-#include <iomanip>
-#include <list>
 #include <math.h>
-#include <ooo/vba/XHelperInterface.hpp>
+#include <memory>
+#include <new>
+#include <ostream>
+#include <sstream>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <string>
+#include <boost/optional.hpp>
 #include <osl/file.hxx>
+#include <osl/mutex.hxx>
 #include <osl/process.h>
+#include <osl/thread.h>
 #include <osl/time.h>
-#include <random>
 #include <rtl/character.hxx>
-#include <rtl/instance.hxx>
 #include <rtl/math.hxx>
 #include <rtl/strbuf.hxx>
+#include <rtl/string.h>
 #include <rtl/string.hxx>
+#include <rtl/stringutils.hxx>
+#include <rtl/textenc.h>
 #include <rtl/ustrbuf.hxx>
 #include <rtl/ustring.hxx>
 #include <sal/config.h>
+#include <sal/detail/log.h>
 #include <sal/log.hxx>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <sal/saldllapi.h>
+#include <sal/types.h>
+#include <vcl/dllapi.h>
+#include <vcl/mapmod.hxx>
+#include <vcl/msgbox.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/svapp.hxx>
+#include <basrid.hxx>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/i18n/KCharacterType.hpp>
+#include <com/sun/star/i18n/KParseTokens.hpp>
+#include <com/sun/star/i18n/KParseType.hpp>
+#include <com/sun/star/i18n/ParseResult.hpp>
+#include <com/sun/star/i18n/XCharacterClassification.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/util/DateTime.hpp>
+#include <comphelper/processfactory.hxx>
+#include <comphelper/string.hxx>
+#include <i18nlangtag/lang.h>
+#include <i18nlangtag/languagetag.hxx>
+#include <sbobjmod.hxx>
+#include <sbxbase.hxx>
 #include <svl/SfxBroadcaster.hxx>
 #include <svl/zforlist.hxx>
-#include <tools/color.hxx>
-#include <tools/date.hxx>
 #include <tools/debug.hxx>
 #include <tools/errcode.hxx>
-#include <tools/fract.hxx>
-#include <tools/shl.hxx>
+#include <tools/link.hxx>
+#include <tools/mapunit.hxx>
 #include <tools/stream.hxx>
+#include <tools/toolsdllapi.h>
 #include <tools/urlobj.hxx>
-#include <tools/wintypes.hxx>
-#include <tools/wldcrd.hxx>
 #include <unotools/charclass.hxx>
-#include <unotools/syslocale.hxx>
-#include <unotools/ucbstreamhelper.hxx>
-#include <vcl/dibtools.hxx>
-#include <vcl/jobset.hxx>
-#include <vcl/mapmod.hxx>
-#include <vcl/msgbox.hxx>
-#include <vcl/settings.hxx>
-#include <vcl/sound.hxx>
-#include <vcl/svapp.hxx>
-#include <vcl/timer.hxx>
-#include <vcl/wrkwin.hxx>
+#include <unotools/unotoolsdllapi.h>
+#include <basic/basicdllapi.h>
+#include <basic/sbuno.hxx>
+#include <basic/sbx.hxx>
+#include <basic/sbxfac.hxx>
+#include <basic/sbxform.hxx>
+#include <basic/sbxobj.hxx>
+#include <basic/sbxvar.hxx>
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bin/update_pch b/bin/update_pch
new file mode 100755
index 0000000..fa2294d
--- /dev/null
+++ b/bin/update_pch
@@ -0,0 +1,1177 @@
+#! /usr/bin/env python
+# -*- Mode: python; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+"""
+This script generates precompiled headers for a given
+module and library.
+
+Given a gmake makefile that belongs to some LO module:
+1) Process the makefile to find source files (process_makefile).
+2) For every source file, find all includes (process_source).
+3) Uncommon and rare includes are filtered (remove_rare).
+4) Conflicting headers are excluded (filter_ignore).
+5) Local files to the source are excluded (Filter_Local).
+6) Fixup missing headers that sources expect (fixup).
+7) The resulting includes are sorted by category (sort_by_category).
+8) The pch file is generated (generate).
+"""
+
+import sys
+import re
+import os
+import unittest
+
+CUTOFF = 1
+EXCLUDE_MODULE = False
+EXCLUDE_LOCAL = False
+EXCLUDE_SYSTEM = True
+SILENT = False
+
+# System includes: oox, sal, sd, svl, vcl
+
+INCLUDE = False
+EXCLUDE = True
+DEFAULTS = \
+{
+#    module.library : (min, system, module, local), best time
+    'accessibility.acc'                 : ( 4, EXCLUDE, INCLUDE, INCLUDE), #   7.8
+    'basctl.basctl'                     : ( 3, EXCLUDE, INCLUDE, EXCLUDE), #  11.9
+    'basegfx.basegfx'                   : ( 3, EXCLUDE, EXCLUDE, INCLUDE), #   3.8
+    'basic.sb'                          : ( 2, EXCLUDE, EXCLUDE, INCLUDE), #  10.7
+    'chart2.chartcontroller'            : ( 6, EXCLUDE, INCLUDE, INCLUDE), #  18.4
+    'chart2.chartcore'                  : ( 3, EXCLUDE, EXCLUDE, INCLUDE), #  22.5
+    'chart2.chartopengl'                : (12, EXCLUDE, EXCLUDE, EXCLUDE), #   5.3
+    'comphelper.comphelper'             : ( 4, EXCLUDE, INCLUDE, INCLUDE), #   7.6
+    'configmgr.configmgr'               : ( 6, EXCLUDE, INCLUDE, INCLUDE), #   6.0
+    'connectivity.ado'                  : ( 2, EXCLUDE, EXCLUDE, EXCLUDE), #   6.4
+    'connectivity.calc'                 : ( 2, EXCLUDE, EXCLUDE, EXCLUDE), #   4.6
+    'connectivity.dbase'                : ( 2, EXCLUDE, INCLUDE, INCLUDE), #   5.2
+    'connectivity.dbpool2'              : ( 5, EXCLUDE, INCLUDE, EXCLUDE), #   3.0
+    'connectivity.dbtools'              : ( 2, EXCLUDE, EXCLUDE, INCLUDE), #   0.8
+    'connectivity.file'                 : ( 2, EXCLUDE, INCLUDE, EXCLUDE), #   5.1
+    'connectivity.firebird_sdbc'        : ( 2, EXCLUDE, EXCLUDE, EXCLUDE), #   5.1
+    'connectivity.flat'                 : ( 2, EXCLUDE, INCLUDE, INCLUDE), #   4.6
+    'connectivity.mysql'                : ( 4, EXCLUDE, INCLUDE, EXCLUDE), #   3.4
+    'connectivity.odbc'                 : ( 2, EXCLUDE, EXCLUDE, INCLUDE), #   5.0
+    'connectivity.postgresql-sdbc-impl' : ( 3, EXCLUDE, EXCLUDE, EXCLUDE), #   6.7
+    'cppcanvas.cppcanvas'               : (11, EXCLUDE, INCLUDE, INCLUDE), #   4.8
+    'cppuhelper.cppuhelper'             : ( 3, EXCLUDE, EXCLUDE, EXCLUDE), #   4.6
+    'cui.cui'                           : ( 8, EXCLUDE, INCLUDE, EXCLUDE), #  19.7
+    'dbaccess.dba'                      : ( 6, EXCLUDE, INCLUDE, INCLUDE), #  13.8
+    'dbaccess.dbaxml'                   : ( 2, EXCLUDE, EXCLUDE, EXCLUDE), #   6.5
+    'dbaccess.dbmm'                     : (10, EXCLUDE, INCLUDE, EXCLUDE), #   4.3
+    'dbaccess.dbu'                      : (12, EXCLUDE, EXCLUDE, EXCLUDE), #  23.6
+    'dbaccess.sdbt'                     : ( 1, EXCLUDE, INCLUDE, EXCLUDE), #   2.9
+    'desktop.deployment'                : ( 3, EXCLUDE, EXCLUDE, EXCLUDE), #   6.1
+    'desktop.deploymentgui'             : ( 3, EXCLUDE, EXCLUDE, EXCLUDE), #   5.7
+    'desktop.deploymentmisc'            : ( 3, EXCLUDE, EXCLUDE, EXCLUDE), #   3.4
+    'desktop.sofficeapp'                : ( 6, EXCLUDE, INCLUDE, INCLUDE), #   6.5
+    'drawinglayer.drawinglayer'         : ( 4, EXCLUDE, EXCLUDE, EXCLUDE), #   7.4
+    'editeng.editeng'                   : ( 5, EXCLUDE, INCLUDE, EXCLUDE), #  13.0
+    'forms.frm'                         : ( 2, EXCLUDE, EXCLUDE, EXCLUDE), #  14.2
+    'framework.fwe'                     : (10, EXCLUDE, INCLUDE, EXCLUDE), #   5.5
+    'framework.fwi'                     : ( 9, EXCLUDE, INCLUDE, EXCLUDE), #   3.4
+    'framework.fwk'                     : ( 7, EXCLUDE, INCLUDE, INCLUDE), #  14.8
+    'framework.fwl'                     : ( 5, EXCLUDE, INCLUDE, INCLUDE), #   5.1
+    'hwpfilter.hwp'                     : ( 3, EXCLUDE, INCLUDE, INCLUDE), #   6.0
+    'lotuswordpro.lwpft'                : ( 2, EXCLUDE, EXCLUDE, EXCLUDE), #  11.6
+    'oox.oox'                           : ( 6, EXCLUDE, EXCLUDE, INCLUDE), #  28.2
+    'package.package2'                  : ( 3, EXCLUDE, INCLUDE, INCLUDE), #   4.5
+    'package.xstor'                     : ( 2, EXCLUDE, INCLUDE, EXCLUDE), #   3.8
+    'reportdesign.rpt'                  : ( 9, EXCLUDE, INCLUDE, INCLUDE), #   9.4
+    'reportdesign.rptui'                : ( 4, EXCLUDE, INCLUDE, INCLUDE), #  13.1
+    'reportdesign.rptxml'               : ( 2, EXCLUDE, EXCLUDE, INCLUDE), #   7.6
+    'sal.sal'                           : ( 5, EXCLUDE, INCLUDE, INCLUDE), #   4.2
+    'sc.sc'                             : (12, EXCLUDE, INCLUDE, INCLUDE), #  92.6
+    'sc.scfilt'                         : ( 4, EXCLUDE, EXCLUDE, INCLUDE), #  39.9
+    'sc.scui'                           : ( 1, EXCLUDE, EXCLUDE, INCLUDE), #  15.0
+    'sc.vbaobj'                         : ( 1, EXCLUDE, EXCLUDE, INCLUDE), #  17.3
+    'sd.sd'                             : ( 4, EXCLUDE, EXCLUDE, INCLUDE), #  47.4
+    'sd.sdui'                           : ( 4, EXCLUDE, INCLUDE, INCLUDE), #   9.4
+    'sdext.PresentationMinimizer'       : ( 2, EXCLUDE, INCLUDE, INCLUDE), #   4.1
+    'sdext.PresenterScreen'             : ( 2, EXCLUDE, INCLUDE, EXCLUDE), #   7.1
+    'sfx2.sfx'                          : ( 3, EXCLUDE, EXCLUDE, EXCLUDE), #  27.4
+    'slideshow.slideshow'               : ( 4, EXCLUDE, INCLUDE, EXCLUDE), #  10.8
+    'sot.sot'                           : ( 5, EXCLUDE, EXCLUDE, INCLUDE), #   3.1
+    'starmath.sm'                       : ( 5, EXCLUDE, EXCLUDE, INCLUDE), #  10.9
+    'svgio.svgio'                       : ( 8, EXCLUDE, EXCLUDE, INCLUDE), #   4.3
+    'svl.svl'                           : ( 6, EXCLUDE, EXCLUDE, EXCLUDE), #   7.6
+    'svtools.svt'                       : ( 4, EXCLUDE, INCLUDE, EXCLUDE), #  17.6
+    'svx.svx'                           : ( 3, EXCLUDE, EXCLUDE, INCLUDE), #  20.7
+    'svx.svxcore'                       : ( 7, EXCLUDE, INCLUDE, EXCLUDE), #  37.0
+    'sw.msword'                         : ( 4, EXCLUDE, INCLUDE, INCLUDE), #  22.4
+    'sw.sw'                             : (11, EXCLUDE, EXCLUDE, INCLUDE), # 212.3
+    'sw.swui'                           : ( 3, EXCLUDE, INCLUDE, INCLUDE), #  26.1
+    'sw.vbaswobj'                       : ( 4, EXCLUDE, INCLUDE, INCLUDE), #  13.1
+    'tools.tl'                          : ( 5, EXCLUDE, EXCLUDE, EXCLUDE), #   4.2
+    'unotools.utl'                      : ( 3, EXCLUDE, EXCLUDE, INCLUDE), #   7.0
+    'unoxml.unoxml'                     : ( 1, EXCLUDE, EXCLUDE, EXCLUDE), #   4.6
+    'uui.uui'                           : ( 4, EXCLUDE, EXCLUDE, EXCLUDE), #   4.9
+    'vbahelper.msforms'                 : ( 3, EXCLUDE, INCLUDE, INCLUDE), #   5.2
+    'vbahelper.vbahelper'               : ( 3, EXCLUDE, EXCLUDE, INCLUDE), #   7.0
+    'vcl.vcl'                           : ( 6, EXCLUDE, INCLUDE, INCLUDE), #  35.7
+    'writerfilter.writerfilter'         : ( 3, EXCLUDE, EXCLUDE, INCLUDE), #  15.8
+    'xmloff.xo'                         : ( 7, EXCLUDE, INCLUDE, INCLUDE), #  22.1
+    'xmloff.xof'                        : ( 1, EXCLUDE, EXCLUDE, INCLUDE), #   4.4
+    'xmlscript.xmlscript'               : ( 4, EXCLUDE, EXCLUDE, INCLUDE), #   3.6
+    'xmlsecurity.xmlsecurity'           : ( 6, EXCLUDE, INCLUDE, INCLUDE), #   5.1
+    'xmlsecurity.xsec_fw'               : ( 2, EXCLUDE, INCLUDE, EXCLUDE), #   2.7
+    'xmlsecurity.xsec_xmlsec'           : ( 2, EXCLUDE, INCLUDE, INCLUDE), #   4.4
+}
+
+def remove_rare(raw, min_use=-1):
+    """ Remove headers not commonly included.
+        The minimum threshold is min_use.
+    """
+    # The minimum number of times a header
+    # must be included to be in the PCH.
+    min_use = min_use if min_use >= 0 else CUTOFF
+
+    out = []
+    if not raw or not len(raw):
+        return out
+
+    inc = sorted(raw)
+    last = inc[0]
+    count = 1
+    for x in range(1, len(inc)):
+        i = inc[x]
+        if i == last:
+            count += 1
+        else:
+            if count >= min_use:
+                out.append(last)
+            last = i
+            count = 1
+
+    # Last group.
+    if count >= min_use:
+        out.append(last)
+
+    return out
+
+def process_list(list, callable):
+    """ Given a list and callable
+        we pass each entry through
+        the callable and only add to
+        the output if not blank.
+    """
+    out = []
+    for i in list:
+        line = callable(i)
+        if line and len(line):
+            out.append(line)
+    return out
+
+def find_files(path, recurse=True):
+    list = []
+    for root, dir, files in os.walk(path):
+        list += map(lambda x: os.path.join(root, x), files)
+    return list
+
+def get_filename(line):
+    """ Strips the line from the
+        '#include' and angled brakets
+        and return the filename only.
+    """
+    if not len(line) or line[0] != '#':
+        return line
+    return re.sub(r'(.*#include\s*)<(.*)>(.*)', r'\2', line)
+
+def is_c_runtime(inc):
+    """ Heuristic-based detection of C/C++
+        runtime headers.
+        They are all-lowercase, with .h or
+        no extension, filename only.
+    """
+    inc = get_filename(inc)
+
+    if inc.endswith('.hxx') or inc.endswith('.hpp'):
+        return False
+
+    for c in inc:
+        if c == '/':
+            return False
+        if c == '.':
+            return inc.endswith('.h')
+        if c.isupper():
+            return False
+
+    return True
+
+def sanitize(raw):
+    """ There are two forms of includes,
+        those with <> and "".
+        Technically, the difference is that
+        the compiler can use an internal
+        representation for an angled include,
+        such that it doesn't have to be a file.
+        For our purposes, there is no difference.
+        Here, we convert everything to angled.
+    """
+    if not raw or not len(raw):
+        return ''
+    raw = raw.strip()
+    if not len(raw):
+        return ''
+    return re.sub(r'(.*#include\s*)\"(.*)\"(.*)', r'#include <\2>', raw)
+
+class Filter_Local(object):
+    """ Filter headers local to a module.
+        allow_public: allows include/module/file.hxx
+                      #include <module/file.hxx>
+        allow_module: allows module/inc/file.hxx
+                      #include <file.hxx>
+        allow_locals: allows module/source/file.hxx and
+                             module/source/inc/file.hxx
+                      #include <file.hxx>
+    """
+    def __init__(self, root, module, allow_public=True, allow_module=True, allow_locals=True):
+        self.root = root
+        self.module = module
+        self.allow_public = allow_public
+        self.allow_module = allow_module
+        self.allow_locals = allow_locals
+        self.public_prefix = '<' + self.module + '/'
+
+        all = find_files(os.path.join(root, module))
+        self.module = []
+        self.locals = []
+        mod_prefix = module + '/inc/'
+        for i in all:
+            if mod_prefix in i:
+                self.module.append(i)
+            else:
+                self.locals.append(i)
+
+    def is_public(self, line):
+        return self.public_prefix in line
+
+    def is_module(self, line):
+        """ Returns True if in module/inc/... """
+        filename = get_filename(line)
+        for i in self.module:
+            if i.endswith(filename):
+                return True
+        return False
+
+    def is_local(self, line):
+        """ Returns True if in module/source/... """
+        filename = get_filename(line)
+        for i in self.locals:
+            if i.endswith(filename):
+                return True
+        return False
+
+    def is_external(self, line):
+        return is_c_runtime(line) and \
+               not self.is_public(line) and \
+               not self.is_module(line) and \
+               not self.is_local(line)
+
+    def find_local_file(self, line):
+        """ Finds the header file in the module dir,
+            but doesn't validate.
+        """
+        filename = get_filename(line)
+        for i in self.locals:
+            if i.endswith(filename):
+                return i
+        for i in self.module:
+            if i.endswith(filename):
+                return i
+        return None
+
+    def proc(self, line):
+        assert line and len(line)
+        assert line[0] != '<' and line[0] != '#'
+
+        filename = get_filename(line)
+
+        # Local with relative path.
+        if filename.startswith('..'):
+            # Exclude for now as we don't have cxx path.
+            return ''
+
+        # Locals are included first (by the compiler).
+        if self.is_local(filename):
+            return line if self.allow_locals and '/inc/' in filename else ''
+
+        # Module headers are next.
+        if self.is_module(filename):
+            return line if self.allow_module else ''
+
+        # Public headers are last.
+        if self.is_public(line):
+            return line if self.allow_public else ''
+
+        # Leave out potentially unrelated files local
+        # to some other module we can't include directly.
+        if '/' not in filename and not self.is_external(filename):
+            return ''
+
+        # Unfiltered.
+        return line
+
+def filter_ignore(line, module):
+    """ Filters includes from known
+        problematic ones.
+        Expects sanitized input.
+    """
+    assert line and len(line)
+
+    # Always include files without extension.
+    if '.' not in line:
+        return line
+
+    # Extract filenames for ease of comparison.
+    line = get_filename(line)
+
+    # Filter out all files that are not normal headers.
+    if not line.endswith('.h') and \
+       not line.endswith('.hxx') and \
+       not line.endswith('.hpp') and \
+       not line.endswith('.hdl'):
+       return ''
+
+    ignore_list = [
+            'LibreOfficeKit/LibreOfficeKitEnums.h', # Needs special directives
+            'LibreOfficeKit/LibreOfficeKitTypes.h', # Needs special directives
+            'jerror.h',     # c++ unfriendly
+            'jpeglib.h',    # c++ unfriendly
+            'svtools/editimplementation.hxx' # no direct include
+        ]
+
+    if module == 'accessibility':
+        ignore_list += [
+            # STR_SVT_ACC_LISTENTRY_SELCTED_STATE redefined from svtools.hrc
+            'accessibility/extended/textwindowaccessibility.hxx',
+            ]
+    if module == 'basic':
+        ignore_list += [
+            'basic/vbahelper.hxx',
+            ]
+    if module == 'connectivity':
+        ignore_list += [
+            'com/sun/star/beans/PropertyAttribute.hpp', # OPTIONAL defined via objbase.h
+            'com/sun/star/sdbcx/Privilege.hpp', # DELETE defined via objbase.h
+            ]
+    if module == 'reportdesign':
+        ignore_list += [
+            'editeng/eeitemid.hxx', # macro redefined in ui/misc/UITools.cxx
+            ]
+    if module == 'sc':
+        ignore_list += [
+            'progress.hxx', # special directives
+            'scslots.hxx',  # special directives
+           ]
+    if module == 'sd':
+        ignore_list += [
+            'sdgslots.hxx', # special directives
+            'sdslots.hxx',  # special directives
+            'svtools/sores.hxx', # redefines BMP_PLUGIN defined in svtools.hrc
+           ]
+    if module == 'sfx2':
+        ignore_list += [
+            'sfx2/recentdocsview.hxx', # Redefines ApplicationType defined in objidl.h
+            'sfx2/sidebar/Sidebar.hxx',
+            'sfx2/sidebar/UnoSidebar.hxx',
+            'sfxslots.hxx', # externally defined types
+            ]
+    if module == 'sot':
+        ignore_list += [
+            'sysformats.hxx',   # Windows headers
+            ]
+    if module == 'svx':
+        ignore_list += [
+            'tbunosearchcontrollers.hxx', # Anonymous namespace
+            ]
+    if module == 'sw':
+        ignore_list += [
+            'com/sun/star/ucb/NameClash.hpp', # conflicts with ERROR from Windows.h
+            ]
+    if module == 'vcl':
+        ignore_list += [
+            'accmgr.hxx',   # redefines ImplAccelList
+            'image.h',
+            'jobset.h',
+            'opengl/gdiimpl.hxx',
+            'opengl/salbmp.hxx',
+            'openglgdiimpl',   # ReplaceTextA
+            'printdlg.hxx',
+            'salinst.hxx',  # GetDefaultPrinterA
+            'salprn.hxx',   # SetPrinterDataA
+            'vcl/jobset.hxx',
+            'vcl/oldprintadaptor.hxx',
+            'vcl/opengl/OpenGLContext.hxx',
+            'vcl/print.hxx',
+            'vcl/prntypes.hxx', # redefines Orientation from filter/jpeg/Exif.hxx
+            'vcl/sysdata.hxx',
+            ]
+    if module == 'xmloff':
+        ignore_list += [
+            'SchXMLExport.hxx', # SchXMLAutoStylePoolP.hxx not found
+            'SchXMLImport.hxx', # enums redefined in draw\sdxmlimp_impl.hxx
+            'XMLEventImportHelper.hxx', # NameMap redefined in XMLEventExport.hxx
+            'xmloff/XMLEventExport.hxx', # enums redefined
+            ]
+
+    for i in ignore_list:
+        if line.startswith(i):
+            return ''
+        if i[0] == '*' and line.endswith(i[1:]):
+            return ''
+        if i[-1] == '*' and line.startswith(i[:-1]):
+            return ''
+
+    return line
+
+def fixup(includes, module):
+    """ Here we add any headers
+        necessary in the pch.
+        These could be known to be very
+        common but for technical reasons
+        left out of the pch by this generator.
+        Or, they could be missing from the
+        source files where they are used
+        (probably because they had been
+        in the old pch, they were missed).
+        Also, these could be headers
+        that make the build faster but
+        aren't added automatically.
+    """
+    fixes = []
+    def append(inc):
+        # Add a space to exclude from
+        # ignore bisecting.
+        line = ' #include <{}>'.format(inc)
+        try:
+            i = fixes.index(inc)
+            fixes[i] = inc
+        except:
+            fixes.append(inc)
+
+    if module == 'basctl':
+        if 'basslots.hxx' in includes:
+            append('sfx2/msg.hxx')
+
+    #if module == 'sc':
+    #    if 'scslots.hxx' in includes:
+    #        append('sfx2/msg.hxx')
+    return fixes
+
+def sort_by_category(list, module, filter_local):
+    """ Move all 'system' headers first.
+        Core files of osl, rtl, sal, next.
+        Everything non-module-specific third.
+        Last, module-specific headers.
+    """
+    sys = []
+    boo = []
+    cor = []
+    rst = []
+    mod = []
+
+    prefix = '<' + module + '/'
+    for i in list:
+        if is_c_runtime(i):
+            sys.append(i)
+        elif '<boost/' in i:
+            boo.append(i)
+        elif '<osl' in i or '<rtl' in i or '<sal' in i or '<vcl' in i:
+            cor.append(i)
+        elif prefix in i:
+            mod.append(i)
+        else:
+            rst.append(i)
+
+    out = []
+    out += sorted(sys)
+    out += sorted(boo)
+    out += sorted(cor)
+    out += sorted(rst)
+    out += sorted(mod)
+    return out
+
+def parse_makefile(groups, lines, lineno, lastif, ifstack):
+
+    inobjects = False
+    inelse = False
+    os_cond_re = re.compile('(ifeq|ifneq)\s*\(\$\(OS\)\,(\w*)\)')
+
+    line = lines[lineno]
+    if line.startswith('if'):
+        lastif = line
+        if ifstack == 0:
+            # Correction if first line is an if.
+            lineno = parse_makefile(groups, lines, lineno, line, ifstack+1)
+    else:
+        lineno -= 1
+
+    while lineno + 1 < len(lines):
+        lineno += 1
+        line = lines[lineno].strip()
+        line = line.rstrip('\\').strip()
+        #print('line #{}: {}'.format(lineno, line))
+        if len(line) == 0:
+            continue
+
+        if line == '))':
+            inobjects = False
+        elif 'add_exception_objects' in line or \
+             'add_cxxobject' in line:
+             inobjects = True
+             #print('inobjects')
+             #if ifstack and not SILENT:
+                #sys.stderr.write('Sources in a conditional, ignoring for now.\n')
+        elif line.startswith('if'):
+            lineno = parse_makefile(groups, lines, lineno, line, ifstack+1)
+            continue
+        elif line.startswith('endif'):
+            if ifstack:
+                return lineno
+            continue
+        elif line.startswith('else'):
+            inelse = True
+        elif inobjects:
+            if EXCLUDE_SYSTEM and ifstack:
+                continue
+            file = line + '.cxx'
+            if ',' in line or '(' in line or ')' in line:
+                #print('passing: ' + line)
+                pass # $if() probably, or something similar
+            else:
+                osname = ''
+                if lastif:
+                    if 'filter' in lastif:
+                        # We can't grok filter, yet.
+                        continue
+                    match = os_cond_re.match(lastif)
+                    if not match:
+                        # We only support OS conditionals.
+                        continue
+                    in_out = match.group(1)
+                    osname = match.group(2) if match else ''
+                    if (in_out == 'ifneq' and not inelse) or \
+                       (in_out == 'ifeq' and inelse):
+                        osname = '!' + osname
+
+                if osname not in groups:
+                    groups[osname] = []
+                groups[osname].append(file)
+
+    return groups
+
+def process_makefile(root, module, makefile):
+    """ Parse a gmake makefile and extract
+        source filenames from it.
+    """
+
+    filename = os.path.join(os.path.join(root, module), makefile)
+    if not os.path.isfile(filename):
+        sys.stderr.write('Error: Module {} has no makefile at {}.'.format(module, filename))
+
+    groups = {'':[], 'ANDROID':[], 'IOS':[], 'WNT':[], 'LINUX':[], 'MACOSX':[]}
+
+    with open(filename, 'r') as f:
+        lines = f.readlines()
+        groups = parse_makefile(groups, lines, lineno=0, lastif=None, ifstack=0)
+
+    return groups
+
+def process_source(root, module, filename, maxdepth=0):
+    """ Process a source file to extract
+        included headers.
+        For now, skip on compiler directives.
+        maxdepth is used when processing headers
+        which typically have protecting ifndef.
+    """
+
+    ifdepth = 0
+    lastif = ''
+    raw_includes = []
+    with open(filename, 'r') as f:
+        for line in f:
+            line = line.strip()
+            if line.startswith('#if'):
+                ifdepth += 1
+                lastif = line
+            elif line.startswith('#endif'):
+                ifdepth -= 1
+                lastif = '#if'
+            elif line.startswith('#include'):
+                if ifdepth <= maxdepth:
+                    line = sanitize(line)
+                    if line:
+                        line = get_filename(line)
+                    if line and len(line):
+                        raw_includes.append(line)
+                elif not SILENT:
+                    sys.stderr.write('#include in {} : {}\n'.format(lastif, line))
+
+    return raw_includes
+
+def explode(root, module, includes, tree, filter_local, recurse):
+    incpath = os.path.join(root, 'include')
+
+    for inc in includes:
+        filename = get_filename(inc)
+        if filename in tree or len(filter_local.proc(filename)) == 0:
+            continue
+
+        try:
+            # Module or Local header.
+            filepath = filter_local.find_local_file(inc)
+            if filepath:
+                #print('trying loc: ' + filepath)
+                incs = process_source(root, module, filepath, maxdepth=1)
+                incs = map(get_filename, incs)
+                incs = process_list(incs, lambda x: filter_ignore(x, module))
+                incs = process_list(incs, filter_local.proc)
+                tree[filename] = incs
+                if recurse:
+                    tree = explode(root, module, incs, tree, filter_local, recurse)
+                #print('{} => {}'.format(filepath, tree[filename]))
+                continue
+        except:
+            pass
+
+        try:
+            # Public header.
+            filepath = os.path.join(incpath, filename)
+            #print('trying pub: ' + filepath)
+            incs = process_source(root, module, filepath, maxdepth=1)
+            incs = map(get_filename, incs)
+            incs = process_list(incs, lambda x: filter_ignore(x, module))
+            incs = process_list(incs, filter_local.proc)
+            tree[filename] = incs
+            if recurse:
+                tree = explode(root, module, incs, tree, filter_local, recurse)
+            #print('{} => {}'.format(filepath, tree[filename]))
+            continue
+        except:
+            pass
+
+        # Failed, but remember to avoid searching again.
+        tree[filename] = []
+
+    return tree
+
+def make_command_line():
+    args = sys.argv[:]
+    # Remove command line flags and
+    # use internal flags.
+    for i in xrange(len(args)-1, 0, -1):
+        if args[i].startswith('--'):
+            args.pop(i)
+
+    args.append('--cutoff=' + str(CUTOFF))
+    if EXCLUDE_SYSTEM:
+        args.append('--exclude:system')
+    else:
+        args.append('--include:system')
+    if EXCLUDE_MODULE:
+        args.append('--exclude:module')
+    else:
+        args.append('--include:module')
+    if EXCLUDE_LOCAL:
+        args.append('--exclude:local')
+    else:
+        args.append('--include:local')
+
+    return ' '.join(args)
+
+def generate_includes(includes):
+    """Generates the include lines of the pch.
+    """
+    lines = []
+    for osname, group in includes.iteritems():
+        if not len(group):
+            continue
+
+        if len(osname):
+            not_eq = ''
+            if osname[0] == '!':
+                not_eq = '!'
+                osname = osname[1:]
+            lines.append('')
+            lines.append('#if {}defined({})'.format(not_eq, osname))
+
+        for i in group:
+            lines.append(i)
+
+        if len(osname):
+            lines.append('#endif')
+
+    return lines
+
+def generate(includes, libname, filename, module):
+    header = \
+"""/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+/*
+ This file has been autogenerated by update_pch.sh. It is possible to edit it
+ manually (such as when an include file has been moved/renamed/removed). All such
+ manual changes will be rewritten by the next run of update_pch.sh (which presumably
+ also fixes all possible problems, so it's usually better to use it).
+"""
+
+    footer = \
+"""
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+"""
+    import datetime
+
+    with open(filename, 'w') as f:
+        f.write(header)
+        f.write('\n Generated on {} using:\n {}\n'.format(
+                datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
+                make_command_line()))
+        f.write('\n If after updating build fails, use the following command to locate conflicting headers:\n ./bin/update_pch_bisect {} "/opt/lo/bin/make {}.build" --find-conflicts\n*/\n'.format(
+                filename, module))
+
+        # svx needs this (sendreportw32.cxx)
+        if module == 'svx' and libname == 'svx':
+            svx_define = """
+#ifdef WNT
+#define UNICODE
+#define _UNICODE
+#endif
+"""
+            f.write(svx_define)
+
+        # Dump the headers.
+        f.write('\n')
+        for i in includes:
+            f.write(i + '\n')
+
+        # ado needs to guard against macro polution
+        if module == 'connectivity' and libname == 'ado':
+            ado_define = """
+// Prevent windows header macro pollution.
+#undef OPTIONAL
+#undef DELETE
+"""
+            f.write(ado_define)
+
+        f.write(footer)
+
+def remove_from_tree(filename, tree):
+    # Remove this file, if top-level.
+    incs = tree.pop(filename, [])
+    for i in incs:
+        tree = remove_from_tree(i, tree)
+
+    # Also remove if included from another.
+    for (k, v) in tree.iteritems():
+        if filename in v:
+            v.remove(filename)
+
+    return tree
+
+def tree_to_list(includes, filename, tree):
+    if filename in includes:
+        return includes
+    includes.append(filename)
+    #incs = tree.pop(filename, [])
+    incs = tree[filename] if filename in tree else []
+    for i in incs:
+        tree_to_list(includes, i, tree)
+
+    return includes
+
+def promote(includes):
+    """ Common library headers are heavily
+        referenced, even if they are included
+        from a few places.
+        Here we separate them to promote
+        their inclusion in the final pch.
+    """
+    promo = []
+    for inc in includes:
+        if inc.startswith('boost') or \
+           inc.startswith('sal') or \
+           inc.startswith('osl') or \
+           inc.startswith('rtl'):
+            promo.append(inc)
+    return promo
+
+def make_pch_filename(root, module, libname):
+    """ PCH files are stored here:
+        <root>/<module>/inc/pch/precompiled_<libname>.hxx
+    """
+
+    path = os.path.join(root, module)
+    path = os.path.join(path, 'inc')
+    path = os.path.join(path, 'pch')
+    path = os.path.join(path, 'precompiled_' + libname + '.hxx')
+    return path
+
+def main():
+
+    global CUTOFF
+    global EXCLUDE_MODULE
+    global EXCLUDE_LOCAL
+    global EXCLUDE_SYSTEM
+    global SILENT
+
+    root = '.'
+    module = sys.argv[1]
+    libname = sys.argv[2]
+    header = make_pch_filename(root, module, libname)
+
+    if not os.path.exists(os.path.join(root, module)):
+        raise Exception('Error: module [' + str(module) +
+            '] not found. Not running from the root of LO repository?')
+
+    key = '{}.{}'.format(module, libname)
+    if key in DEFAULTS:
+        # Load the module-specific defaults.
+        CUTOFF = DEFAULTS[key][0]
+        EXCLUDE_SYSTEM = DEFAULTS[key][1]
+        EXCLUDE_MODULE = DEFAULTS[key][2]
+        EXCLUDE_LOCAL = DEFAULTS[key][3]
+
+    force_update = False
+    for x in xrange(3, len(sys.argv)):
+        i = sys.argv[x]
+        if i.startswith('--cutoff='):
+            CUTOFF = int(i.split('=')[1])
+        elif i.startswith('--exclude:'):
+            cat = i.split(':')[1]
+            if cat == 'module':
+                EXCLUDE_MODULE = True
+            elif cat == 'local':
+                EXCLUDE_LOCAL = True
+            elif cat == 'system':
+                EXCLUDE_SYSTEM = True
+        elif i.startswith('--include:'):
+            cat = i.split(':')[1]
+            if cat == 'module':
+                EXCLUDE_MODULE = False
+            elif cat == 'local':
+                EXCLUDE_LOCAL = False
+            elif cat == 'system':
+                EXCLUDE_SYSTEM = False
+        elif i == '--silent':
+            SILENT = True
+        elif i == '--force':
+            force_update = True
+        else:
+            sys.stderr.write('Unknown option [{}].'.format(i))
+            return 1
+
+    filter_local = Filter_Local(root, module, \
+                                not EXCLUDE_MODULE, \
+                                not EXCLUDE_LOCAL)
+
+    # Read input.
+    makefile = 'Library_{}.mk'.format(libname)
+    groups = process_makefile(root, module, makefile)
+
+    generic = []
+    for osname, group in groups.iteritems():
+        if not len(group):
+            continue
+
+        includes = []
+        for filename in group:
+            includes += process_source(root, module, filename)
+
+        # Save unique top-level includes.
+        unique = set(includes)
+        promoted = promote(unique)
+
+        # Process includes.
+        includes = remove_rare(includes)
+        includes = process_list(includes, lambda x: filter_ignore(x, module))
+        includes = process_list(includes, filter_local.proc)
+
+        # Remove the already included ones.
+        for inc in includes:
+            unique.discard(inc)
+
+        # Explode the excluded ones.
+        tree = {i:[] for i in includes}
+        tree = explode(root, module, unique, tree, filter_local, not EXCLUDE_MODULE)
+
+        # Remove the already included ones from the tree.
+        for inc in includes:
+            filename = get_filename(inc)
+            tree = remove_from_tree(filename, tree)
+
+        extra = []
+        for (k, v) in tree.iteritems():
+            extra += tree_to_list([], k, tree)
+
+        promoted += promote(extra)
+        promoted = process_list(promoted, lambda x: filter_ignore(x, module))
+        promoted = process_list(promoted, filter_local.proc)
+        promoted = set(promoted)
+        # If a promoted header includes others, remove the rest.
+        for (k, v) in tree.iteritems():
+            if k in promoted:
+                for i in v:
+                    promoted.discard(i)
+        includes += [x for x in promoted]
+
+        extra = remove_rare(extra)
+        extra = process_list(extra, lambda x: filter_ignore(x, module))
+        extra = process_list(extra, filter_local.proc)
+        includes += extra
+
+        includes = [x for x in set(includes)]
+        fixes = fixup(includes, module)
+        fixes = map(lambda x: '#include <' + x + '>', fixes)
+
+        includes = map(lambda x: '#include <' + x + '>', includes)
+        sorted = sort_by_category(includes, module, filter_local)
+        includes = fixes + sorted
+
+        if len(osname):
+            for i in generic:
+                if i in includes:
+                    includes.remove(i)
+
+        groups[osname] = includes
+        if not len(osname):
+            generic = includes
+
+    # Open the old pch and compare its contents
+    # with new includes.
+    # Clobber only if they are different.
+    with open(header, 'r') as f:
+        old_pch_lines = [x.strip() for x in f.readlines()]
+        new_lines = generate_includes(groups)
+        # Find the first include in the old pch.
+        start = -1
+        for i in xrange(len(old_pch_lines)):
+            if old_pch_lines[i].startswith('#include'):
+                start = i
+                break
+        # Clobber if there is a mismatch.
+        if force_update or start < 0 or (len(old_pch_lines) - start < len(new_lines)):
+            generate(new_lines, libname, header, module)
+            return 0
+        else:
+            for i in xrange(len(new_lines)):
+                if new_lines[i] != old_pch_lines[start + i]:
+                    generate(new_lines, libname, header, module)
+                    return 0
+            else:
+                # Identical, but see if new pch removed anything.
+                for i in xrange(start + len(new_lines), len(old_pch_lines)):
+                    if '#include' in old_pch_lines[i]:
+                        generate(new_lines, libname, header, module)
+                        return 0
+
+    # Didn't update.
+    return 1
+
+if __name__ == '__main__':
+    """ Process all the includes in a Module
+        to make into a PCH file.
+        Run without arguments for unittests,
+        and to see usage.
+    """
+
+    if len(sys.argv) >= 3:
+        status = main()
+        sys.exit(status)
+
+    print('Usage: {} <Module name> <Library name> [options]'.format(sys.argv[0]))
+    print('    Always run from the root of LO repository.\n')
+    print('    Options:')
+    print('    --cutoff=<count> - Threshold to excluding headers.')
+    print('    --exclude:<category> - Exclude category-specific headers.')
+    print('    --include:<category> - Include category-specific headers.')
+    print('    --force - Force updating the pch even when nothing changes.')
+    print('    Categories:')
+    print('         module - Headers in /inc directory of a module.')
+    print('         local  - Headers local to a source file.')
+    print('         system - Platform-specific headers.')
+    print('    --silent - print only errors.')
+    print('\nRunning unit-tests...')
+
+
+class TestMethods(unittest.TestCase):
+
+    def test_sanitize(self):
+        self.assertEqual(sanitize('#include "blah/file.cxx"'),
+                                '#include <blah/file.cxx>')
+        self.assertEqual(sanitize('  #include\t"blah/file.cxx" '),
+                                '#include <blah/file.cxx>')
+        self.assertEqual(sanitize('  '),
+                                '')
+
+    def test_filter_ignore(self):
+        self.assertEqual(filter_ignore('blah/file.cxx', 'mod'),
+                                     '')
+        self.assertEqual(filter_ignore('vector', 'mod'),
+                                     'vector')
+        self.assertEqual(filter_ignore('file.cxx', 'mod'),
+                                     '')
+
+    def test_remove_rare(self):
+        self.assertEqual(remove_rare([]),
+                                [])
+
+class TestMakefileParser(unittest.TestCase):
+
+    def setUp(self):
+        global EXCLUDE_SYSTEM
+        EXCLUDE_SYSTEM = False
+
+    def test_parse_singleline_eval(self):
+        source = "$(eval $(call gb_Library_Library,sal))"
+        lines = source.split('\n')
+        groups = {'':[]}
+        groups = parse_makefile(groups, lines, 0, None, 0)
+        self.assertEqual(len(groups), 1)
+        self.assertEqual(len(groups['']), 0)
+
+    def test_parse_multiline_eval(self):
+        source = """$(eval $(call gb_Library_set_include,sal,\\
+	$$(INCLUDE) \\
+	-I$(SRCDIR)/sal/inc \\
+))
+"""
+        lines = source.split('\n')
+        groups = {'':[]}
+        groups = parse_makefile(groups, lines, 0, None, 0)
+        self.assertEqual(len(groups), 1)
+        self.assertEqual(len(groups['']), 0)
+
+    def test_parse_multiline_eval_with_if(self):
+        source = """$(eval $(call gb_Library_add_defs,sal,\\
+	$(if $(filter $(OS),IOS), \\
+		-DNO_CHILD_PROCESSES \\
+	) \\
+))
+"""
+        lines = source.split('\n')
+        groups = {'':[]}
+        groups = parse_makefile(groups, lines, 0, None, 0)
+        self.assertEqual(len(groups), 1)
+        self.assertEqual(len(groups['']), 0)
+
+    def test_parse_multiline_add_with_if(self):
+        source = """$(eval $(call gb_Library_add_exception_objects,sal,\\
+	sal/osl/unx/time \\
+        $(if $(filter DESKTOP,$(BUILD_TYPE)), sal/osl/unx/salinit) \\
+))
+"""
+        lines = source.split('\n')
+        groups = {'':[]}
+        groups = parse_makefile(groups, lines, 0, None, 0)
+        self.assertEqual(len(groups), 1)
+        self.assertEqual(len(groups['']), 1)
+        self.assertEqual(groups[''][0], 'sal/osl/unx/time.cxx')
+
+    def test_parse_if_else(self):
+        source = """ifeq ($(OS),MACOSX)
+$(eval $(call gb_Library_add_exception_objects,sal,\\
+	sal/osl/mac/mac \\
+))
+else
+$(eval $(call gb_Library_add_exception_objects,sal,\\
+	sal/osl/unx/uunxapi \\
+))
+endif
+"""
+        lines = source.split('\n')
+        groups = {'':[]}
+        groups = parse_makefile(groups, lines, 0, None, 0)
+        self.assertEqual(len(groups), 3)
+        self.assertEqual(len(groups['']), 0)
+        self.assertEqual(len(groups['MACOSX']), 1)
+        self.assertEqual(len(groups['!MACOSX']), 1)
+        self.assertEqual(groups['MACOSX'][0], 'sal/osl/mac/mac.cxx')
+        self.assertEqual(groups['!MACOSX'][0], 'sal/osl/unx/uunxapi.cxx')
+
+    def test_parse_nested_if(self):
+        source = """ifeq ($(OS),MACOSX)
+$(eval $(call gb_Library_add_exception_objects,sal,\\
+	sal/osl/mac/mac \\
+))
+else
+$(eval $(call gb_Library_add_exception_objects,sal,\\
+	sal/osl/unx/uunxapi \\
+))
+
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Library_add_exception_objects,sal,\\
+	sal/textenc/context \\
+))
+endif
+endif
+"""
+        lines = source.split('\n')
+        groups = {'':[]}
+        groups = parse_makefile(groups, lines, 0, None, 0)
+        self.assertEqual(len(groups), 4)
+        self.assertEqual(len(groups['']), 0)
+        self.assertEqual(len(groups['MACOSX']), 1)
+        self.assertEqual(len(groups['!MACOSX']), 1)
+        self.assertEqual(len(groups['LINUX']), 1)
+        self.assertEqual(groups['MACOSX'][0], 'sal/osl/mac/mac.cxx')
+        self.assertEqual(groups['!MACOSX'][0], 'sal/osl/unx/uunxapi.cxx')
+        self.assertEqual(groups['LINUX'][0], 'sal/textenc/context.cxx')
+
+    def test_parse_exclude_system(self):
+        source = """ifeq ($(OS),MACOSX)
+$(eval $(call gb_Library_add_exception_objects,sal,\\
+	sal/osl/mac/mac \\
+))
+else
+$(eval $(call gb_Library_add_exception_objects,sal,\\
+	sal/osl/unx/uunxapi \\
+))
+
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Library_add_exception_objects,sal,\\
+	sal/textenc/context \\
+))
+endif
+endif
+"""
+        global EXCLUDE_SYSTEM
+        EXCLUDE_SYSTEM = True
+
+        lines = source.split('\n')
+        groups = {'':[]}
+        groups = parse_makefile(groups, lines, 0, None, 0)
+        self.assertEqual(len(groups), 1)
+        self.assertEqual(len(groups['']), 0)
+
+    def test_parse_filter(self):
+        source = """ifneq ($(filter $(OS),MACOSX IOS),)
+$(eval $(call gb_Library_add_exception_objects,sal,\\
+	sal/osl/unx/osxlocale \\
+))
+endif
+"""
+        # Filter is still unsupported.
+        lines = source.split('\n')
+        groups = {'':[]}
+        groups = parse_makefile(groups, lines, 0, None, 0)
+        self.assertEqual(len(groups), 1)
+        self.assertEqual(len(groups['']), 0)
+
+unittest.main()
+
+# vim: set et sw=4 ts=4 expandtab:
diff --git a/bin/update_pch.sh b/bin/update_pch.sh
index 9f423d6..95457e5 100755
--- a/bin/update_pch.sh
+++ b/bin/update_pch.sh
@@ -7,16 +7,18 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-# Usage: update_pch.sh [precompiled_xxx.hxx]
+# Usage: update_pch.sh [<module>/inc/pch/precompiled_xxx.hxx]
+# Usage: update_pch.sh [<module>]
 # Invoke: make cmd cmd="./bin/update_pch.sh [..]"
 
 root=`dirname $0`
 root=`cd $root/.. && pwd`
+cd $root
 
 if test -z "$1"; then
-    headers=`ls $root/*/inc/pch/precompiled_*.hxx`
+    headers=`ls ./*/inc/pch/precompiled_*.hxx`
 else
-    headers="$1"
+    headers="$@"
 fi
 
 # Split the headers into an array.
@@ -31,158 +33,18 @@ if [ $hlen -gt 1 ]; then
 fi
 
 for x in $headers; do
-    header=$x
-    echo updating `echo $header | sed -e s%$root/%%`
-    module=`readlink -f $header | sed -e s%$root/%% -e s%/.*%%`
-    name=`echo $header | sed -e s/.*precompiled_// -e s/\.hxx//`
-    makefile="Library_$name.mk"
-
-    tmpfile=`mktemp`
-
-    cat "$root/$module/$makefile" | sed 's#\\$##' | \
-        (
-        inobjects=
-        ifstack=0
-        while read line ; do
-            if test "$line" = "))" ; then
-                inobjects=
-            elif echo $line | grep -q -e add_exception_objects -e add_cxxobject -e add_cxxobjects ; then
-                inobjects=1
-                if test $ifstack -ne 0 ; then
-                    echo Sources in a conditional, ignoring for now. >&2
-                fi
-            elif echo $line | grep -q ^if ; then
-                ifstack=$((ifstack + 1))
-            elif echo $line | grep -q ^endif ; then
-                ifstack=$((ifstack - 1))
-            elif test -n "$inobjects" -a $ifstack -eq 0; then
-                file=$line
-                if echo $line | grep -q ", "; then
-                    true # $if() probably, or something similar
-                elif ! test -f "$root/$file".cxx ; then
-                    echo No file $file in $module/$makefile >&2
-                else
-
-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 -E '^\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
-        )
-
-    cat >$header <<EOF
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-/*
- This file has been autogenerated by update_pch.sh . It is possible to edit it
- manually (such as when an include file has been moved/renamed/removed. All such
- manual changes will be rewritten by the next run of update_pch.sh (which presumably
- also fixes all possible problems, so it's usually better to use it).
-*/
-
-EOF
-
-    # Library_svx needs this (sendreportw32.cxx)
-    if test "$makefile" = Library_svx.mk ; then
-        cat >>$header <<EOF
-#ifdef WNT
-#define UNICODE
-#define _UNICODE
-#endif
-
-EOF
-    fi
-
-function local_file()
-(
-    file="$1"
-    echo "$file" | grep -q ^"$module"/ && exit 0
-#    find "$root/$module" -type f | grep -v "$root/$module/inc/" | grep /"$file"'$' && exit 0
-    find "$root/$module" -type f | grep /"$file"'$' -q && exit 0
-    if echo "$file" | grep -F . -q; then
-        find "$root/$module" -type f | grep -q /`echo "$file" | sed 's/\.hxx$/.sdi/'` && exit 0
+    if [ -d "$x" ]; then
+        # We got a directory, find pch files to update.
+        headers=`find $root/$x/ -type f -iname "precompiled_*.hxx"`
+        $0 "$headers"

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list