[Libreoffice-commits] core.git: Branch 'feature/qt5+kde5' - 218 commits - accessibility/source animations/source avmedia/source basctl/source basegfx/source basic/source bin/find-unneeded-includes bin/gbuild-to-ide bridges/source canvas/source chart2/IwyuFilter_chart2.yaml chart2/source cli_ure/source codemaker/source comphelper/qa comphelper/source compilerplugins/clang config_host/config_global.h.in config_host/config_test.h.in config_host.mk.in configmgr/source configure.ac connectivity/source cppcanvas/source cui/source dbaccess/qa dbaccess/source desktop/source dictionaries distro-configs/LibreOfficeLinux.conf distro-configs/LibreOfficeMacOSX.conf distro-configs/LibreOfficeWin32.conf distro-configs/LibreOfficeWin64.conf drawinglayer/source editeng/source extensions/source external/icu external/pdfium filter/source framework/source helpcontent2 icon-themes/colibre icon-themes/colibre_svg icon-themes/karasa_jaga include/comphelper include/editeng include/filter include/LibreOfficeKit include/o ox include/sax include/svl include/svtools include/svx include/test include/tools include/vcl include/xmloff io/test libreofficekit/Executable_tilebench.mk libreofficekit/qa offapi/com officecfg/registry oox/CppunitTest_oox_crypto.mk oox/qa oox/source package/inc package/qa package/source pyuno/source qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/runner qadevOOo/tests ridljar/com sal/qa sax/source sc/CppunitTest_sc_tableconditionalentryobj.mk sc/CppunitTest_sc_tableconditionalformatobj.mk schema/libreoffice schema/README sc/inc sc/IwyuFilter_sc.yaml sc/Library_sc.mk sc/Module_sc.mk scp2/InstallModule_ooo.mk sc/qa scripting/java sc/sdi sc/source sc/uiconfig sc/UIConfig_scalc.mk sc/UITest_options.mk sd/IwyuFilter_sd.yaml sd/sdi sd/source sd/uiconfig sfx2/source slideshow/source solenv/bin solenv/clang-format solenv/gbuild svl/source svtools/source svx/Library_svxcore.mk svx/sdi svx/source svx/uiconfig svx/util sw/inc sw/Module_sw.mk sw/qa sw/sdi sw/source sw/uiconfig sw/UITest_wr iter_tests3.mk sw/UITest_writer_tests4.mk sysui/desktop test/Library_subsequenttest.mk test/source testtools/source tools/CppunitTest_tools_config.mk tools/Module_tools.mk tools/qa tools/source translations uitest/loginterpreter.py unotools/source vcl/CppunitTest_vcl_fontfeature.mk vcl/inc vcl/Library_vclplug_qt5.mk vcl/opengl vcl/qa vcl/qt5 vcl/source vcl/unx vcl/win vcl/workben wizards/source writerfilter/source xmloff/source xmlsecurity/inc xmlsecurity/Library_xsec_xmlsec.mk xmlsecurity/source xmlsecurity/util
Katarina Behrens
Katarina.Behrens at cib.de
Mon Jul 9 09:55:12 UTC 2018
Rebased ref, commits from common ancestor:
commit f897d09d9ec9792ec5077fd49bd3260b1782927f
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Fri Jul 6 16:35:13 2018 +0200
Implement reading screen count and screen geometry
this improves restoring window location should it be within
the secondary screen
Change-Id: Iaac6bcead6bfcb7ae9eda579e5a4ad6b2482cc39
diff --git a/vcl/qt5/Qt5System.cxx b/vcl/qt5/Qt5System.cxx
index 0de1940d9eff..ca533923913b 100644
--- a/vcl/qt5/Qt5System.cxx
+++ b/vcl/qt5/Qt5System.cxx
@@ -7,21 +7,23 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QDesktopWidget>
+
#include <string.h>
#include <tools/gen.hxx>
#include <Qt5System.hxx>
+#include <Qt5Tools.hxx>
Qt5System::Qt5System() {}
Qt5System::~Qt5System() {}
-unsigned int Qt5System::GetDisplayScreenCount() { return 1; }
+unsigned int Qt5System::GetDisplayScreenCount() { return QApplication::desktop()->screenCount(); }
tools::Rectangle Qt5System::GetDisplayScreenPosSizePixel(unsigned int nScreen)
{
- tools::Rectangle aRect;
- if (nScreen == 0)
- aRect = tools::Rectangle(Point(0, 0), Size(1024, 768));
- return aRect;
+ QRect qRect = QApplication::desktop()->screenGeometry(nScreen);
+ return toRectangle(qRect);
}
int Qt5System::ShowNativeDialog(const OUString&, const OUString&, const std::vector<OUString>&)
commit 938770f669433a1336b6558aef5a971f341a7fa0
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Thu Jul 5 11:45:45 2018 +0200
Basic Qt5 system display data
copied from dummy headless implementation
Change-Id: I1b184745627acd065b4c0cc54f044c47ec980c93
diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index 4fcd649e1777..1ad01555ed3a 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -96,6 +96,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_qt5,\
vcl/qt5/Qt5Object \
vcl/qt5/Qt5Painter \
vcl/qt5/Qt5Printer \
+ vcl/qt5/Qt5System \
vcl/qt5/Qt5Timer \
vcl/qt5/Qt5Tools \
vcl/qt5/Qt5VirtualDevice \
diff --git a/vcl/inc/qt5/Qt5System.hxx b/vcl/inc/qt5/Qt5System.hxx
new file mode 100644
index 000000000000..fbc753757b36
--- /dev/null
+++ b/vcl/inc/qt5/Qt5System.hxx
@@ -0,0 +1,27 @@
+/* -*- 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/.
+ */
+
+#pragma once
+
+#include <vcl/sysdata.hxx>
+#include <unx/gensys.h>
+
+class Qt5System : public SalGenericSystem
+{
+public:
+ Qt5System();
+ virtual ~Qt5System() override;
+
+ virtual unsigned int GetDisplayScreenCount() override;
+ virtual tools::Rectangle GetDisplayScreenPosSizePixel(unsigned int nScreen) override;
+ virtual int ShowNativeDialog(const OUString& rTitle, const OUString& rMessage,
+ const std::vector<OUString>& rButtons) override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index 6ea2610e03f7..fc06d47d317b 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -26,6 +26,7 @@
#include <Qt5Frame.hxx>
#include <Qt5Menu.hxx>
#include <Qt5Object.hxx>
+#include <Qt5System.hxx>
#include <Qt5Timer.hxx>
#include <Qt5VirtualDevice.hxx>
@@ -40,7 +41,6 @@
#include <sal/log.hxx>
#include <osl/process.h>
-#include <headless/svpdummies.hxx>
#include <headless/svpbmp.hxx>
Qt5Instance::Qt5Instance(SalYieldMutex* pMutex, bool bUseCairo)
@@ -128,7 +128,7 @@ std::unique_ptr<SalMenuItem> Qt5Instance::CreateMenuItem(const SalItemParams& rI
SalTimer* Qt5Instance::CreateSalTimer() { return new Qt5Timer(); }
-SalSystem* Qt5Instance::CreateSalSystem() { return new SvpSalSystem(); }
+SalSystem* Qt5Instance::CreateSalSystem() { return new Qt5System(); }
std::shared_ptr<SalBitmap> Qt5Instance::CreateSalBitmap()
{
diff --git a/vcl/qt5/Qt5System.cxx b/vcl/qt5/Qt5System.cxx
new file mode 100644
index 000000000000..0de1940d9eff
--- /dev/null
+++ b/vcl/qt5/Qt5System.cxx
@@ -0,0 +1,32 @@
+/* -*- 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/.
+ */
+
+#include <string.h>
+#include <tools/gen.hxx>
+#include <Qt5System.hxx>
+
+Qt5System::Qt5System() {}
+Qt5System::~Qt5System() {}
+
+unsigned int Qt5System::GetDisplayScreenCount() { return 1; }
+
+tools::Rectangle Qt5System::GetDisplayScreenPosSizePixel(unsigned int nScreen)
+{
+ tools::Rectangle aRect;
+ if (nScreen == 0)
+ aRect = tools::Rectangle(Point(0, 0), Size(1024, 768));
+ return aRect;
+}
+
+int Qt5System::ShowNativeDialog(const OUString&, const OUString&, const std::vector<OUString>&)
+{
+ return 0;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 64e2c27650c3ea34e0b1e6fa7af5bf916d4af779
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Thu Jul 5 11:28:39 2018 +0200
Don't draw focus around checkboxes and radiobuttons
it is drawn separately around cb/rb's text
Change-Id: I22737944048c4d501ba4dc5416fa79d4d081e91c
diff --git a/vcl/unx/kde5/KDE5SalGraphics.cxx b/vcl/unx/kde5/KDE5SalGraphics.cxx
index 9377a134fdc4..f26e559b921e 100644
--- a/vcl/unx/kde5/KDE5SalGraphics.cxx
+++ b/vcl/unx/kde5/KDE5SalGraphics.cxx
@@ -468,6 +468,8 @@ bool KDE5SalGraphics::drawNativeControl(ControlType type, ControlPart part,
if (part == ControlPart::Entire)
{
QStyleOptionButton option;
+ // clear FOCUSED bit, focus is drawn separately
+ nControlState &= ~(ControlState::FOCUSED);
draw(QStyle::CE_CheckBox, &option, m_image.get(),
vclStateValue2StateFlag(nControlState, value));
}
@@ -548,6 +550,8 @@ bool KDE5SalGraphics::drawNativeControl(ControlType type, ControlPart part,
if (part == ControlPart::Entire)
{
QStyleOptionButton option;
+ // clear FOCUSED bit, focus is drawn separately
+ nControlState &= ~(ControlState::FOCUSED);
draw(QStyle::CE_RadioButton, &option, m_image.get(),
vclStateValue2StateFlag(nControlState, value));
}
commit f785c6f2e2051e91bb6537154eb743879aa3ee98
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Wed Jul 4 10:22:23 2018 +0200
Try to move adjusting focus rect down to gtk3 code
as it makes the focus rect look oddly shifted for kde5 widgets
Change-Id: Ia42ccf30207a8c804d23ba45870d839f94c3f858
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 6facf9159838..50b62c50b020 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2918,12 +2918,6 @@ void RadioButton::ShowFocus(const tools::Rectangle& rRect)
aInRect.SetLeft( rRect.Left() ); // exclude the radio element itself from the focusrect
- //to-do, figure out a better solution here
- aInRect.AdjustLeft( -2 );
- aInRect.AdjustRight(2 );
- aInRect.AdjustTop( -2 );
- aInRect.AdjustBottom(2 );
-
DrawNativeControl(ControlType::Radiobutton, ControlPart::Focus, aInRect,
ControlState::FOCUSED, aControlValue, OUString());
}
@@ -3743,12 +3737,6 @@ void CheckBox::ShowFocus(const tools::Rectangle& rRect)
aInRect.SetLeft( rRect.Left() ); // exclude the checkbox itself from the focusrect
- //to-do, figure out a better solution here
- aInRect.AdjustLeft( -2 );
- aInRect.AdjustRight(2 );
- aInRect.AdjustTop( -2 );
- aInRect.AdjustBottom(2 );
-
DrawNativeControl(ControlType::Checkbox, ControlPart::Focus, aInRect,
ControlState::FOCUSED, aControlValue, OUString());
}
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 9ed8d7c96dc3..180a050ebc59 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -2499,7 +2499,13 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
break;
case RenderType::Focus:
{
- if (nType != ControlType::Checkbox)
+ if (nType == ControlType::Checkbox ||
+ nType == ControlType::Radiobutton)
+ {
+ nX -= 2; nY -=2;
+ nHeight += 4; nWidth += 4;
+ }
+ else
{
GtkBorder border;
commit 1501da01092d4ad4e5f3c8499fd8d1e18f87bc0c
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Sat Jul 7 09:08:23 2018 +0200
loplugin:oncevar
Change-Id: Id295dc0db174a448ef73db9de34f2de07d47f09a
Reviewed-on: https://gerrit.libreoffice.org/57108
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index 41c2f4ac3557..c6f9c8ef0a41 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -917,8 +917,7 @@ namespace cppcanvas
rRenderState );
//rhbz#1589029 non-transparent text fill background support
- ::Color aEmptyColor( COL_AUTO );
- if (rTextFillColor != aEmptyColor)
+ if (rTextFillColor != COL_AUTO)
{
rendering::RenderState aLocalState( rRenderState );
aLocalState.DeviceColor = vcl::unotools::colorToDoubleSequence(
@@ -1380,8 +1379,7 @@ namespace cppcanvas
rRenderState );
//rhbz#1589029 non-transparent text fill background support
- ::Color aEmptyColor( COL_AUTO );
- if (rTextFillColor != aEmptyColor)
+ if (rTextFillColor != COL_AUTO)
{
rendering::RenderState aLocalState(rRenderState);
aLocalState.DeviceColor = vcl::unotools::colorToDoubleSequence(
@@ -1438,8 +1436,7 @@ namespace cppcanvas
rRenderState );
//rhbz#1589029 non-transparent text fill background support
- ::Color aEmptyColor( COL_AUTO );
- if (rTextFillColor != aEmptyColor)
+ if (rTextFillColor != COL_AUTO)
{
rendering::RenderState aLocalState(rRenderState);
aLocalState.DeviceColor = vcl::unotools::colorToDoubleSequence(
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index f737a075d130..bb333a15454f 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -638,7 +638,6 @@ namespace pcr
sal_uInt16 OBrowserListBox::GetPropertyPos( const OUString& _rEntryName ) const
{
- sal_uInt16 nRet = EDITOR_LIST_ENTRY_NOTFOUND;
sal_uInt16 nPos = 0;
for (auto const& line : m_aLines)
{
@@ -649,7 +648,7 @@ namespace pcr
++nPos;
}
- return nRet;
+ return EDITOR_LIST_ENTRY_NOTFOUND;
}
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 4a9759638584..60689970c0b4 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -328,14 +328,13 @@ void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, sal
bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
SfxViewFrame& rFrame )
{
- bool bRet = false;
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxAllItemSet aSet( rFrame.GetObjectShell()->GetPool() );
aSet.Put( SfxBoolItem( FN_PARAM_1, false ) );
aSet.Put( SvxFontItem( rOldFont.GetFamily(), rOldFont.GetFamilyName(), rOldFont.GetStyleName(), rOldFont.GetPitch(), rOldFont.GetCharSet(), aSet.GetPool()->GetWhich( SID_ATTR_CHAR_FONT ) ) );
ScopedVclPtr<SfxAbstractDialog> pDlg(pFact->CreateCharMapDialog(rFrame.GetWindow().GetFrameWeld(), aSet, true));
pDlg->Execute();
- return bRet;
+ return false;
}
bool ScViewUtil::IsFullScreen( const SfxViewShell& rViewShell )
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 171d2b345d63..c1cef8344c39 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -560,9 +560,7 @@ void SdDrawDocument::CreateDefaultCellStyles()
pSheet->SetHelpId( OUString(), HID_SD_CELL_STYLE_DEFAULT );
SfxItemSet& rISet = pSheet->GetItemSet();
- Color aNullCol(COL_BLACK);
-
- XHatch aNullHatch(aNullCol);
+ XHatch aNullHatch(COL_BLACK);
rISet.Put(XFillStyleItem(drawing::FillStyle_SOLID));
rISet.Put(XFillColorItem(OUString(), Color(0x00ccccff)));
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 8f420d84395d..ef452582d980 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -637,9 +637,8 @@ bool ShutdownIcon::GetAutostart( )
{
#if defined MACOSX
return true;
-#else
+#elif defined ENABLE_QUICKSTART_APPLET
bool bRet = false;
-#ifdef ENABLE_QUICKSTART_APPLET
OUString aShortcut( getShortcutName() );
OUString aShortcutUrl;
osl::File::getFileURLFromSystemPath( aShortcut, aShortcutUrl );
@@ -650,8 +649,9 @@ bool ShutdownIcon::GetAutostart( )
f.close();
bRet = true;
}
-#endif // ENABLE_QUICKSTART_APPLET
return bRet;
+#else // ENABLE_QUICKSTART_APPLET
+ return false;
#endif
}
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index dfd73391ca65..9a1da4bed7bd 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -698,9 +698,8 @@ void MatchContext_Impl::ReadFolder( const OUString& rURL,
try
{
uno::Reference< XDynamicResultSet > xDynResultSet;
- ResultSetInclude eInclude = INCLUDE_FOLDERS_AND_DOCUMENTS;
- xDynResultSet = aCnt.createDynamicCursor( aProps, eInclude );
+ xDynResultSet = aCnt.createDynamicCursor( aProps, INCLUDE_FOLDERS_AND_DOCUMENTS );
uno::Reference < XAnyCompareFactory > xCompare;
uno::Reference < XSortedDynamicResultSetFactory > xSRSFac =
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 666fac2edbe8..e8bb92aba1c0 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -964,7 +964,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
}
if(bHasEEFeatureItems)
{
- OUString aMessage("SdrEditView::SetAttrToMarked(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents.");
+ const OUString aMessage("SdrEditView::SetAttrToMarked(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents.");
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr,
VclMessageType::Info, VclButtonsType::Ok,
aMessage));
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 2003ecf667b6..c9911d44809f 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -2071,7 +2071,7 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
if(bHasEEFeatureItems)
{
- OUString aMessage("SdrObjEditView::SetAttributes(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents.");
+ const OUString aMessage("SdrObjEditView::SetAttributes(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents.");
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr,
VclMessageType::Info, VclButtonsType::Ok,
aMessage));
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index cb02ba7da976..167b8e50825e 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1697,9 +1697,8 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b
}
// build and set BaseRect (use scale)
- Point aPoint = Point();
Size aSize(FRound(aScale.getX()), FRound(aScale.getY()));
- tools::Rectangle aBaseRect(aPoint, aSize);
+ tools::Rectangle aBaseRect(Point(), aSize);
SetSnapRect(aBaseRect);
// flip?
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index f83f7fc9052b..b5e767c8d6f7 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -1020,7 +1020,7 @@ void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, bool bReplaceAll)
if(bHasEEFeatureItems)
{
- OUString aMessage("SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents.");
+ const OUString aMessage("SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents.");
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr,
VclMessageType::Info, VclButtonsType::Ok,
aMessage));
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 6dd910fab9ee..de13c4d8b7b2 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -939,60 +939,56 @@ void paintGraphicUsingPrimitivesHelper(
// -> the primitive renderer will create the needed pdf export data
// -> if bitmap content, it will be cached system-dependent
drawinglayer::primitive2d::Primitive2DContainer aContent(1);
- bool bDone(false);
- if(!bDone)
+ aContent[0] = new drawinglayer::primitive2d::GraphicPrimitive2D(
+ rGraphicTransform,
+ rGrfObj,
+ rGraphicAttr);
+
+ // RotateFlyFrame3: If ClipRegion is set at OutputDevice, we
+ // need to use that. Usually the renderer would be a VCL-based
+ // PrimitiveRenderer, but there are system-specific shortcuts that
+ // will *not* use the VCL-Paint of Bitmap and thus ignore this.
+ // Anyways, indirectly using a CLipRegion set at the target OutDev
+ // when using a PrimitiveRenderer is a non-valid implication.
+ // First tried only to use when HasPolyPolygonOrB2DPolyPolygon(),
+ // but there is an optimization at ClipRegion creation that detects
+ // a single Rectangle in a tools::PolyPolygon and forces to a simple
+ // RegionBand-based implementation, so cannot use it here.
+ if(rOutputDevice.IsClipRegion())
{
- aContent[0] = new drawinglayer::primitive2d::GraphicPrimitive2D(
- rGraphicTransform,
- rGrfObj,
- rGraphicAttr);
-
- // RotateFlyFrame3: If ClipRegion is set at OutputDevice, we
- // need to use that. Usually the renderer would be a VCL-based
- // PrimitiveRenderer, but there are system-specific shortcuts that
- // will *not* use the VCL-Paint of Bitmap and thus ignore this.
- // Anyways, indirectly using a CLipRegion set at the target OutDev
- // when using a PrimitiveRenderer is a non-valid implication.
- // First tried only to use when HasPolyPolygonOrB2DPolyPolygon(),
- // but there is an optimization at ClipRegion creation that detects
- // a single Rectangle in a tools::PolyPolygon and forces to a simple
- // RegionBand-based implementation, so cannot use it here.
- if(rOutputDevice.IsClipRegion())
- {
- const basegfx::B2DPolyPolygon aClip(rOutputDevice.GetClipRegion().GetAsB2DPolyPolygon());
+ const basegfx::B2DPolyPolygon aClip(rOutputDevice.GetClipRegion().GetAsB2DPolyPolygon());
- if(0 != aClip.count())
- {
- // tdf#114076: Expand ClipRange to next PixelBound
- // Do this by going to basegfx::B2DRange, adding a
- // single pixel size and using floor/ceil to go to
- // full integer (as needed for pixels). Also need
- // to go back to basegfx::B2DPolyPolygon for the
- // creation of the needed MaskPrimitive2D.
- // The general problem is that Writer is scrolling
- // using blitting the unchanged parts, this forces
- // this part of the scroll to pixel coordinate steps,
- // while the ViewTransformation for paint nowadays has
- // a sub-pixel precision. This results in an offset
- // up to one pixel in radius. To solve this for now,
- // we need to expand to the next outer pixel bound.
- // Hopefully in the future we will someday be able to
- // stay on the full available precision, but this
- // will need a change in the repaint/scroll paradigm.
- const basegfx::B2DRange aClipRange(aClip.getB2DRange());
- const basegfx::B2DVector aSinglePixelXY(rOutputDevice.GetInverseViewTransformation() * basegfx::B2DVector(1.0, 1.0));
- const basegfx::B2DRange aExpandedClipRange(
- floor(aClipRange.getMinX() - aSinglePixelXY.getX()),
- floor(aClipRange.getMinY() - aSinglePixelXY.getY()),
- ceil(aClipRange.getMaxX() + aSinglePixelXY.getX()),
- ceil(aClipRange.getMaxY() + aSinglePixelXY.getY()));
-
- aContent[0] = new drawinglayer::primitive2d::MaskPrimitive2D(
- basegfx::B2DPolyPolygon(
- basegfx::utils::createPolygonFromRect(aExpandedClipRange)),
- aContent);
- }
+ if(0 != aClip.count())
+ {
+ // tdf#114076: Expand ClipRange to next PixelBound
+ // Do this by going to basegfx::B2DRange, adding a
+ // single pixel size and using floor/ceil to go to
+ // full integer (as needed for pixels). Also need
+ // to go back to basegfx::B2DPolyPolygon for the
+ // creation of the needed MaskPrimitive2D.
+ // The general problem is that Writer is scrolling
+ // using blitting the unchanged parts, this forces
+ // this part of the scroll to pixel coordinate steps,
+ // while the ViewTransformation for paint nowadays has
+ // a sub-pixel precision. This results in an offset
+ // up to one pixel in radius. To solve this for now,
+ // we need to expand to the next outer pixel bound.
+ // Hopefully in the future we will someday be able to
+ // stay on the full available precision, but this
+ // will need a change in the repaint/scroll paradigm.
+ const basegfx::B2DRange aClipRange(aClip.getB2DRange());
+ const basegfx::B2DVector aSinglePixelXY(rOutputDevice.GetInverseViewTransformation() * basegfx::B2DVector(1.0, 1.0));
+ const basegfx::B2DRange aExpandedClipRange(
+ floor(aClipRange.getMinX() - aSinglePixelXY.getX()),
+ floor(aClipRange.getMinY() - aSinglePixelXY.getY()),
+ ceil(aClipRange.getMaxX() + aSinglePixelXY.getX()),
+ ceil(aClipRange.getMaxY() + aSinglePixelXY.getY()));
+
+ aContent[0] = new drawinglayer::primitive2d::MaskPrimitive2D(
+ basegfx::B2DPolyPolygon(
+ basegfx::utils::createPolygonFromRect(aExpandedClipRange)),
+ aContent);
}
}
diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx
index 616e1b23d813..4c043c072b20 100644
--- a/unotools/source/misc/fontcvt.cxx
+++ b/unotools/source/misc/fontcvt.cxx
@@ -1388,7 +1388,7 @@ FontToSubsFontConverter CreateFontToSubsFontConverter( const OUString& rOrgName,
if ( nFlags & FontToSubsFontFlags::IMPORT )
{
- int nEntries = 2; // only StarMath+StarBats
+ const int nEntries = 2; // only StarMath+StarBats
for( int i = 0; i < nEntries; ++i )
{
const RecodeTable& r = aStarSymbolRecodeTable[i];
diff --git a/vcl/unx/gtk/salprn-gtk.cxx b/vcl/unx/gtk/salprn-gtk.cxx
index 218109265332..0eba1ccee23e 100644
--- a/vcl/unx/gtk/salprn-gtk.cxx
+++ b/vcl/unx/gtk/salprn-gtk.cxx
@@ -224,8 +224,6 @@ GtkSalPrinter::StartJob(
m_xImpl->m_pPrinter = aDialog.getPrinter();
m_xImpl->m_pSettings = aDialog.getSettings();
- bool bCollate = false;
-
//To-Do proper name, watch for encodings
sFileName = OString("/tmp/hacking.ps");
m_xImpl->m_sSpoolFile = sFileName;
@@ -234,7 +232,7 @@ GtkSalPrinter::StartJob(
//To-Do, swap ps/pdf for gtk_printer_accepts_ps()/gtk_printer_accepts_pdf() ?
- return impl_doJob(&aFileName, i_rJobName, i_rAppName, io_pSetupData, bCollate, io_rController);
+ return impl_doJob(&aFileName, i_rJobName, i_rAppName, io_pSetupData, /*bCollate*/false, io_rController);
}
bool
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 1e135f43c22a..cf79af44647c 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -109,10 +109,9 @@ sal_Int32 XInputStreamHelper::readSomeBytes( uno::Sequence<sal_Int8>& aData, sal
nRet = nMaxBytesToRead;
aData.realloc( nRet );
sal_Int8* pData = aData.getArray();
- sal_Int32 nHeaderRead = 0;
if( nRet )
{
- memcpy( pData + nHeaderRead, m_pBuffer + m_nPosition, nRet );
+ memcpy( pData, m_pBuffer + m_nPosition, nRet );
m_nPosition += nRet;
}
}
commit 7af90cc93b76996f0f338c6a1285997531281e75
Author: Gabor Kelemen <kelemeng at ubuntu.com>
Date: Sun Jul 8 15:01:23 2018 +0200
Add missing sal/log.hxx headers
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx>
(and don't make use of it themselves), but many other files happen to depend on it.
This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030
to be able to remove those unneeded includes.
This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
to directories from a* to configmgr
Change-Id: I6ea1a7f992b1f835f5bac7a725e1135abee3f85a
Reviewed-on: https://gerrit.libreoffice.org/57170
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx
index f5bf6416380b..8004451c1e2c 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxBase.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxBase.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
#include <unotools/accessiblerelationsethelper.hxx>
#include <vcl/svapp.hxx>
+#include <sal/log.hxx>
using ::com::sun::star::uno::Reference;
diff --git a/accessibility/source/extended/AccessibleGridControlBase.cxx b/accessibility/source/extended/AccessibleGridControlBase.cxx
index 6f2ab23735a9..daa93e64db65 100644
--- a/accessibility/source/extended/AccessibleGridControlBase.cxx
+++ b/accessibility/source/extended/AccessibleGridControlBase.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/IllegalAccessibleComponentStateException.hpp>
#include <unotools/accessiblerelationsethelper.hxx>
+#include <sal/log.hxx>
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Any;
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index 91055abc841b..69f5ab489b0d 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
diff --git a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
index 48e70195deb4..23f6ae39c53e 100644
--- a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
+++ b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
@@ -21,7 +21,7 @@
#include <toolkit/helper/convert.hxx>
#include <vcl/tabctrl.hxx>
#include <vcl/tabpage.hxx>
-
+#include <sal/log.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
index 65b53191a3c9..56e871a08f06 100644
--- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx
@@ -42,6 +42,7 @@
#include <unotools/accessiblerelationsethelper.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <strings.hxx>
+#include <sal/log.hxx>
#include <com/sun/star/accessibility/XAccessibleSelection.hpp>
diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx
index e4ec6379d7e0..826aded0fb81 100644
--- a/animations/source/animcore/animcore.cxx
+++ b/animations/source/animcore/animcore.cxx
@@ -56,6 +56,7 @@
#include <cppuhelper/implbase.hxx>
#include <osl/mutex.hxx>
+#include <sal/log.hxx>
#include <vector>
#include <algorithm>
#include <string.h>
diff --git a/avmedia/source/framework/mediaitem.cxx b/avmedia/source/framework/mediaitem.cxx
index 88339aec607d..851e501e18cb 100644
--- a/avmedia/source/framework/mediaitem.cxx
+++ b/avmedia/source/framework/mediaitem.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/uri/XUriReferenceFactory.hpp>
#include <rtl/ustrbuf.hxx>
+#include <sal/log.hxx>
#include <ucbhelper/content.hxx>
diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index 598e7f6ea4c1..d42f91038a42 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -31,6 +31,7 @@
#include <cppuhelper/supportsservice.hxx>
+#include <sal/log.hxx>
#include <rtl/string.hxx>
#include <salhelper/thread.hxx>
#include <vcl/svapp.hxx>
diff --git a/avmedia/source/macavf/framegrabber.mm b/avmedia/source/macavf/framegrabber.mm
index 07bf7000bbcb..fc9ef1e1cdaf 100644
--- a/avmedia/source/macavf/framegrabber.mm
+++ b/avmedia/source/macavf/framegrabber.mm
@@ -20,6 +20,7 @@
#include "framegrabber.hxx"
#include "player.hxx"
+#include <sal/log.hxx>
#include <tools/stream.hxx>
#include <vcl/graph.hxx>
#include <vcl/cvtgrf.hxx>
diff --git a/avmedia/source/quicktime/manager.mm b/avmedia/source/quicktime/manager.mm
index 735b282d07a1..4d9ab9617398 100644
--- a/avmedia/source/quicktime/manager.mm
+++ b/avmedia/source/quicktime/manager.mm
@@ -21,6 +21,7 @@
#include "player.hxx"
#include <tools/urlobj.hxx>
#include <osl/diagnose.h>
+#include <sal/log.hxx>
using namespace ::com::sun::star;
diff --git a/avmedia/source/quicktime/player.mm b/avmedia/source/quicktime/player.mm
index d1c44306834f..57499ba8a54a 100644
--- a/avmedia/source/quicktime/player.mm
+++ b/avmedia/source/quicktime/player.mm
@@ -23,6 +23,8 @@
#include "framegrabber.hxx"
#include "window.hxx"
+#include <sal/log.hxx>
+
using namespace ::com::sun::star;
SAL_WNODEPRECATED_DECLARATIONS_PUSH //TODO: 10.9
diff --git a/avmedia/source/quicktime/window.mm b/avmedia/source/quicktime/window.mm
index db3c2a6ff1ba..faf71baaedb5 100644
--- a/avmedia/source/quicktime/window.mm
+++ b/avmedia/source/quicktime/window.mm
@@ -23,6 +23,8 @@
#include "window.hxx"
#include "player.hxx"
+#include <sal/log.hxx>
+
using namespace ::com::sun::star;
SAL_WNODEPRECATED_DECLARATIONS_PUSH //TODO: 10.9
diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx
index 0fd10f508bca..03dadbee4fb3 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -33,6 +33,7 @@
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <memory>
+#include <sal/log.hxx>
#define AVMEDIA_FRAMEGRABBER_DEFAULTFRAME_MEDIATIME 3.0
diff --git a/avmedia/source/viewer/mediawindow_impl.cxx b/avmedia/source/viewer/mediawindow_impl.cxx
index 75c2d9a70af2..65bf3d6b8498 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -29,6 +29,7 @@
#include <algorithm>
#include <cmath>
+#include <sal/log.hxx>
#include <comphelper/processfactory.hxx>
#include <tools/urlobj.hxx>
#include <unotools/securityoptions.hxx>
diff --git a/avmedia/source/vlc/vlcframegrabber.cxx b/avmedia/source/vlc/vlcframegrabber.cxx
index eedbeacf3574..99b08060b3c4 100644
--- a/avmedia/source/vlc/vlcframegrabber.cxx
+++ b/avmedia/source/vlc/vlcframegrabber.cxx
@@ -29,6 +29,7 @@
#include <unotools/ucbstreamhelper.hxx>
#include <tools/stream.hxx>
#include <cppuhelper/supportsservice.hxx>
+#include <sal/log.hxx>
#include "vlcframegrabber.hxx"
#include "vlcplayer.hxx"
diff --git a/avmedia/source/vlc/vlcmanager.cxx b/avmedia/source/vlc/vlcmanager.cxx
index a37622304b4f..0b61eeb7d3f7 100644
--- a/avmedia/source/vlc/vlcmanager.cxx
+++ b/avmedia/source/vlc/vlcmanager.cxx
@@ -11,6 +11,7 @@
#include <boost/lexical_cast.hpp>
#include <com/sun/star/uno/Exception.hpp>
#include <cppuhelper/supportsservice.hxx>
+#include <sal/log.hxx>
#include "vlcmanager.hxx"
#include "vlcplayer.hxx"
#include <wrapper/Instance.hxx>
diff --git a/avmedia/source/vlc/vlcuno.cxx b/avmedia/source/vlc/vlcuno.cxx
index 774a0a2b96ec..c9f1d7da1dd4 100644
--- a/avmedia/source/vlc/vlcuno.cxx
+++ b/avmedia/source/vlc/vlcuno.cxx
@@ -19,6 +19,7 @@
#include <comphelper/processfactory.hxx>
#include <officecfg/Office/Common.hxx>
+#include <sal/log.hxx>
#include "vlccommon.hxx"
#include "vlcmanager.hxx"
diff --git a/avmedia/source/vlc/wrapper/Media.cxx b/avmedia/source/vlc/wrapper/Media.cxx
index 0d8d3d17374f..9f23472d30f8 100644
--- a/avmedia/source/vlc/wrapper/Media.cxx
+++ b/avmedia/source/vlc/wrapper/Media.cxx
@@ -13,6 +13,7 @@
#include <wrapper/Instance.hxx>
#include "Types.hxx"
#include <wrapper/Common.hxx>
+#include <sal/log.hxx>
struct libvlc_instance_t;
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 02110e9c2632..f3ee0773e6d1 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/script/ModuleType.hpp>
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
+#include <sal/log.hxx>
#include <sfx2/childwin.hxx>
#include <sfx2/docfac.hxx>
#include <sfx2/dinfdlg.hxx>
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index 1b64d85aac28..24154047ac0a 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -28,6 +28,7 @@
#include <basic/sbmeth.hxx>
#include <framework/documentundoguard.hxx>
+#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
#include <unotools/moduleoptions.hxx>
#include <vcl/weld.hxx>
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 8f3c0d562782..3ac49d89e2aa 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
+#include <sal/log.hxx>
namespace basctl
{
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 765387522416..d648353c08f9 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -27,6 +27,7 @@
#include <basic/basmgr.hxx>
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
+#include <sal/log.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/passwd.hxx>
#include <svl/intitem.hxx>
diff --git a/basctl/source/basicide/sbxitem.cxx b/basctl/source/basicide/sbxitem.cxx
index d6f6b047be86..e1281f62510a 100644
--- a/basctl/source/basicide/sbxitem.cxx
+++ b/basctl/source/basicide/sbxitem.cxx
@@ -18,6 +18,7 @@
*/
#include <sbxitem.hxx>
+#include <sal/log.hxx>
namespace basctl
{
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 559f4f82a301..c7223ed72d5d 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -57,6 +57,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
+#include <sal/log.hxx>
#include <osl/file.hxx>
#include <rtl/uri.hxx>
#include <set>
diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 968a2ed3ed81..359f9aab9587 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <cassert>
diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index 98d77fe362d2..4522ec94f99b 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -24,6 +24,7 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
#include <rtl/math.hxx>
#include <stringconversiontools.hxx>
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 90c15c5edc08..77b2b5fe2235 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -33,6 +33,7 @@
#include <basic/sbmod.hxx>
#include <unotools/intlwrapper.hxx>
#include <o3tl/make_unique.hxx>
+#include <sal/log.hxx>
#include <basic/sbuno.hxx>
#include <basic/basmgr.hxx>
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx
index 97e3f78b4329..15f2617dfe48 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -40,6 +40,7 @@
#include <basic/basicmanagerrepository.hxx>
#include <basic/basmgr.hxx>
+#include <sal/log.hxx>
#include <vcl/svapp.hxx>
#include <xmlscript/xmldlg_imexp.hxx>
#include <sbunoobj.hxx>
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 7636a62d419c..a2a340a84eb4 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -20,6 +20,7 @@
#include <tools/stream.hxx>
#include <tools/tenccvt.hxx>
#include <osl/thread.h>
+#include <sal/log.hxx>
#include <basic/sbx.hxx>
#include <sb.hxx>
#include <string.h>
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index c418776fa764..82e7b377af55 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -39,6 +39,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/util/XCloseBroadcaster.hpp>
#include <com/sun/star/util/XCloseListener.hpp>
+#include <sal/log.hxx>
#include <errobject.hxx>
#include <memory>
#include <unordered_map>
diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx
index 5798bc7c2228..b69c95cf2f88 100644
--- a/basic/source/runtime/dllmgr-x64.cxx
+++ b/basic/source/runtime/dllmgr-x64.cxx
@@ -37,6 +37,7 @@
#include <rtl/ref.hxx>
#include <rtl/string.hxx>
#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
#include <salhelper/simplereferenceobject.hxx>
#include <o3tl/char16_t2wchar_t.hxx>
diff --git a/basic/source/runtime/dllmgr-x86.cxx b/basic/source/runtime/dllmgr-x86.cxx
index 63fd3bcea160..7c4720fc246b 100644
--- a/basic/source/runtime/dllmgr-x86.cxx
+++ b/basic/source/runtime/dllmgr-x86.cxx
@@ -36,6 +36,7 @@
#include <rtl/ref.hxx>
#include <rtl/string.hxx>
#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
#include <salhelper/simplereferenceobject.hxx>
#include <o3tl/char16_t2wchar_t.hxx>
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index 47c00c39909b..3413ebc355e1 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -29,6 +29,7 @@
#include <rtl/textenc.h>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
+#include <sal/log.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 4eb36147f175..919b81247bfe 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -42,6 +42,7 @@
#include <i18nlangtag/lang.h>
#include <rtl/string.hxx>
#include <rtl/strbuf.hxx>
+#include <sal/log.hxx>
#include <runtime.hxx>
#include <sbunoobj.hxx>
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 5e027372b7b6..8259f9e2927d 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -29,6 +29,7 @@
#include <rtl/instance.hxx>
#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
// AppData-Structure for SBX:
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 54eedd360bda..b0cf727672ff 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <iomanip>
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 7f9b4931ea48..2b229082f665 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -46,6 +46,7 @@
#include <rtl/strbuf.hxx>
#include <rtl/character.hxx>
+#include <sal/log.hxx>
#include <svl/zforlist.hxx>
#include <o3tl/make_unique.hxx>
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 0f609d866135..4de7036237b2 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -22,6 +22,7 @@
#include <math.h>
#include <tools/debug.hxx>
#include <tools/stream.hxx>
+#include <sal/log.hxx>
#include <basic/sbx.hxx>
#include <sbunoobj.hxx>
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 30088e0746f9..59751d4d6288 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -30,6 +30,7 @@
#include <sbunoobj.hxx>
#include <math.h>
#include <rtl/character.hxx>
+#include <sal/log.hxx>
#include <com/sun/star/uno/XInterface.hpp>
using namespace com::sun::star::uno;
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 8ad36224f819..b0cea4fed6be 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -34,6 +34,7 @@
#include <vcl/errinf.hxx>
#include <rtl/ustring.hxx>
#include <rtl/strbuf.hxx>
+#include <sal/log.hxx>
#include <comphelper/getexpandeduri.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/anytostring.hxx>
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index aba9aabbee01..14b11e5f0e99 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -40,6 +40,7 @@
#include <osl/thread.h>
#include <rtl/digest.h>
#include <rtl/strbuf.hxx>
+#include <sal/log.hxx>
// For password functionality
#include <tools/urlobj.hxx>
diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx
index de575a02bbcd..4a0d4b30af53 100644
--- a/bridges/source/jni_uno/jni_bridge.cxx
+++ b/bridges/source/jni_uno/jni_bridge.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <cassert>
#include <memory>
diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx
index 48219c4fec09..4092933be49f 100644
--- a/bridges/source/jni_uno/jni_java2uno.cxx
+++ b/bridges/source/jni_uno/jni_java2uno.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <algorithm>
#include <cassert>
diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx
index ecdab00e4512..510f7e5bb3ac 100644
--- a/bridges/source/jni_uno/jni_uno2java.cxx
+++ b/bridges/source/jni_uno/jni_uno2java.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <atomic>
#include <cassert>
diff --git a/canvas/source/cairo/cairo_canvas.cxx b/canvas/source/cairo/cairo_canvas.cxx
index 13e5fd23c9ca..134dabf26fc4 100644
--- a/canvas/source/cairo/cairo_canvas.cxx
+++ b/canvas/source/cairo/cairo_canvas.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx b/canvas/source/cairo/cairo_canvasbitmap.cxx
index 27ce9af37758..87f4ebc0c204 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.cxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <tools/diagnose_ex.h>
diff --git a/canvas/source/cairo/cairo_canvascustomsprite.cxx b/canvas/source/cairo/cairo_canvascustomsprite.cxx
index eeb0b2abc755..3883e051df6a 100644
--- a/canvas/source/cairo/cairo_canvascustomsprite.cxx
+++ b/canvas/source/cairo/cairo_canvascustomsprite.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/point/b2dpoint.hxx>
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index ec76b51bacb5..9db2102cf13d 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <algorithm>
#include <tuple>
diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx
index 18cf4d60a452..7f6962860d71 100644
--- a/canvas/source/cairo/cairo_devicehelper.cxx
+++ b/canvas/source/cairo/cairo_devicehelper.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/utils/canvastools.hxx>
#include <basegfx/utils/unopolypolygon.hxx>
diff --git a/canvas/source/cairo/cairo_spritecanvas.cxx b/canvas/source/cairo/cairo_spritecanvas.cxx
index 578fa1d12dbc..e90ab09b1c01 100644
--- a/canvas/source/cairo/cairo_spritecanvas.cxx
+++ b/canvas/source/cairo/cairo_spritecanvas.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
diff --git a/canvas/source/cairo/cairo_spritecanvashelper.cxx b/canvas/source/cairo/cairo_spritecanvashelper.cxx
index d60341790364..ccb0fff014af 100644
--- a/canvas/source/cairo/cairo_spritecanvashelper.cxx
+++ b/canvas/source/cairo/cairo_spritecanvashelper.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <boost/cast.hpp>
diff --git a/canvas/source/cairo/cairo_spritedevicehelper.cxx b/canvas/source/cairo/cairo_spritedevicehelper.cxx
index 5e14d3fc7e3f..a636a22f2e39 100644
--- a/canvas/source/cairo/cairo_spritedevicehelper.cxx
+++ b/canvas/source/cairo/cairo_spritedevicehelper.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/utils/canvastools.hxx>
#include <basegfx/utils/unopolypolygon.hxx>
diff --git a/canvas/source/cairo/cairo_spritehelper.cxx b/canvas/source/cairo/cairo_spritehelper.cxx
index 273188a24542..60e5f07c5e95 100644
--- a/canvas/source/cairo/cairo_spritehelper.cxx
+++ b/canvas/source/cairo/cairo_spritehelper.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
diff --git a/canvas/source/cairo/cairo_textlayout.cxx b/canvas/source/cairo/cairo_textlayout.cxx
index c5fd7f615a8a..49cf24da5214 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <math.h>
#include <memory>
diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx
index 55165bbcedcc..52462dd49699 100644
--- a/canvas/source/directx/dx_9rm.cxx
+++ b/canvas/source/directx/dx_9rm.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <string.h>
diff --git a/canvas/source/directx/dx_bitmapcanvashelper.cxx b/canvas/source/directx/dx_bitmapcanvashelper.cxx
index d8ce12c316bc..d05534bf4bc0 100644
--- a/canvas/source/directx/dx_bitmapcanvashelper.cxx
+++ b/canvas/source/directx/dx_bitmapcanvashelper.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <algorithm>
diff --git a/canvas/source/directx/dx_canvas.cxx b/canvas/source/directx/dx_canvas.cxx
index d2bfe126fb23..41e9d4816bec 100644
--- a/canvas/source/directx/dx_canvas.cxx
+++ b/canvas/source/directx/dx_canvas.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx
index 7fe441f081bf..1a252382a773 100644
--- a/canvas/source/directx/dx_canvashelper.cxx
+++ b/canvas/source/directx/dx_canvashelper.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <algorithm>
diff --git a/canvas/source/directx/dx_config.cxx b/canvas/source/directx/dx_config.cxx
index 39082b6f6e3f..6da728e02f2e 100644
--- a/canvas/source/directx/dx_config.cxx
+++ b/canvas/source/directx/dx_config.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/vector/b2ivector.hxx>
#include <com/sun/star/uno/Any.hxx>
diff --git a/canvas/source/directx/dx_spritecanvas.cxx b/canvas/source/directx/dx_spritecanvas.cxx
index b7c191120a14..8d08e53449b8 100644
--- a/canvas/source/directx/dx_spritecanvas.cxx
+++ b/canvas/source/directx/dx_spritecanvas.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
diff --git a/canvas/source/directx/dx_spritedevicehelper.cxx b/canvas/source/directx/dx_spritedevicehelper.cxx
index 330ec076bd65..2147dd9468f1 100644
--- a/canvas/source/directx/dx_spritedevicehelper.cxx
+++ b/canvas/source/directx/dx_spritedevicehelper.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/utils/canvastools.hxx>
#include <canvas/canvastools.hxx>
diff --git a/canvas/source/directx/dx_spritehelper.cxx b/canvas/source/directx/dx_spritehelper.cxx
index 310e7160de29..af4f340a5437 100644
--- a/canvas/source/directx/dx_spritehelper.cxx
+++ b/canvas/source/directx/dx_spritehelper.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
diff --git a/canvas/source/directx/dx_textlayout.cxx b/canvas/source/directx/dx_textlayout.cxx
index 789239064d97..16e2dc09129e 100644
--- a/canvas/source/directx/dx_textlayout.cxx
+++ b/canvas/source/directx/dx_textlayout.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
diff --git a/canvas/source/opengl/ogl_spritecanvas.cxx b/canvas/source/opengl/ogl_spritecanvas.cxx
index dfa6134a4dbe..f415f792809d 100644
--- a/canvas/source/opengl/ogl_spritecanvas.cxx
+++ b/canvas/source/opengl/ogl_spritecanvas.cxx
@@ -8,6 +8,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <com/sun/star/lang/NoSupportException.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
diff --git a/canvas/source/opengl/ogl_spritedevicehelper.cxx b/canvas/source/opengl/ogl_spritedevicehelper.cxx
index 08ab90564c68..eb38ed16bf02 100644
--- a/canvas/source/opengl/ogl_spritedevicehelper.cxx
+++ b/canvas/source/opengl/ogl_spritedevicehelper.cxx
@@ -8,6 +8,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/utils/canvastools.hxx>
#include <basegfx/utils/unopolypolygon.hxx>
diff --git a/canvas/source/opengl/ogl_textlayout.cxx b/canvas/source/opengl/ogl_textlayout.cxx
index 9a0d641b8b53..b5ad271f63e4 100644
--- a/canvas/source/opengl/ogl_textlayout.cxx
+++ b/canvas/source/opengl/ogl_textlayout.cxx
@@ -8,6 +8,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
diff --git a/canvas/source/tools/canvastools.cxx b/canvas/source/tools/canvastools.cxx
index d7a4ca991517..189efe4a2e75 100644
--- a/canvas/source/tools/canvastools.cxx
+++ b/canvas/source/tools/canvastools.cxx
@@ -52,6 +52,7 @@
#include <com/sun/star/util/Endianness.hpp>
#include <cppuhelper/implbase.hxx>
#include <rtl/instance.hxx>
+#include <sal/log.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/canvastools.hxx>
diff --git a/canvas/source/tools/spriteredrawmanager.cxx b/canvas/source/tools/spriteredrawmanager.cxx
index ee1d5d2b092f..08621b11700e 100644
--- a/canvas/source/tools/spriteredrawmanager.cxx
+++ b/canvas/source/tools/spriteredrawmanager.cxx
@@ -25,6 +25,7 @@
#include <basegfx/utils/canvastools.hxx>
#include <basegfx/vector/b2dsize.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
#include <canvas/spriteredrawmanager.hxx>
#include <boost/range/adaptor/reversed.hpp>
diff --git a/canvas/source/tools/surfaceproxy.cxx b/canvas/source/tools/surfaceproxy.cxx
index 0f4444020360..5c1bff2a5950 100644
--- a/canvas/source/tools/surfaceproxy.cxx
+++ b/canvas/source/tools/surfaceproxy.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/polygon/b2dpolygoncutandtouch.hxx>
#include <basegfx/polygon/b2dpolygontriangulator.hxx>
diff --git a/canvas/source/vcl/canvas.cxx b/canvas/source/vcl/canvas.cxx
index 93dde16ed5f1..59c200c85b7e 100644
--- a/canvas/source/vcl/canvas.cxx
+++ b/canvas/source/vcl/canvas.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
+#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/bitmapex.hxx>
#include <vcl/canvastools.hxx>
diff --git a/canvas/source/vcl/canvasbitmaphelper.cxx b/canvas/source/vcl/canvasbitmaphelper.cxx
index 3d99a3bcbe6e..5e5e6183f911 100644
--- a/canvas/source/vcl/canvasbitmaphelper.cxx
+++ b/canvas/source/vcl/canvasbitmaphelper.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index 529a0b7fdf91..2ccc4e2c4139 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -39,6 +39,7 @@
#include <com/sun/star/rendering/XPolyPolygon2D.hpp>
#include <rtl/math.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/bitmapaccess.hxx>
#include <vcl/canvastools.hxx>
diff --git a/canvas/source/vcl/spritecanvas.cxx b/canvas/source/vcl/spritecanvas.cxx
index a62bbdad06b3..aaac0c3c6697 100644
--- a/canvas/source/vcl/spritecanvas.cxx
+++ b/canvas/source/vcl/spritecanvas.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <algorithm>
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index ce81635eff22..626692d842d9 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <boost/cast.hpp>
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index 0af108c84306..0dc26bf448cc 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/numeric/ftools.hxx>
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx
index a93ac3af7d2a..f090ddd8b454 100644
--- a/chart2/source/controller/accessibility/AccessibleBase.cxx
+++ b/chart2/source/controller/accessibility/AccessibleBase.cxx
@@ -33,6 +33,7 @@
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <rtl/ustrbuf.hxx>
+#include <sal/log.hxx>
#include <vcl/svapp.hxx>
#include <rtl/uuid.h>
#include <cppuhelper/queryinterface.hxx>
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
index cce7e84dccbf..25ca7282567b 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
@@ -22,6 +22,8 @@
#include <DiagramHelper.hxx>
#include <unonames.hxx>
+#include <sal/log.hxx>
+
#include <com/sun/star/chart2/CurveStyle.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index 10a756ef1f9c..8ec8cb51464b 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -34,6 +34,7 @@
#include <vcl/GraphicObject.hxx>
#include <vcl/outdev.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Any;
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index 163592ac420c..f6af402eca65 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -32,6 +32,7 @@
#include <RegressionCurveHelper.hxx>
#include <rtl/math.hxx>
#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index bc52d9fe0cb0..15ce9829516a 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <rtl/math.hxx>
+#include <sal/log.hxx>
#include <vcl/dialog.hxx>
#include <vcl/layout.hxx>
#include <svl/stritem.hxx>
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 454d37282ddf..79a66e74034d 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -33,6 +33,7 @@
#include <vcl/layout.hxx>
#include <vcl/weld.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
namespace chart
{
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index 4af744d6477f..33f60b254856 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -42,6 +42,7 @@
#include <vcl/virdev.hxx>
#include <svx/svdview.hxx>
#include <svx/svdpage.hxx>
+#include <sal/log.hxx>
namespace chart
{
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 87886016a366..5dc89f2aafd1 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/chart2/Symbol.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <sal/log.hxx>
#include <svx/xflclit.hxx>
#include <svl/intitem.hxx>
#include <editeng/sizeitem.hxx>
diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
index 299bd30eee71..64755663375e 100644
--- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
@@ -27,6 +27,7 @@
#include <svl/whiter.hxx>
#include <svx/svxids.hrc>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
using namespace ::com::sun::star;
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index 4c7c9071e251..49b71f6dc1d1 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -37,6 +37,7 @@
#include <svl/ilstitem.hxx>
#include <rtl/math.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
#include <functional>
#include <algorithm>
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index 9dd03bf7ace3..a913c93a2277 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -27,6 +27,7 @@
#include "SchWhichPairs.hxx"
#include <unonames.hxx>
+#include <sal/log.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/sizeitem.hxx>
#include <svl/ilstitem.hxx>
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index b59a21dbbd24..c42390ad9b53 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -69,6 +69,7 @@
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/chart2/XDataProviderAccess.hpp>
+#include <sal/log.hxx>
#include <svx/sidebar/SelectionChangeHandler.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <toolkit/helper/vclunohelper.hxx>
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx
index 6713633a7b1d..4062334cdeb4 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -57,6 +57,7 @@
#include <svx/ActionDescriptionProvider.hxx>
#include <rtl/ustrbuf.hxx>
+#include <sal/log.hxx>
#include <vcl/svapp.hxx>
using namespace ::com::sun::star;
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index dc7c194b87dc..5746569a5836 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -30,6 +30,7 @@
#include <CommonConverters.hxx>
#include <svx/ActionDescriptionProvider.hxx>
+#include <sal/log.hxx>
#include <svx/svxids.hrc>
#include <svx/rectenum.hxx>
#include <svl/aeitem.hxx>
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index ff78fbf7e9d7..53962bfb2965 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -56,6 +56,7 @@
#include <memory>
+#include <sal/log.hxx>
#include <vcl/svapp.hxx>
#include <svx/ActionDescriptionProvider.hxx>
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 66bb107b185e..a7d12d1c5388 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -77,6 +77,7 @@
#include <rtl/math.hxx>
#include <svtools/acceleratorexecute.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
#define DRGPIX 2 // Drag MinMove in Pixel
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 2e655741eac5..4f22c0d224d7 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -33,6 +33,7 @@
#include "ShapeController.hxx"
#include <vcl/svapp.hxx>
+#include <sal/log.hxx>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
#include <com/sun/star/frame/XStorable.hpp>
diff --git a/chart2/source/controller/main/ToolbarController.cxx b/chart2/source/controller/main/ToolbarController.cxx
index 9d1f5b7a5be7..895413d2b9e7 100644
--- a/chart2/source/controller/main/ToolbarController.cxx
+++ b/chart2/source/controller/main/ToolbarController.cxx
@@ -18,6 +18,7 @@
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/frame/XFramesSupplier.hpp>
#include <cppuhelper/supportsservice.hxx>
+#include <sal/log.hxx>
namespace chart {
diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx
index f9ca9cdcd40a..91fb9b1b9d85 100644
--- a/chart2/source/model/filter/XMLFilter.cxx
+++ b/chart2/source/model/filter/XMLFilter.cxx
@@ -49,6 +49,7 @@
#include <com/sun/star/document/XGraphicStorageHandler.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
using namespace ::com::sun::star;
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 08c905f5202e..4eabcba9560c 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -67,6 +67,7 @@
#include <com/sun/star/chart2/XTimeBased.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <sal/log.hxx>
#include <svl/zforlist.hxx>
#include <tools/diagnose_ex.h>
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index dabde5d32ba4..2ad26d567268 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -56,6 +56,7 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
#include <algorithm>
diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx
index bb9656f76692..6028279d8b35 100644
--- a/chart2/source/model/template/ChartTypeManager.cxx
+++ b/chart2/source/model/template/ChartTypeManager.cxx
@@ -42,6 +42,7 @@
#include <com/sun/star/chart/ChartSolidType.hpp>
#include <com/sun/star/chart2/CurveStyle.hpp>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
#include <algorithm>
#include <iterator>
diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx
index bc81e3821cb0..dde227a99d98 100644
--- a/chart2/source/model/template/DataInterpreter.cxx
+++ b/chart2/source/model/template/DataInterpreter.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/chart2/data/XDataSink.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
#include <vector>
#include <algorithm>
diff --git a/chart2/source/model/template/XYDataInterpreter.cxx b/chart2/source/model/template/XYDataInterpreter.cxx
index e54abe2f285c..9b2819d4d02e 100644
--- a/chart2/source/model/template/XYDataInterpreter.cxx
+++ b/chart2/source/model/template/XYDataInterpreter.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/chart2/data/XDataSink.hpp>
#include <com/sun/star/util/XCloneable.hpp>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index 79fb6b92a3c8..fba7822fc127 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -42,6 +42,7 @@
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
+#include <sal/log.hxx>
#include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
diff --git a/chart2/source/tools/ChartModelHelper.cxx b/chart2/source/tools/ChartModelHelper.cxx
index 7ff25c70df0e..7ccd373dcb32 100644
--- a/chart2/source/tools/ChartModelHelper.cxx
+++ b/chart2/source/tools/ChartModelHelper.cxx
@@ -36,6 +36,7 @@
#include <com/sun/star/embed/XVisualObject.hpp>
#include <com/sun/star/view/XSelectionChangeListener.hpp>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
namespace chart
{
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index 59bea3f0b7ea..e54c5d2eadde 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -39,6 +39,7 @@
#include <comphelper/sequence.hxx>
#include <rtl/ustrbuf.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
#include <algorithm>
#include <iterator>
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 652a4e468841..20e5a2111755 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -59,6 +59,7 @@
#include <vcl/settings.hxx>
#include <comphelper/sequence.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index 3ea38e528e67..e034af78c5fd 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -39,6 +39,7 @@
#include <rtl/math.hxx>
#include <rtl/ustrbuf.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
using namespace ::com::sun::star;
diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx
index 3588bac6331e..85349fe6bd2c 100644
--- a/chart2/source/tools/LifeTime.cxx
+++ b/chart2/source/tools/LifeTime.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/util/XCloseListener.hpp>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
using namespace ::com::sun::star;
diff --git a/chart2/source/tools/NumberFormatterWrapper.cxx b/chart2/source/tools/NumberFormatterWrapper.cxx
index ce801820d837..52879263a352 100644
--- a/chart2/source/tools/NumberFormatterWrapper.cxx
+++ b/chart2/source/tools/NumberFormatterWrapper.cxx
@@ -24,6 +24,7 @@
#include <i18nlangtag/mslangid.hxx>
#include <com/sun/star/util/Date.hpp>
#include <osl/diagnose.h>
+#include <sal/log.hxx>
namespace chart
{
diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx
index 9ba6b85aefe4..25da0b374de3 100644
--- a/chart2/source/tools/ThreeDHelper.cxx
+++ b/chart2/source/tools/ThreeDHelper.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/drawing/ShadeMode.hpp>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
namespace chart
{
diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx
index 9a597b56c61c..f93798d4aee4 100644
--- a/chart2/source/tools/TitleHelper.cxx
+++ b/chart2/source/tools/TitleHelper.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <rtl/ustrbuf.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
namespace chart
{
diff --git a/chart2/source/tools/WrappedPropertySet.cxx b/chart2/source/tools/WrappedPropertySet.cxx
index 8ffe2e27b04f..4884716fa71b 100644
--- a/chart2/source/tools/WrappedPropertySet.cxx
+++ b/chart2/source/tools/WrappedPropertySet.cxx
@@ -21,6 +21,7 @@
#include <tools/solar.h>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
namespace chart
{
diff --git a/chart2/source/view/axes/VAxisProperties.cxx b/chart2/source/view/axes/VAxisProperties.cxx
index a3e56aeaf4ba..8597544e169b 100644
--- a/chart2/source/view/axes/VAxisProperties.cxx
+++ b/chart2/source/view/axes/VAxisProperties.cxx
@@ -29,6 +29,8 @@
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
+#include <sal/log.hxx>
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index b52ab1e5e642..903e3b38405a 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -37,6 +37,7 @@
#include <editeng/unoprnms.hxx>
#include <svx/unoshape.hxx>
#include <svx/unoshtxt.hxx>
+#include <sal/log.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx
index f4e051b47ee4..5cd0c127d1ca 100644
--- a/chart2/source/view/axes/VCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCoordinateSystem.cxx
@@ -39,6 +39,7 @@
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
#include <comphelper/sequence.hxx>
+#include <sal/log.hxx>
#include <algorithm>
#include <rtl/math.hxx>
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 7ecf7e9ebeeb..5b94b31acedb 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -38,6 +38,7 @@
#include <editeng/unoprnms.hxx>
#include <rtl/math.hxx>
+#include <sal/log.hxx>
#include <com/sun/star/drawing/DoubleSequence.hpp>
#include <com/sun/star/drawing/NormalsKind.hpp>
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index cab13732b6a9..b757b1286c3b 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -36,6 +36,7 @@
#include <com/sun/star/chart2/XTransformation.hpp>
#include <com/sun/star/chart2/DataPointGeometry3D.hpp>
#include <rtl/math.hxx>
+#include <sal/log.hxx>
#include <unordered_set>
namespace chart
diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx
index 8036f9e9aa42..ce25ee3b359f 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include <editeng/unoprnms.hxx>
#include <rtl/math.hxx>
+#include <sal/log.hxx>
#include <com/sun/star/drawing/DoubleSequence.hpp>
#include <com/sun/star/drawing/NormalsKind.hpp>
#include <com/sun/star/lang/XServiceName.hpp>
diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx
index 201aeafc928a..80b65eb9c78b 100644
--- a/chart2/source/view/charttypes/CandleStickChart.cxx
+++ b/chart2/source/view/charttypes/CandleStickChart.cxx
@@ -30,6 +30,7 @@
#include <DateHelper.hxx>
#include <rtl/math.hxx>
#include <editeng/unoprnms.hxx>
+#include <sal/log.hxx>
namespace chart
{
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index ec234ac26be2..de48a1d5e893 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/container/XChild.hpp>
#include <rtl/math.hxx>
+#include <sal/log.hxx>
#include <memory>
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 92ede0fb1a2d..2172206fb8c8 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -86,6 +86,7 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
#include <functional>
#include <map>
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index a545e84a485b..655d472f50e3 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -40,6 +40,7 @@
#include <svx/scene3d.hxx>
#include <svx/e3dsceneupdater.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
namespace chart
{
diff --git a/chart2/source/view/main/3DChartObjects.cxx b/chart2/source/view/main/3DChartObjects.cxx
index f4dcd0d3a62c..538308bfd539 100644
--- a/chart2/source/view/main/3DChartObjects.cxx
+++ b/chart2/source/view/main/3DChartObjects.cxx
@@ -10,6 +10,7 @@
#include <3DChartObjects.hxx>
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
+#include <sal/log.hxx>
#include <vcl/opengl/GLMHelper.hxx>
#include <vcl/opengl/OpenGLHelper.hxx>
diff --git a/chart2/source/view/main/AbstractShapeFactory.cxx b/chart2/source/view/main/AbstractShapeFactory.cxx
index 840878e2200f..58b3a9695e6b 100644
--- a/chart2/source/view/main/AbstractShapeFactory.cxx
+++ b/chart2/source/view/main/AbstractShapeFactory.cxx
@@ -36,6 +36,7 @@
#include <svx/svdocirc.hxx>
#include <svx/svdopath.hxx>
#include <vcl/svapp.hxx>
+#include <sal/log.hxx>
#include <BaseGFXHelper.hxx>
#include <basegfx/point/b2dpoint.hxx>
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 0e16536e7267..566f84244c72 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -120,6 +120,7 @@
#include <rtl/strbuf.hxx>
#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
#include <osl/conditn.hxx>
#include <o3tl/make_unique.hxx>
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 035353dbd795..e7ebaf102a44 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -19,6 +19,7 @@
#include <CommonConverters.hxx>
#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
#include <vcl/window.hxx>
#include <vcl/virdev.hxx>
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index 56e46040ac5e..f461bb80f290 100644
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -33,6 +33,7 @@
#include <vcl/virdev.hxx>
#include <vcl/dibtools.hxx>
#include <vcl/svapp.hxx>
+#include <sal/log.hxx>
#include <vcl/opengl/OpenGLHelper.hxx>
diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx
index e6c4980b8017..b1169292090c 100644
--- a/chart2/source/view/main/OpenglShapeFactory.cxx
+++ b/chart2/source/view/main/OpenglShapeFactory.cxx
@@ -47,6 +47,7 @@
#include <svx/svdocirc.hxx>
#include <svx/svdopath.hxx>
#include <vcl/openglwin.hxx>
+#include <sal/log.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/matrix/b3dhommatrix.hxx>
diff --git a/chart2/source/view/main/PropertyMapper.cxx b/chart2/source/view/main/PropertyMapper.cxx
index 4a4c65833c59..7427b280edd5 100644
--- a/chart2/source/view/main/PropertyMapper.cxx
+++ b/chart2/source/view/main/PropertyMapper.cxx
@@ -19,6 +19,7 @@
#include <PropertyMapper.hxx>
#include <unonames.hxx>
+#include <sal/log.hxx>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index f92742727165..8e3f67bb18b1 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -59,6 +59,7 @@
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/matrix/b3dhommatrix.hxx>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
#include <algorithm>
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 80655b8bd31e..22237347db42 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/chart2/Symbol.hpp>
#include <rtl/math.hxx>
+#include <sal/log.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx
index cae5ee197144..0112682bb7c4 100644
--- a/chart2/source/view/main/VLegendSymbolFactory.cxx
+++ b/chart2/source/view/main/VLegendSymbolFactory.cxx
@@ -27,6 +27,7 @@
#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/drawing/Direction3D.hpp>
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
diff --git a/chart2/source/view/main/VLineProperties.cxx b/chart2/source/view/main/VLineProperties.cxx
index 2f79f0e56391..128ea8a82cfe 100644
--- a/chart2/source/view/main/VLineProperties.cxx
+++ b/chart2/source/view/main/VLineProperties.cxx
@@ -20,6 +20,7 @@
#include <VLineProperties.hxx>
#include <com/sun/star/drawing/LineStyle.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <sal/log.hxx>
namespace chart
{
diff --git a/chart2/source/view/main/VTitle.cxx b/chart2/source/view/main/VTitle.cxx
index 3ef4e161bc15..7b74b93da35b 100644
--- a/chart2/source/view/main/VTitle.cxx
+++ b/chart2/source/view/main/VTitle.cxx
@@ -27,6 +27,7 @@
#include <com/sun/star/text/ControlCharacter.hpp>
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/text/XTextCursor.hpp>
+#include <sal/log.hxx>
namespace chart
{
diff --git a/cli_ure/source/uno_bridge/cli_bridge.cxx b/cli_ure/source/uno_bridge/cli_bridge.cxx
index 92368f1236dd..00d2747cac8c 100644
--- a/cli_ure/source/uno_bridge/cli_bridge.cxx
+++ b/cli_ure/source/uno_bridge/cli_bridge.cxx
@@ -27,6 +27,7 @@
#include "uno/mapping.hxx"
#include "typelib/typedescription.hxx"
#include "rtl/ustring.hxx"
+#include <sal/log.hxx>
#include "cli_bridge.h"
#include "cli_proxy.h"
diff --git a/cli_ure/source/uno_bridge/cli_proxy.cxx b/cli_ure/source/uno_bridge/cli_proxy.cxx
index 9225c9bf3272..f980aa3452bd 100644
--- a/cli_ure/source/uno_bridge/cli_proxy.cxx
+++ b/cli_ure/source/uno_bridge/cli_proxy.cxx
@@ -19,6 +19,7 @@
#include "typelib/typedescription.h"
#include "rtl/ustrbuf.hxx"
+#include <sal/log.hxx>
#include "com/sun/star/uno/RuntimeException.hpp"
#include "cli_proxy.h"
#include "cli_base.h"
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index c8b52857c648..6252a0ec603b 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <algorithm>
#include <cassert>
diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx
index 530827c6f31b..fc19da6d2570 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -10,6 +10,7 @@
#include <sal/config.h>
#include <rtl/ustring.hxx>
#include <rtl/bootstrap.hxx>
+#include <sal/log.hxx>
#include <comphelper/backupfilehelper.hxx>
#include <rtl/crc.h>
#include <algorithm>
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
index 3f470520fbf5..39dfb266197c 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <osl/diagnose.h>
+#include <sal/log.hxx>
#include <rtl/digest.h>
#include <rtl/random.h>
#include <string.h>
diff --git a/comphelper/source/misc/documentinfo.cxx b/comphelper/source/misc/documentinfo.cxx
index a2c0e7140c33..38be204a5f00 100644
--- a/comphelper/source/misc/documentinfo.cxx
+++ b/comphelper/source/misc/documentinfo.cxx
@@ -30,6 +30,7 @@
#include <osl/diagnose.h>
#include <osl/thread.h>
+#include <sal/log.hxx>
namespace comphelper {
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index 8beb633a9218..0b983dba6a6b 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -10,6 +10,7 @@
#include <comphelper/lok.hxx>
#include <iostream>
+#include <sstream>
namespace comphelper
{
diff --git a/comphelper/source/misc/numbers.cxx b/comphelper/source/misc/numbers.cxx
index e20b63fbfda3..2068223d3a71 100644
--- a/comphelper/source/misc/numbers.cxx
+++ b/comphelper/source/misc/numbers.cxx
@@ -19,6 +19,7 @@
#include <comphelper/numbers.hxx>
#include <osl/diagnose.h>
+#include <sal/log.hxx>
#include <com/sun/star/util/NumberFormat.hpp>
#include <com/sun/star/util/XNumberFormatTypes.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/comphelper/source/misc/scopeguard.cxx b/comphelper/source/misc/scopeguard.cxx
index d1f48f959fd2..04c697c940be 100644
--- a/comphelper/source/misc/scopeguard.cxx
+++ b/comphelper/source/misc/scopeguard.cxx
@@ -20,6 +20,7 @@
#include <comphelper/flagguard.hxx>
#include <osl/diagnose.h>
+#include <sal/log.hxx>
#include <com/sun/star/uno/Exception.hpp>
namespace comphelper {
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index f1e87937b8d2..4ce5d66e4f38 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -46,6 +46,7 @@
#include <rtl/digest.h>
#include <rtl/random.h>
#include <osl/diagnose.h>
+#include <sal/log.hxx>
#include <sax/tools/converter.hxx>
#include <ucbhelper/content.hxx>
diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx
index a910ef08e138..d23b6fa9431a 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -11,6 +11,7 @@
#include <com/sun/star/uno/Exception.hpp>
#include <sal/config.h>
+#include <sal/log.hxx>
#include <rtl/instance.hxx>
#include <rtl/string.hxx>
#include <salhelper/thread.hxx>
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx
index a6e0d3ef3982..d1f6e3a76c17 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -22,6 +22,7 @@
#include <comphelper/sequence.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <osl/diagnose.h>
+#include <sal/log.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#if OSL_DEBUG_LEVEL > 0
diff --git a/comphelper/source/property/property.cxx b/comphelper/source/property/property.cxx
index 6a795d76479a..b69ca62c4ac5 100644
--- a/comphelper/source/property/property.cxx
+++ b/comphelper/source/property/property.cxx
@@ -21,6 +21,7 @@
#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
#include <osl/diagnose.h>
+#include <sal/log.hxx>
#if OSL_DEBUG_LEVEL > 0
#include <rtl/strbuf.hxx>
diff --git a/compilerplugins/clang/test/dbgunhandledexception.cxx b/compilerplugins/clang/test/dbgunhandledexception.cxx
index 0abaef0dd06d..4ae15a58e55d 100644
--- a/compilerplugins/clang/test/dbgunhandledexception.cxx
+++ b/compilerplugins/clang/test/dbgunhandledexception.cxx
@@ -8,6 +8,7 @@
*/
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
void func1();
diff --git a/compilerplugins/clang/test/sallogareas.cxx b/compilerplugins/clang/test/sallogareas.cxx
index e3a58be70be6..1b172ebd00b6 100644
--- a/compilerplugins/clang/test/sallogareas.cxx
+++ b/compilerplugins/clang/test/sallogareas.cxx
@@ -8,6 +8,7 @@
*/
#include <tools/diagnose_ex.h>
+#include <sal/log.hxx>
void func1();
diff --git a/configmgr/source/dconf.cxx b/configmgr/source/dconf.cxx
index 642e37ec0257..659f217071ec 100644
--- a/configmgr/source/dconf.cxx
+++ b/configmgr/source/dconf.cxx
@@ -25,6 +25,7 @@ extern "C" {
#include <com/sun/star/uno/Sequence.hxx>
#include <rtl/ustrbuf.hxx>
+#include <sal/log.hxx>
#include "data.hxx"
#include "dconf.hxx"
commit 432a935d4e178b4e1e54c2ec864cb5e05bb03d9b
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Sat Jul 7 21:57:49 2018 +0100
tilebench: add --preinit mode.
Also cleanup DISPLAY to avoid various weird problems.
Change-Id: Ib480c94fc50baab6185ecadaabda9a8063cedfee
Reviewed-on: https://gerrit.libreoffice.org/57146
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/libreofficekit/qa/tilebench/tilebench.cxx b/libreofficekit/qa/tilebench/tilebench.cxx
index 0984a3feee5c..16fc047ce655 100644
--- a/libreofficekit/qa/tilebench/tilebench.cxx
+++ b/libreofficekit/qa/tilebench/tilebench.cxx
@@ -31,8 +31,8 @@ static int help( const char *error = nullptr )
{
if (error)
fprintf (stderr, "Error: %s\n\n", error);
- fprintf( stderr, "Usage: tilebench <absolute-path-to-libreoffice-install> [path to document]\n");
- fprintf( stderr, "\trenders a selection of small tiles from the document, checksums them and times the process\n" );
+ fprintf( stderr, "Usage: tilebench <absolute-path-to-libreoffice-install> [path to document] [--preinit] <options>\n");
+ fprintf( stderr, "\trenders a selection of small tiles from the document, checksums them and times the process based on options:\n" );
fprintf( stderr, "\t--tile\t[max parts|-1] [max tiles|-1]\n" );
fprintf( stderr, "\t--dialog\t<.uno:Command>\n" );
return 1;
@@ -286,6 +286,11 @@ void testDialog( Document *pDocument, const char *uno_cmd )
int main( int argc, char* argv[] )
{
+ int arg;
+
+ // avoid X oddness etc.
+ unsetenv("DISPLAY");
+
origin = getTimeNow();
if( argc < 4 ||
( argc > 1 && ( !strcmp( argv[1], "--help" ) || !strcmp( argv[1], "-h" ) ) ) )
@@ -297,19 +302,41 @@ int main( int argc, char* argv[] )
return 1;
}
+ arg = 2;
+ const char *doc_url = argv[arg++];
+ const char *mode = argv[arg++];
+
+ bool pre_init = false;
+ if (!strcmp(mode, "--preinit"))
+ {
+ pre_init = true;
+ mode = argv[arg++];
+ }
+
+ char user_url[8046];;
+ strcpy(user_url, "file:///");
+ strcat(user_url, argv[1]);
+ strcat(user_url, "../user");
+
+ if (pre_init)
+ {
+ aTimes.emplace_back("pre-initialization");
+ setenv("LOK_WHITELIST_LANGUAGES", "en_US", 0);
+ // coverity[tainted_string] - build time test tool
+ lok_preinit(argv[1], user_url);
+ aTimes.emplace_back();
+ }
+
aTimes.emplace_back("initialization");
// coverity[tainted_string] - build time test tool
- Office *pOffice = lok_cpp_init(argv[1]);
+ Office *pOffice = lok_cpp_init(argv[1], user_url);
if (pOffice == nullptr)
{
fprintf(stderr, "Failed to initialize Office from %s\n", argv[1]);
return 1;
}
-
aTimes.emplace_back();
- const char *doc_url = argv[2];
- const char *mode = argv[3];
Document *pDocument = nullptr;
aTimes.emplace_back("load document");
@@ -321,15 +348,15 @@ int main( int argc, char* argv[] )
{
if (!strcmp(mode, "--tile"))
{
- const int max_parts = (argc > 4 ? atoi(argv[4]) : -1);
- int max_tiles = (argc > 5 ? atoi(argv[5]) : -1);
+ const int max_parts = (argc > arg ? atoi(argv[arg++]) : -1);
+ int max_tiles = (argc > arg ? atoi(argv[arg++]) : -1);
const bool dump = true;
testTile (pDocument, max_parts, max_tiles, dump);
}
else if (!strcmp (mode, "--dialog"))
{
- const char *uno_cmd = argc > 4 ? argv[4] : nullptr;
+ const char *uno_cmd = argc > arg ? argv[arg++] : nullptr;
if (!uno_cmd)
{
switch (pDocument->getDocumentType())
commit 2872653997b614cc788c8a632a4d5ccb63c4670d
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Fri Jul 6 17:41:58 2018 +0100
lok: export preinit helper, and share code variously.
Change-Id: I09f2992c4ba45ce91190a9f61dd0fedd0eb8a581
Reviewed-on: https://gerrit.libreoffice.org/57145
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h
index ce5054ac91c4..103c11be926c 100644
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -17,6 +17,12 @@ extern "C"
{
#endif
+#if defined __GNUC__ || defined __clang__
+# define LOK_TOLERATE_UNUSED __attribute__((used))
+#else
+# define LOK_TOLERATE_UNUSED
+#endif
+
#if defined(__linux__) || defined (__FreeBSD_kernel__) || defined(_AIX) ||\
defined(_WIN32) || defined(__APPLE__) || defined (__NetBSD__) ||\
defined (__sun) || defined(__OpenBSD__)
@@ -294,15 +300,41 @@ static LibreOfficeKit *lok_init_2( const char *install_path, const char *user_p
#endif
}
-static
-#if defined __GNUC__ || defined __clang__
-__attribute__((used))
-#endif
+static LOK_TOLERATE_UNUSED
LibreOfficeKit *lok_init( const char *install_path )
{
return lok_init_2( install_path, NULL );
}
+#if !defined(IOS)
+static LOK_TOLERATE_UNUSED
+int lok_preinit( const char *install_path, const char *user_profile_url )
+{
+ void *dlhandle;
+ char *imp_lib;
+ LokHookPreInit *pSym;
+
+ dlhandle = lok_dlopen(install_path, &imp_lib);
+ if (!dlhandle)
+ return -1;
+
+ pSym = (LokHookPreInit *) lok_dlsym(dlhandle, "lok_preinit");
+ if (!pSym)
+ {
+ fprintf( stderr, "failed to find pre-init hook in library '%s'\n", imp_lib );
+ lok_dlclose( dlhandle );
+ free( imp_lib );
+ return -1;
+ }
+
+ free( imp_lib );
+
+ // dlhandle is "leaked"
+ // coverity[leaked_storage]
+ return pSym( install_path, user_profile_url );
+}
+#endif
+
#undef SEPARATOR // It is used at least in enum class MenuItemType
#endif // defined(__linux__) || defined (__FreeBSD_kernel__) || defined(_AIX) || defined(_WIN32) || defined(__APPLE__)
commit a8ebc12eabe2e49e7d1564027c7128898279944e
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Thu Jun 28 20:48:01 2018 +0100
tilebench: add dialog profiling mode.
Change-Id: I4661664d1206aacdaf22a4a8f05d7962547faf45
Reviewed-on: https://gerrit.libreoffice.org/56765
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/libreofficekit/Executable_tilebench.mk b/libreofficekit/Executable_tilebench.mk
index 9d8b2a134f99..9977a93351ed 100644
--- a/libreofficekit/Executable_tilebench.mk
+++ b/libreofficekit/Executable_tilebench.mk
@@ -14,6 +14,10 @@ $(eval $(call gb_Executable_set_include,tilebench,\
-I$(SRCDIR)/desktop/inc \
))
+$(eval $(call gb_Executable_use_externals,tilebench,\
+ boost_headers \
+))
+
$(eval $(call gb_Executable_use_libraries,tilebench,\
sal \
))
diff --git a/libreofficekit/qa/tilebench/tilebench.cxx b/libreofficekit/qa/tilebench/tilebench.cxx
index bb9201851612..0984a3feee5c 100644
--- a/libreofficekit/qa/tilebench/tilebench.cxx
+++ b/libreofficekit/qa/tilebench/tilebench.cxx
@@ -13,6 +13,8 @@
#include <cmath>
#include <vector>
+#include <atomic>
+#include <iostream>
#include <fstream>
#include <osl/time.h>
@@ -20,6 +22,9 @@
#include <LibreOfficeKit/LibreOfficeKitInit.h>
#include <LibreOfficeKit/LibreOfficeKit.hxx>
+#include <boost/property_tree/json_parser.hpp>
+#include <boost/optional.hpp>
+
using namespace lok;
static int help( const char *error = nullptr )
@@ -56,8 +61,9 @@ struct TimeRecord {
static std::vector< TimeRecord > aTimes;
/// Dump an array of RGBA or BGRA to an RGB PPM file.
-static void dumpTile(const int nWidth, const int nHeight, const int mode, const char* pBuffer)
+static void dumpTile(const int nWidth, const int nHeight, const int mode, const unsigned char* pBufferU)
{
+ auto pBuffer = reinterpret_cast<const char *>(pBufferU);
std::ofstream ofs("/tmp/dump_tile.ppm");
ofs << "P6\n"
<< nWidth << " "
@@ -154,7 +160,7 @@ void testTile( Document *pDocument, int max_parts,
nWidth/2, 2000, 1000, 1000); // not square
aTimes.emplace_back();
if (dump)
- dumpTile(nTilePixelWidth, nTilePixelHeight, mode, reinterpret_cast<char*>(pPixels));
+ dumpTile(nTilePixelWidth, nTilePixelHeight, mode, pPixels);
}
{ // 1:1
@@ -210,10 +216,72 @@ void testTile( Document *pDocument, int max_parts,
}
}
+static std::atomic<bool> bDialogRendered(false);
+static std::atomic<int> nDialogId(-1);
+
+void kitCallback(int nType, const char* pPayload, void* pData)
+{
+ Document *pDocument = static_cast<Document *>(pData);
+
+ if (nType != LOK_CALLBACK_WINDOW)
+ return;
+
+ std::stringstream aStream(pPayload);
+ boost::property_tree::ptree aRoot;
+ boost::property_tree::read_json(aStream, aRoot);
+ nDialogId = aRoot.get<unsigned>("id");
+ const std::string aAction = aRoot.get<std::string>("action");
+
+ if (aAction == "created")
+ {
+ const std::string aType = aRoot.get<std::string>("type");
+ const std::string aSize = aRoot.get<std::string>("size");
+ int nWidth = atoi(aSize.c_str());
+ int nHeight = 400;
+ const char *pComma = strstr(aSize.c_str(), ", ");
+ if (pComma)
+ nHeight = atoi(pComma + 2);
+ std::cerr << "Size " << aSize << " is " << nWidth << ", " << nHeight << "\n";
+
+ if (aType == "dialog")
+ {
+ aTimes.emplace_back(); // complete wait for dialog
+
+ unsigned char *pBuffer = new unsigned char[nWidth * nHeight * 4];
+
+ aTimes.emplace_back("render dialog");
+ pDocument->paintWindow(nDialogId, pBuffer, 0, 0, nWidth, nHeight);
+ dumpTile(nWidth, nHeight, pDocument->getTileMode(), pBuffer);
+ aTimes.emplace_back();
+
+ delete[] pBuffer;
+
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list