[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/win

2023-05-11 Thread anfanite396 (via logerrit)
 include/vcl/salnativewidgets.hxx  |   18 
 vcl/inc/menubarvalue.hxx  |   49 ++
 vcl/source/outdev/nativecontrols.cxx  |1 
 vcl/source/window/menubarwindow.cxx   |1 
 vcl/win/gdi/salnativewidgets-luna.cxx |1 
 5 files changed, 52 insertions(+), 18 deletions(-)

New commits:
commit 35845a056e332c1d78d536b613aeb3183af09a91
Author: anfanite396 
AuthorDate: Fri Mar 17 21:00:19 2023 +0530
Commit: Hossein 
CommitDate: Thu May 11 10:35:53 2023 +0200

tdf#97228 Move MenubarValue class to separate include file

Change-Id: I5da4bb1765f91d1f9d78e27221d243d5c2ef92e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149076
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx
index 21c852b6acbd..907c3b618f88 100644
--- a/include/vcl/salnativewidgets.hxx
+++ b/include/vcl/salnativewidgets.hxx
@@ -446,24 +446,6 @@ class SAL_DLLPUBLIC_RTTI SpinbuttonValue final : public 
ImplControlValue
 SpinbuttonValue & operator =(SpinbuttonValue &&) = delete; // due to 
ImplControlValue
 };
 
-/*  MenubarValue:
- *
- *  Value container for menubars specifying height of adjacent docking area
- */
-class MenubarValue final : public ImplControlValue
-{
-public:
-MenubarValue() : ImplControlValue( ControlType::Menubar, 0 )
-{ maTopDockingAreaHeight=0; }
-virtual ~MenubarValue() override;
-virtual MenubarValue* clone() const override;
-MenubarValue(MenubarValue const &) = default;
-MenubarValue(MenubarValue &&) = default;
-MenubarValue & operator =(MenubarValue const &) = delete; // due to 
ImplControlValue
-MenubarValue & operator =(MenubarValue &&) = delete; // due to 
ImplControlValue
-int maTopDockingAreaHeight;
-};
-
 /* MenupopupValue:
  *
  * Value container for menu items; specifies the rectangle for the whole item 
which
diff --git a/vcl/inc/menubarvalue.hxx b/vcl/inc/menubarvalue.hxx
new file mode 100644
index ..0185037ba326
--- /dev/null
+++ b/vcl/inc/menubarvalue.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_INC_MENUBARVALUE_HXX
+#define INCLUDED_VCL_INC_MENUBARVALUE_HXX
+
+#include 
+#include 
+
+/*  MenubarValue:
+ *
+ *  Value container for menubars specifying height of adjacent docking area
+ */
+class MenubarValue final : public ImplControlValue
+{
+public:
+MenubarValue()
+: ImplControlValue(ControlType::Menubar, 0)
+{
+maTopDockingAreaHeight = 0;
+}
+virtual ~MenubarValue() override;
+virtual MenubarValue* clone() const override;
+MenubarValue(MenubarValue const&) = default;
+MenubarValue(MenubarValue&&) = default;
+MenubarValue& operator=(MenubarValue const&) = delete; // due to 
ImplControlValue
+MenubarValue& operator=(MenubarValue&&) = delete; // due to 
ImplControlValue
+int maTopDockingAreaHeight;
+};
+
+#endif // INCLUDED_VCL_INC_MENUBARVALUE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/outdev/nativecontrols.cxx 
b/vcl/source/outdev/nativecontrols.cxx
index cee9408d6cfb..1b035c72bd2d 100644
--- a/vcl/source/outdev/nativecontrols.cxx
+++ b/vcl/source/outdev/nativecontrols.cxx
@@ -26,6 +26,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 
diff --git a/vcl/source/window/menubarwindow.cxx 
b/vcl/source/window/menubarwindow.cxx
index 0109bb559503..89e6b9246148 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include "bufferdevice.hxx"
+#include 
 
 // document closing button
 #define IID_DOCUMENTCLOSE 1
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx 
b/vcl/win/gdi/salnativewidgets-luna.cxx
index c837cb7a1c82..0dd5b2dd7442 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 


[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/win

2022-04-19 Thread VaibhavMalik4187 (via logerrit)
 include/vcl/salnativewidgets.hxx  |   22 --
 vcl/inc/toolbarvalue.hxx  |   52 ++
 vcl/source/gdi/salgdilayout.cxx   |1 
 vcl/source/outdev/nativecontrols.cxx  |1 
 vcl/source/window/dockingarea.cxx |1 
 vcl/source/window/toolbox.cxx |1 
 vcl/win/gdi/salnativewidgets-luna.cxx |1 
 7 files changed, 57 insertions(+), 22 deletions(-)

New commits:
commit ed007423eb4b6d1560d81317b20f291d81bced28
Author: VaibhavMalik4187 
AuthorDate: Wed Apr 20 00:10:15 2022 +0200
Commit: Hossein 
CommitDate: Wed Apr 20 01:36:42 2022 +0200

tdf#97228 Move ToolbarValue class to separate include file

The ToolbarValue class defined in include/vcl/salnativewidgets.hxx
was used only by vcl. Therefore, it is now moved to a seperate include
file named toolbarvalue.hxx which is inside vcl/inc folder.

This header file only contains the definition of the the ToolbarValue
class. All the files that references the ToolbarValue class now
include toolbarvalue.hxx.

Change-Id: I78fe3ceb09892c5d3f720ee3d66111bdcdf48db2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131321
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx
index 75c25d3f0fe0..057e05aac151 100644
--- a/include/vcl/salnativewidgets.hxx
+++ b/include/vcl/salnativewidgets.hxx
@@ -446,28 +446,6 @@ class SAL_DLLPUBLIC_RTTI SpinbuttonValue final : public 
ImplControlValue
 SpinbuttonValue & operator =(SpinbuttonValue &&) = delete; // due to 
ImplControlValue
 };
 
-/*  Toolbarvalue:
- *
- *  Value container for toolbars detailing the grip position
- */
-class ToolbarValue final : public ImplControlValue
-{
-public:
-ToolbarValue() : ImplControlValue( ControlType::Toolbar, 0 )
-{ mbIsTopDockingArea = false; }
-virtual ~ToolbarValue() override;
-virtual ToolbarValue* clone() const override;
-
-ToolbarValue(ToolbarValue const &) = default;
-ToolbarValue(ToolbarValue &&) = default;
-ToolbarValue & operator =(ToolbarValue const &) = delete; // due to 
ImplControlValue
-ToolbarValue & operator =(ToolbarValue &&) = delete; // due to 
ImplControlValue
-
-tools::Rectangle   maGripRect;
-boolmbIsTopDockingArea; // indicates that this is the top 
aligned dockingarea
-// adjacent to the menubar, only 
used on Windows
-};
-
 /*  MenubarValue:
  *
  *  Value container for menubars specifying height of adjacent docking area
diff --git a/vcl/inc/toolbarvalue.hxx b/vcl/inc/toolbarvalue.hxx
new file mode 100644
index ..b2c2d6dcb162
--- /dev/null
+++ b/vcl/inc/toolbarvalue.hxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_INC_TOOLBARVALUE_HXX
+#define INCLUDED_VCL_INC_TOOLBARVALUE_HXX
+
+#include 
+#include 
+
+/*  Toolbarvalue:
+ *
+ *  Value container for toolbars detailing the grip position
+ */
+class ToolbarValue final : public ImplControlValue
+{
+public:
+ToolbarValue()
+: ImplControlValue(ControlType::Toolbar, 0)
+{
+mbIsTopDockingArea = false;
+}
+virtual ~ToolbarValue() override;
+virtual ToolbarValue* clone() const override;
+ToolbarValue(ToolbarValue const&) = default;
+ToolbarValue(ToolbarValue&&) = default;
+ToolbarValue& operator=(ToolbarValue const&) = delete; // due to 
ImplControlValue
+ToolbarValue& operator=(ToolbarValue&&) = delete; // due to 
ImplControlValue
+tools::Rectangle maGripRect;
+// indicates that this is the top aligned dockingarea
+// adjacent to the menubar, only used on Windows
+bool mbIsTopDockingArea;
+};
+
+#endif // INCLUDED_VCL_INC_TOOLBARVALUE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 34f54a8ce870..89f9d0321daf 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 

[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/win

2021-09-27 Thread Jan-Marek Glogowski (via logerrit)
 include/vcl/print.hxx|1 
 vcl/inc/win/salprn.h |   13 +++
 vcl/source/gdi/print.cxx |   15 +---
 vcl/win/gdi/salprn.cxx   |   55 ---
 4 files changed, 46 insertions(+), 38 deletions(-)

New commits:
commit 1b7c53db87bb67eeb2591fbb186f7ac20eb00c68
Author: Jan-Marek Glogowski 
AuthorDate: Mon Sep 20 17:55:37 2021 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Mon Sep 27 11:46:18 2021 +0200

WIN lazy init WinSalInfoPrinter graphics

... and while at it make stuff private and add _ to the newly
private member variables.

The new assert revealed a bug in the SalGraphics refcounting,
because the virtual ReleaseGraphics is called from the
destructor, which was probably also the reason for the HACK
and comment in Printer::ImplReleaseFonts.

Change-Id: I7af0bda19be6810dd8c0ea5b74604381e2047407
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122371
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index e487e8aa82b5..b6ea7000436c 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -124,6 +124,7 @@ public:
 protected:
 virtual boolAcquireGraphics() const override;
 virtual voidReleaseGraphics( bool bRelease = true ) 
override;
+void ImplReleaseGraphics(bool bRelease = true);
 virtual voidImplReleaseFonts() override;
 
 virtual tools::LongGetGradientStepCount( tools::Long 
nMinRect ) override;
diff --git a/vcl/inc/win/salprn.h b/vcl/inc/win/salprn.h
index 209f064fd157..43eaa520c23d 100644
--- a/vcl/inc/win/salprn.h
+++ b/vcl/inc/win/salprn.h
@@ -40,19 +40,24 @@ struct SalDriverData
 
 class WinSalGraphics;
 
-class WinSalInfoPrinter : public SalInfoPrinter
+class WinSalInfoPrinter final : public SalInfoPrinter
 {
 public:
-WinSalGraphics*mpGraphics; // current Printer graphics
 OUString   maDriverName;   // printer driver name
 OUString   maDeviceName;   // printer device name
 OUString   maPortName; // printer port name
-HDCmhDC;   // printer hdc
-bool   mbGraphics; // is Graphics used
+
+private:
+HDC m_hDC;///< printer hdc
+WinSalGraphics* m_pGraphics;  ///< current Printer graphics
+bool m_bGraphics; ///< is Graphics used
+
 public:
 WinSalInfoPrinter();
 virtual ~WinSalInfoPrinter() override;
 
+void setHDC(HDC);
+
 virtual SalGraphics*AcquireGraphics() override;
 virtual voidReleaseGraphics( SalGraphics* pGraphics ) 
override;
 virtual boolSetup( weld::Window* pFrame, ImplJobSetup* 
pSetupData ) override;
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 36aa93f6ec37..df685efbcb13 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -550,13 +550,7 @@ bool Printer::AcquireGraphics() const
 
 void Printer::ImplReleaseFonts()
 {
-#ifdef UNX
-// HACK to fix an urgent P1 printing issue fast
-// WinSalPrinter does not respect GetGraphics/ReleaseGraphics conventions
-// so Printer::mpGraphics often points to a dead WinSalGraphics
-// TODO: fix WinSalPrinter's GetGraphics/ReleaseGraphics handling
 mpGraphics->ReleaseFonts();
-#endif
 mbNewFont = true;
 mbInitFont = true;
 
@@ -565,7 +559,7 @@ void Printer::ImplReleaseFonts()
 mpDeviceFontSizeList.reset();
 }
 
-void Printer::ReleaseGraphics( bool bRelease )
+void Printer::ImplReleaseGraphics(bool bRelease)
 {
 DBG_TESTSOLARMUTEX();
 
@@ -618,6 +612,11 @@ void Printer::ReleaseGraphics( bool bRelease )
 mpNextGraphics  = nullptr;
 }
 
+void Printer::ReleaseGraphics(bool bRelease)
+{
+ImplReleaseGraphics(bRelease);
+}
+
 void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
 {
 ImplSVData* pSVData = ImplGetSVData();
@@ -912,7 +911,7 @@ void Printer::dispose()
 
 mpPrinterOptions.reset();
 
-ReleaseGraphics();
+ImplReleaseGraphics();
 if ( mpInfoPrinter )
 ImplGetSVData()->mpDefInst->DestroyInfoPrinter( mpInfoPrinter );
 if ( mpDisplayDev )
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index 19e61d08ed03..21e779eb6156 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -1041,16 +1041,7 @@ static bool ImplUpdateSalPrnIC( WinSalInfoPrinter* 
pPrinter, const ImplJobSetup*
 if ( !hNewDC )
 return false;
 
-if ( pPrinter->mpGraphics )
-{
-assert(pPrinter->mpGraphics->getHDC() == pPrinter->mhDC);
-delete pPrinter->mpGraphics;
-DeleteDC(pPrinter->mhDC);
-}
-
-pPrinter->mpGraphics = ImplCreateSalPrnGraphics( hNewDC );
-pPrinter->mhDC  = hNewDC;
-
+pPrinter->setHDC(hNewDC);
 return true;
 

[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/win

2021-09-17 Thread Chris Sherlock (via logerrit)
 include/vcl/outdev.hxx |2 ++
 vcl/inc/PhysicalFontCollection.hxx |2 ++
 vcl/inc/PhysicalFontFamily.hxx |2 ++
 vcl/source/font/PhysicalFontCollection.cxx |2 ++
 vcl/source/font/PhysicalFontFamily.cxx |2 ++
 vcl/source/gdi/embeddedfontshelper.cxx |2 ++
 vcl/source/gdi/print.cxx   |2 ++
 vcl/source/gdi/virdev.cxx  |2 ++
 vcl/source/outdev/font.cxx |2 ++
 vcl/win/gdi/salfont.cxx|2 ++
 10 files changed, 20 insertions(+)

New commits:
commit 363d0e7e2875d0f99cf0442353202c96c097f5e2
Author: Chris Sherlock 
AuthorDate: Thu Sep 16 12:52:07 2021 +1000
Commit: Mike Kaganski 
CommitDate: Sat Sep 18 05:52:05 2021 +0200

vcl: add sal/config.h in preparation for patch

The convention is that we need to add sal/config.h to the start of
files.

 mikekaganski do you want me to add sal/config.h to cxx files
 as well as headers?
 chris_wot: rather ask sberg :)
<@sberg> chris_wot, always, always as first include, by convention
 thanks, I'll make sure I do this on any files I touch - if 
that's OK

I have a patch queued to rename ImplDeviceFontList to
PhysicalFontFaceCollection, which I am adding a test to. Submitting this
patch so I can hopefully one day land this patch.

Change-Id: I9d74f850745760774a9f8050023f584cf52dc070
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122167
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 0890da948a0b..b70ad6664038 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -19,6 +19,8 @@
 
 #pragma once
 
+#include 
+
 #include 
 #include 
 #include 
diff --git a/vcl/inc/PhysicalFontCollection.hxx 
b/vcl/inc/PhysicalFontCollection.hxx
index 89d6fdf222e8..38e591600467 100644
--- a/vcl/inc/PhysicalFontCollection.hxx
+++ b/vcl/inc/PhysicalFontCollection.hxx
@@ -19,6 +19,8 @@
 
 #pragma once
 
+#include 
+
 #include 
 
 #include "fontinstance.hxx"
diff --git a/vcl/inc/PhysicalFontFamily.hxx b/vcl/inc/PhysicalFontFamily.hxx
index f883d383be54..0137aca3b7c4 100644
--- a/vcl/inc/PhysicalFontFamily.hxx
+++ b/vcl/inc/PhysicalFontFamily.hxx
@@ -19,6 +19,8 @@
 
 #pragma once
 
+#include 
+
 #include 
 #include 
 
diff --git a/vcl/source/font/PhysicalFontCollection.cxx 
b/vcl/source/font/PhysicalFontCollection.cxx
index f6a693068d34..7161e5b35c49 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 
 #include 
diff --git a/vcl/source/font/PhysicalFontFamily.cxx 
b/vcl/source/font/PhysicalFontFamily.cxx
index d5ab2415b338..cd8634aeb0ed 100644
--- a/vcl/source/font/PhysicalFontFamily.cxx
+++ b/vcl/source/font/PhysicalFontFamily.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 #include 
 
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx 
b/vcl/source/gdi/embeddedfontshelper.cxx
index 1a67603da911..cbe4ceed3454 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
 #include 
 #include 
 #include 
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 91e516b67c86..f46d6ed03ec5 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 #include 
 #include 
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index bc9f9ffe5838..8f5a1d96f329 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 #include 
 
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 53727e3378cc..4161ea8ce236 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 #include 
 #include 
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index b65ea0ae69cf..e07680c87dec 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 #include 
 


[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/win

2021-09-17 Thread Chris Sherlock (via logerrit)
 include/vcl/outdev.hxx |2 +-
 vcl/inc/PhysicalFontCollection.hxx |2 +-
 vcl/inc/PhysicalFontFamily.hxx |2 +-
 vcl/inc/outdev.h   |2 +-
 vcl/source/font/PhysicalFontCollection.cxx |3 +--
 vcl/source/gdi/embeddedfontshelper.cxx |2 +-
 vcl/source/gdi/print.cxx   |2 +-
 vcl/source/gdi/virdev.cxx  |2 +-
 vcl/source/outdev/font.cxx |2 +-
 vcl/source/outdev/outdev.cxx   |2 +-
 vcl/win/gdi/salfont.cxx|2 +-
 11 files changed, 11 insertions(+), 12 deletions(-)

New commits:
commit fec9c3d6f272d45a73dd4dad390a69e444ffc9e2
Author: Chris Sherlock 
AuthorDate: Thu Sep 16 12:41:19 2021 +1000
Commit: Mike Kaganski 
CommitDate: Fri Sep 17 14:10:54 2021 +0200

vcl: update vim modelines in preparation for new change

I have a patch queued to rename ImplDeviceFontList to
PhysicalFontFaceCollection, which I am adding a test to. Submitting
patch to update the modelines in the files that I will change in that
patch.

Change-Id: I3b0b022cbfa7b05dbfbb5c2d03f6d68128c0598f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122232
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 2839e5c98da5..6e357b077a14 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1909,4 +1909,4 @@ protected:
 
 #endif // INCLUDED_VCL_OUTDEV_HXX
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/inc/PhysicalFontCollection.hxx 
b/vcl/inc/PhysicalFontCollection.hxx
index 87b94fe2ce3b..8af07e2883cf 100644
--- a/vcl/inc/PhysicalFontCollection.hxx
+++ b/vcl/inc/PhysicalFontCollection.hxx
@@ -93,4 +93,4 @@ private:
 
 #endif // INCLUDED_VCL_INC_PHYSICALFONTCOLLECTION_HXX
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/inc/PhysicalFontFamily.hxx b/vcl/inc/PhysicalFontFamily.hxx
index cd9f3f08e8d1..5c2ae12f24c8 100644
--- a/vcl/inc/PhysicalFontFamily.hxx
+++ b/vcl/inc/PhysicalFontFamily.hxx
@@ -98,4 +98,4 @@ private:
 
 #endif // INCLUDED_VCL_INC_PHYSICALFONTFAMILY_HXX
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h
index df4c2f205182..8746d790eb62 100644
--- a/vcl/inc/outdev.h
+++ b/vcl/inc/outdev.h
@@ -141,4 +141,4 @@ void ImplFontSubstitute( OUString& rFontName );
 
 #endif // INCLUDED_VCL_INC_OUTDEV_H
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/font/PhysicalFontCollection.cxx 
b/vcl/source/font/PhysicalFontCollection.cxx
index 1d047781de4d..f6a693068d34 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -1263,5 +1263,4 @@ PhysicalFontFamily* 
PhysicalFontCollection::FindFontFamily( FontSelectPattern& r
 return pFoundData;
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx 
b/vcl/source/gdi/embeddedfontshelper.cxx
index 5664857d3474..1a67603da911 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -329,4 +329,4 @@ OUString EmbeddedFontsHelper::fontFileUrl( 
std::u16string_view familyName, FontF
 return ok ? url : "";
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index ea3d70053978..91e516b67c86 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1683,4 +1683,4 @@ void Printer::SetSystemTextColor(SystemTextColorFlags, 
bool)
 SetTextColor(COL_BLACK);
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 5520ce93c073..bc9f9ffe5838 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -510,4 +510,4 @@ tools::Long VirtualDevice::GetFontExtLeading() const
 return mpFontInstance->mxFontMetric->GetExternalLeading();
 }
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 06c339dd795c..53727e3378cc 100644
--- a/vcl/source/outdev/font.cxx
+++ 

[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/win

2018-08-20 Thread Libreoffice Gerrit user
 include/vcl/outdev.hxx   |2 +-
 vcl/inc/svdata.hxx   |2 +-
 vcl/inc/window.h |2 +-
 vcl/source/app/svmain.cxx|5 ++---
 vcl/source/gdi/print.cxx |   12 +---
 vcl/source/gdi/virdev.cxx|7 +++
 vcl/source/outdev/font.cxx   |   42 --
 vcl/source/outdev/outdev.cxx |   11 +--
 vcl/source/window/window.cxx |8 
 vcl/win/gdi/salfont.cxx  |2 +-
 10 files changed, 39 insertions(+), 54 deletions(-)

New commits:
commit d9ab7be6c2e4494846081b089710f4dd0b1d2ad3
Author: Caolán McNamara 
AuthorDate: Sun Aug 19 21:17:52 2018 +0100
Commit: Caolán McNamara 
CommitDate: Mon Aug 20 15:20:45 2018 +0200

TODO: refcount ImplFontList

Change-Id: Ie125f1ac9c14a41e25c3e54beafca2f9e34e4c6f
Reviewed-on: https://gerrit.libreoffice.org/59310
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 28dab9a0df9c..ff37b971b344 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -340,7 +340,7 @@ private:
 GDIMetaFile*mpMetaFile;
 mutable rtl::Reference mpFontInstance;
 mutable std::shared_ptr mxFontCache;
-mutable PhysicalFontCollection* mpFontCollection;
+mutable std::shared_ptr mxFontCollection;
 mutable std::unique_ptr mpDeviceFontList;
 mutable std::unique_ptr mpDeviceFontSizeList;
 std::unique_ptr   mpOutDevStateStack;
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 7b35a0283e93..52980ec3260b 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -184,7 +184,7 @@ struct ImplSVGDIData
 VclPtr mpFirstPrinter; // First Printer
 VclPtr mpLastPrinter;  // Last Printer
 ImplPrnQueueList*   mpPrinterQueueList = nullptr;   // List of all 
printer queue
-PhysicalFontCollection* mpScreenFontList = nullptr; // Screen-Font-List
+std::shared_ptr mxScreenFontList; // 
Screen-Font-List
 std::shared_ptr mxScreenFontCache;   // 
Screen-Font-Cache
 ImplDirectFontSubstitution* mpDirectFontSubst = nullptr; // 
Font-Substitutions defined in Tools->Options->Fonts
 GraphicConverter*   mpGrfConverter = nullptr;   // Converter for 
graphics
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index f1a5f66ef830..21448efd9496 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -128,7 +128,7 @@ struct ImplFrameData
 VclPtr mpMouseMoveWin; //< last window, where 
MouseMove() called
 VclPtr mpMouseDownWin; //< last window, where 
MouseButtonDown() called
 std::vector > maOwnerDrawList;//< List of system 
windows with owner draw decoration
-PhysicalFontCollection* mpFontCollection;   //< Font-List for this frame
+std::shared_ptr mxFontCollection;   //< Font-List 
for this frame
 std::shared_ptr mxFontCache; //< Font-Cache for this frame
 sal_Int32   mnDPIX; //< Original Screen Resolution
 sal_Int32   mnDPIY; //< Original Screen Resolution
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index dcd049cd86b8..a91b5c6686db 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -360,7 +360,7 @@ bool InitVCL()
 pSVData->maAppData.mpAppFileName = new OUString( aNativeFileName );
 
 // Initialize global data
-pSVData->maGDIData.mpScreenFontList = new PhysicalFontCollection;
+pSVData->maGDIData.mxScreenFontList.reset(new PhysicalFontCollection);
 pSVData->maGDIData.mxScreenFontCache.reset(new ImplFontCache);
 pSVData->maGDIData.mpGrfConverter   = new GraphicConverter;
 
@@ -615,8 +615,7 @@ void DeInitVCL()
 pSVData->maWinData.mpAutoScrollWin = nullptr;
 pSVData->maWinData.mpLastWheelWindow = nullptr;
 
-delete pSVData->maGDIData.mpScreenFontList;
-pSVData->maGDIData.mpScreenFontList = nullptr;
+pSVData->maGDIData.mxScreenFontList.reset();
 pSVData->maGDIData.mxScreenFontCache.reset();
 
 // Deinit Sal
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 877c85e45315..4f62d062f8a2 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -677,9 +677,9 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
 
 // Init data
 ImplUpdatePageData();
-mpFontCollection = new PhysicalFontCollection();
+mxFontCollection.reset(new PhysicalFontCollection);
 mxFontCache.reset(new ImplFontCache);
-mpGraphics->GetDevFontList( mpFontCollection );
+mpGraphics->GetDevFontList(mxFontCollection.get());
 }
 
 void Printer::ImplInitDisplay()
@@ -691,7 +691,7 @@ void Printer::ImplInitDisplay()
 mpJobGraphics   = nullptr;
 
 mpDisplayDev = VclPtr::Create();
-mpFontCollection  = pSVData->maGDIData.mpScreenFontList;
+mxFontCollection= 

[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/win

2018-04-24 Thread Noel Grandin
 include/vcl/outdev.hxx |8 ++--
 vcl/inc/PhysicalFontCollection.hxx |4 +-
 vcl/source/font/PhysicalFontCollection.cxx |8 ++--
 vcl/source/gdi/print.cxx   |   49 -
 vcl/source/gdi/virdev.cxx  |   12 +--
 vcl/source/outdev/font.cxx |   18 ++
 vcl/source/outdev/outdev.cxx   |   18 +++---
 vcl/source/outdev/outdevstate.cxx  |   13 +--
 vcl/win/gdi/salfont.cxx|4 --
 9 files changed, 33 insertions(+), 101 deletions(-)

New commits:
commit baa91c67d6fb7f84f94795e6e3727cd0b5b23061
Author: Noel Grandin 
Date:   Mon Apr 23 10:27:40 2018 +0200

loplugin:useuniqueptr in OutputDevice

Change-Id: I6f933b54c11a4939870c3a788a4928f2d6f12850
Reviewed-on: https://gerrit.libreoffice.org/53349
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 8a2d63b44176..bd4af96456aa 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -333,10 +333,10 @@ private:
 mutable LogicalFontInstance*mpFontInstance;
 mutable ImplFontCache*  mpFontCache;
 mutable PhysicalFontCollection* mpFontCollection;
-mutable ImplDeviceFontList* mpDeviceFontList;
-mutable ImplDeviceFontSizeList* mpDeviceFontSizeList;
-OutDevStateStack*   mpOutDevStateStack;
-ImplOutDevData* mpOutDevData;
+mutable std::unique_ptr mpDeviceFontList;
+mutable std::unique_ptr mpDeviceFontSizeList;
+std::unique_ptr   mpOutDevStateStack;
+std::unique_ptr mpOutDevData;
 std::vector< VCLXGraphics* >*   mpUnoGraphicsList;
 vcl::PDFWriterImpl* mpPDFWriter;
 vcl::ExtOutDevData* mpExtOutDevData;
diff --git a/vcl/inc/PhysicalFontCollection.hxx 
b/vcl/inc/PhysicalFontCollection.hxx
index 2c32408ce158..1d5dbb908039 100644
--- a/vcl/inc/PhysicalFontCollection.hxx
+++ b/vcl/inc/PhysicalFontCollection.hxx
@@ -63,8 +63,8 @@ public:
 
 // misc utilities
 PhysicalFontCollection* Clone() const;
-ImplDeviceFontList* GetDeviceFontList() const;
-ImplDeviceFontSizeList* GetDeviceFontSizeList( const OUString& rFontName ) 
const;
+std::unique_ptr GetDeviceFontList() const;
+std::unique_ptr GetDeviceFontSizeList( const 
OUString& rFontName ) const;
 
 private:
 mutable boolmbMatchData;// true if matching attributes are 
initialized
diff --git a/vcl/source/font/PhysicalFontCollection.cxx 
b/vcl/source/font/PhysicalFontCollection.cxx
index 6f19f8c437b1..848fbdf06122 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -894,9 +894,9 @@ PhysicalFontCollection* PhysicalFontCollection::Clone() 
const
 return pClonedCollection;
 }
 
-ImplDeviceFontList* PhysicalFontCollection::GetDeviceFontList() const
+std::unique_ptr 
PhysicalFontCollection::GetDeviceFontList() const
 {
-ImplDeviceFontList* pDeviceFontList = new ImplDeviceFontList;
+std::unique_ptr pDeviceFontList(new 
ImplDeviceFontList);
 
 for (auto const& family : maPhysicalFontFamilies)
 {
@@ -907,9 +907,9 @@ ImplDeviceFontList* 
PhysicalFontCollection::GetDeviceFontList() const
 return pDeviceFontList;
 }
 
-ImplDeviceFontSizeList* PhysicalFontCollection::GetDeviceFontSizeList( const 
OUString& rFontName ) const
+std::unique_ptr 
PhysicalFontCollection::GetDeviceFontSizeList( const OUString& rFontName ) const
 {
-ImplDeviceFontSizeList* pDeviceFontSizeList = new ImplDeviceFontSizeList;
+std::unique_ptr pDeviceFontSizeList(new 
ImplDeviceFontSizeList);
 
 PhysicalFontFamily* pFontFamily = FindFontFamily( rFontName );
 if( pFontFamily != nullptr )
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index fa43dedea7a4..f5780ea2680f 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -586,17 +586,8 @@ void Printer::ImplReleaseFonts()
 mpFontInstance = nullptr;
 }
 
-if ( mpDeviceFontList )
-{
-delete mpDeviceFontList;
-mpDeviceFontList = nullptr;
-}
-
-if ( mpDeviceFontSizeList )
-{
-delete mpDeviceFontSizeList;
-mpDeviceFontSizeList = nullptr;
-}
+mpDeviceFontList.reset();
+mpDeviceFontSizeList.reset();
 }
 
 void Printer::ReleaseGraphics( bool bRelease )
@@ -960,16 +951,8 @@ void Printer::dispose()
 mpFontInstance->Release();
 mpFontInstance = nullptr;
 }
-if ( mpDeviceFontList )
-{
-delete mpDeviceFontList;
-mpDeviceFontList = nullptr;
-}
-if ( mpDeviceFontSizeList )
-{
-delete mpDeviceFontSizeList;
-mpDeviceFontSizeList = nullptr;
-}
+mpDeviceFontList.reset();
+ 

[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/win

2016-01-12 Thread Tor Lillqvist
 include/vcl/window.hxx |2 +-
 vcl/inc/window.h   |2 +-
 vcl/source/window/mouse.cxx|2 +-
 vcl/source/window/syschild.cxx |7 +--
 vcl/source/window/window.cxx   |   13 -
 vcl/source/window/winproc.cxx  |   21 ++---
 vcl/win/window/salframe.cxx|2 +-
 7 files changed, 31 insertions(+), 18 deletions(-)

New commits:
commit 0ba752201dca6129cc6b4a19ec93eb369eb70890
Author: Tor Lillqvist 
Date:   Mon Jan 11 17:17:10 2016 +0200

Re-work focus handling to use an idle handler

Gets rid of some flashing when using OpenGL.

Change-Id: I1273b960725bf868e7340eac3f2bad2f20e73d91
Reviewed-on: https://gerrit.libreoffice.org/21390
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 6b383bd..3ade2a8 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -537,7 +537,7 @@ public:
 DECL_DLLPRIVATE_LINK_TYPED( ImplHandlePaintHdl, Idle*, void );
 DECL_DLLPRIVATE_LINK_TYPED( ImplGenerateMouseMoveHdl, void*, void );
 DECL_DLLPRIVATE_LINK_TYPED( ImplTrackTimerHdl, Timer*, void );
-DECL_DLLPRIVATE_LINK_TYPED( ImplAsyncFocusHdl, void*, void );
+DECL_DLLPRIVATE_LINK_TYPED( ImplAsyncFocusHdl, Idle*, void );
 DECL_DLLPRIVATE_LINK_TYPED( ImplHandleResizeTimerHdl, Idle*, void );
 
 
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 64551af..4c8b541 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -143,7 +143,7 @@ struct ImplFrameData
 sal_Int32   mnDPIY; //< Original Screen Resolution
 ImplMapRes  maMapUnitRes;   //< for LogicUnitToPixel
 sal_uIntPtr mnAllSaveBackSize;  //< size of all bitmaps of 
saved backgrounds
-ImplSVEvent *   mnFocusId;  //< FocusId for PostUserLink
+Idle *  mpFocusIdle;
 ImplSVEvent *   mnMouseMoveId;  //< MoveId for PostUserLink
 longmnLastMouseX;   //< last x mouse position
 longmnLastMouseY;   //< last y mouse position
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 330cb70..4747abd 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -256,7 +256,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
 vcl::Window *pFrame = pSVData->maWinData.mpFirstFrame;
 while( pFrame  )
 {
-if( pFrame != mpWindowImpl->mpFrameWindow.get() && 
pFrame->mpWindowImpl->mpFrameData->mnFocusId )
+if( pFrame != mpWindowImpl->mpFrameWindow.get() && 
pFrame->mpWindowImpl->mpFrameData->mpFocusIdle )
 {
 bAsyncFocusWaiting = true;
 break;
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index d0c8e8c..7a007a9 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -79,10 +79,13 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject 
*/,
 // trigger a LoseFocus which matches the status
 // of the window with matching Activate-Status
 pWindow->ImplGetFrameData()->mbSysObjFocus = false;
-if ( !pWindow->ImplGetFrameData()->mnFocusId )
+if ( !pWindow->ImplGetFrameData()->mpFocusIdle )
 {
 pWindow->ImplGetFrameData()->mbStartFocusState = true;
-pWindow->ImplGetFrameData()->mnFocusId = 
Application::PostUserEvent( LINK( pWindow->ImplGetFrameWindow(), vcl::Window, 
ImplAsyncFocusHdl ), nullptr, true );
+pWindow->ImplGetFrameData()->mpFocusIdle = new 
Idle("loseFocus");
+pWindow->ImplGetFrameData()->mpFocusIdle->SetIdleHdl(LINK( 
pWindow->ImplGetFrameWindow(), vcl::Window, ImplAsyncFocusHdl ));
+
pWindow->ImplGetFrameData()->mpFocusIdle->SetPriority(SchedulerPriority::LOW);
+pWindow->ImplGetFrameData()->mpFocusIdle->Start();
 }
 break;
 
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index d508719..61e62b3 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -498,9 +498,12 @@ void Window::dispose()
 
 if ( mpWindowImpl->mpFrameData )
 {
-if ( mpWindowImpl->mpFrameData->mnFocusId )
-Application::RemoveUserEvent( mpWindowImpl->mpFrameData->mnFocusId 
);
-mpWindowImpl->mpFrameData->mnFocusId = nullptr;
+if ( mpWindowImpl->mpFrameData->mpFocusIdle )
+{
+mpWindowImpl->mpFrameData->mpFocusIdle->Stop();
+delete mpWindowImpl->mpFrameData->mpFocusIdle;
+mpWindowImpl->mpFrameData->mpFocusIdle = nullptr;
+}
 if ( mpWindowImpl->mpFrameData->mnMouseMoveId )
 Application::RemoveUserEvent( 
mpWindowImpl->mpFrameData->mnMouseMoveId );
 

[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/win

2016-01-12 Thread Miklos Vajna
 include/vcl/window.hxx |2 +-
 vcl/inc/window.h   |2 +-
 vcl/source/window/mouse.cxx|2 +-
 vcl/source/window/syschild.cxx |7 ++-
 vcl/source/window/window.cxx   |   13 +
 vcl/source/window/winproc.cxx  |   21 +++--
 vcl/win/window/salframe.cxx|2 +-
 7 files changed, 18 insertions(+), 31 deletions(-)

New commits:
commit e24ebfabf3dbcecaa52dba62397c4803571e5f81
Author: Miklos Vajna 
Date:   Tue Jan 12 17:44:52 2016 +0100

Revert "Re-work focus handling to use an idle handler"

This reverts commit 0ba752201dca6129cc6b4a19ec93eb369eb70890. It breaks
CppunitTest_desktop_lib on Linux.

diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 3ade2a8..6b383bd 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -537,7 +537,7 @@ public:
 DECL_DLLPRIVATE_LINK_TYPED( ImplHandlePaintHdl, Idle*, void );
 DECL_DLLPRIVATE_LINK_TYPED( ImplGenerateMouseMoveHdl, void*, void );
 DECL_DLLPRIVATE_LINK_TYPED( ImplTrackTimerHdl, Timer*, void );
-DECL_DLLPRIVATE_LINK_TYPED( ImplAsyncFocusHdl, Idle*, void );
+DECL_DLLPRIVATE_LINK_TYPED( ImplAsyncFocusHdl, void*, void );
 DECL_DLLPRIVATE_LINK_TYPED( ImplHandleResizeTimerHdl, Idle*, void );
 
 
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 4c8b541..64551af 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -143,7 +143,7 @@ struct ImplFrameData
 sal_Int32   mnDPIY; //< Original Screen Resolution
 ImplMapRes  maMapUnitRes;   //< for LogicUnitToPixel
 sal_uIntPtr mnAllSaveBackSize;  //< size of all bitmaps of 
saved backgrounds
-Idle *  mpFocusIdle;
+ImplSVEvent *   mnFocusId;  //< FocusId for PostUserLink
 ImplSVEvent *   mnMouseMoveId;  //< MoveId for PostUserLink
 longmnLastMouseX;   //< last x mouse position
 longmnLastMouseY;   //< last y mouse position
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 4747abd..330cb70 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -256,7 +256,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
 vcl::Window *pFrame = pSVData->maWinData.mpFirstFrame;
 while( pFrame  )
 {
-if( pFrame != mpWindowImpl->mpFrameWindow.get() && 
pFrame->mpWindowImpl->mpFrameData->mpFocusIdle )
+if( pFrame != mpWindowImpl->mpFrameWindow.get() && 
pFrame->mpWindowImpl->mpFrameData->mnFocusId )
 {
 bAsyncFocusWaiting = true;
 break;
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index 7a007a9..d0c8e8c 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -79,13 +79,10 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject 
*/,
 // trigger a LoseFocus which matches the status
 // of the window with matching Activate-Status
 pWindow->ImplGetFrameData()->mbSysObjFocus = false;
-if ( !pWindow->ImplGetFrameData()->mpFocusIdle )
+if ( !pWindow->ImplGetFrameData()->mnFocusId )
 {
 pWindow->ImplGetFrameData()->mbStartFocusState = true;
-pWindow->ImplGetFrameData()->mpFocusIdle = new 
Idle("loseFocus");
-pWindow->ImplGetFrameData()->mpFocusIdle->SetIdleHdl(LINK( 
pWindow->ImplGetFrameWindow(), vcl::Window, ImplAsyncFocusHdl ));
-
pWindow->ImplGetFrameData()->mpFocusIdle->SetPriority(SchedulerPriority::LOW);
-pWindow->ImplGetFrameData()->mpFocusIdle->Start();
+pWindow->ImplGetFrameData()->mnFocusId = 
Application::PostUserEvent( LINK( pWindow->ImplGetFrameWindow(), vcl::Window, 
ImplAsyncFocusHdl ), nullptr, true );
 }
 break;
 
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 61e62b3..d508719 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -498,12 +498,9 @@ void Window::dispose()
 
 if ( mpWindowImpl->mpFrameData )
 {
-if ( mpWindowImpl->mpFrameData->mpFocusIdle )
-{
-mpWindowImpl->mpFrameData->mpFocusIdle->Stop();
-delete mpWindowImpl->mpFrameData->mpFocusIdle;
-mpWindowImpl->mpFrameData->mpFocusIdle = nullptr;
-}
+if ( mpWindowImpl->mpFrameData->mnFocusId )
+Application::RemoveUserEvent( mpWindowImpl->mpFrameData->mnFocusId 
);
+mpWindowImpl->mpFrameData->mnFocusId = nullptr;
 if ( mpWindowImpl->mpFrameData->mnMouseMoveId )
 Application::RemoveUserEvent( 
mpWindowImpl->mpFrameData->mnMouseMoveId );
 mpWindowImpl->mpFrameData->mnMouseMoveId = nullptr;
@@ -573,7 +570,7 @@ void Window::dispose()
 }
 mpWindowImpl->mpFrame->SetCallback( nullptr, nullptr );
   

[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/win

2015-12-24 Thread Chris Sherlock
 include/vcl/outdev.hxx |2 +-
 vcl/inc/PhysicalFontCollection.hxx |4 ++--
 vcl/source/font/PhysicalFontCollection.cxx |4 ++--
 vcl/source/gdi/embeddedfontshelper.cxx |2 +-
 vcl/source/gdi/print.cxx   |   24 
 vcl/source/gdi/virdev.cxx  |6 +++---
 vcl/source/outdev/font.cxx |   16 
 vcl/source/outdev/outdev.cxx   |6 +++---
 vcl/source/outdev/outdevstate.cxx  |6 +++---
 vcl/win/gdi/salgdi3.cxx|2 +-
 10 files changed, 36 insertions(+), 36 deletions(-)

New commits:
commit 1ed5907b162daff49bbb195c870b1ac5c3f8e313
Author: Chris Sherlock 
Date:   Fri Dec 25 17:57:19 2015 +1100

vcl: Change GetDev{Font|Size}List to GetDevice{Font|Size}List

Change-Id: I19af1ad7fb00de8c1ac224fec53f032d972b9c59
Reviewed-on: https://gerrit.libreoffice.org/20934
Reviewed-by: Chris Sherlock 
Tested-by: Chris Sherlock 

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index c8b4fbd..9ef79f5 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -362,7 +362,7 @@ private:
 mutable ImplFontCache*  mpFontCache;
 mutable PhysicalFontCollection* mpFontCollection;
 mutable ImplDeviceFontList* mpDeviceFontList;
-mutable ImplGetDevSizeList* mpGetDevSizeList;
+mutable ImplGetDevSizeList* mpDeviceSizeList;
 OutDevStateStack*   mpOutDevStateStack;
 ImplOutDevData* mpOutDevData;
 std::vector< VCLXGraphics* >*   mpUnoGraphicsList;
diff --git a/vcl/inc/PhysicalFontCollection.hxx 
b/vcl/inc/PhysicalFontCollection.hxx
index 38b2973..5177d4a 100644
--- a/vcl/inc/PhysicalFontCollection.hxx
+++ b/vcl/inc/PhysicalFontCollection.hxx
@@ -62,8 +62,8 @@ public:
 
 // misc utilities
 PhysicalFontCollection* Clone( bool bScalable, bool bEmbeddable ) const;
-ImplDeviceFontList* GetDevFontList() const;
-ImplGetDevSizeList* GetDevSizeList( const OUString& rFontName ) const;
+ImplDeviceFontList* GetDeviceFontList() const;
+ImplGetDevSizeList* GetDeviceSizeList( const OUString& rFontName ) 
const;
 
 private:
 mutable boolmbMatchData;// true if matching attributes are 
initialized
diff --git a/vcl/source/font/PhysicalFontCollection.cxx 
b/vcl/source/font/PhysicalFontCollection.cxx
index df863b6..515c16f 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -953,7 +953,7 @@ PhysicalFontCollection* PhysicalFontCollection::Clone( bool 
bScalable, bool bEmb
 return pClonedCollection;
 }
 
-ImplDeviceFontList* PhysicalFontCollection::GetDevFontList() const
+ImplDeviceFontList* PhysicalFontCollection::GetDeviceFontList() const
 {
 ImplDeviceFontList* pDeviceFontList = new ImplDeviceFontList;
 
@@ -967,7 +967,7 @@ ImplDeviceFontList* 
PhysicalFontCollection::GetDevFontList() const
 return pDeviceFontList;
 }
 
-ImplGetDevSizeList* PhysicalFontCollection::GetDevSizeList( const OUString& 
rFontName ) const
+ImplGetDevSizeList* PhysicalFontCollection::GetDeviceSizeList( const OUString& 
rFontName ) const
 {
 ImplGetDevSizeList* pGetDevSizeList = new ImplGetDevSizeList;
 
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx 
b/vcl/source/gdi/embeddedfontshelper.cxx
index 54bd9e2..48c506f 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -230,7 +230,7 @@ OUString EmbeddedFontsHelper::fontFileUrl( const OUString& 
familyName, FontFamil
 SalGraphics* graphics = Application::GetDefaultDevice()->GetGraphics();
 PhysicalFontCollection fonts;
 graphics->GetDevFontList(  );
-std::unique_ptr< ImplDeviceFontList > fontInfo( fonts.GetDevFontList());
+std::unique_ptr< ImplDeviceFontList > fontInfo( fonts.GetDeviceFontList());
 PhysicalFontFace* selected = nullptr;
 for( int i = 0;
  i < fontInfo->Count();
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index f4e106c..18dfe97 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -642,10 +642,10 @@ void Printer::ImplReleaseFonts()
 mpDeviceFontList = nullptr;
 }
 
-if ( mpGetDevSizeList )
+if ( mpDeviceSizeList )
 {
-delete mpGetDevSizeList;
-mpGetDevSizeList = nullptr;
+delete mpDeviceSizeList;
+mpDeviceSizeList = nullptr;
 }
 }
 
@@ -1018,10 +1018,10 @@ void Printer::dispose()
 delete mpDeviceFontList;
 mpDeviceFontList = nullptr;
 }
-if ( mpGetDevSizeList )
+if ( mpDeviceSizeList )
 {
-delete mpGetDevSizeList;
-mpGetDevSizeList = nullptr;
+delete mpDeviceSizeList;
+mpDeviceSizeList = nullptr;
 }
 delete mpFontCache;
   

[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source vcl/win

2015-12-23 Thread Chris Sherlock
 include/vcl/outdev.hxx |4 ++--
 vcl/inc/PhysicalFontCollection.hxx |2 +-
 vcl/inc/PhysicalFontFamily.hxx |2 +-
 vcl/inc/outdev.h   |6 +++---
 vcl/source/font/PhysicalFontCollection.cxx |8 
 vcl/source/font/PhysicalFontFamily.cxx |2 +-
 vcl/source/gdi/embeddedfontshelper.cxx |2 +-
 vcl/source/gdi/print.cxx   |   24 
 vcl/source/gdi/virdev.cxx  |6 +++---
 vcl/source/outdev/font.cxx |   14 +++---
 vcl/source/outdev/outdev.cxx   |6 +++---
 vcl/source/outdev/outdevstate.cxx  |6 +++---
 vcl/win/gdi/salgdi3.cxx|2 +-
 13 files changed, 42 insertions(+), 42 deletions(-)

New commits:
commit 693fbbfacafed819798a99831ae7f642d10816c8
Author: Chris Sherlock 
Date:   Thu Dec 24 14:14:43 2015 +1100

Class ImplGetDevFontList renamed to ImplDeviceFontList

Change-Id: I1282b61eacc4bac2f049340bd11c9467c0c239c0
Reviewed-on: https://gerrit.libreoffice.org/20918
Tested-by: Jenkins 
Reviewed-by: Chris Sherlock 

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 6c40578..c8b4fbd 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -65,7 +65,7 @@ struct SystemFontData;
 struct SystemTextLayoutData;
 class ImplFontCache;
 class PhysicalFontCollection;
-class ImplGetDevFontList;
+class ImplDeviceFontList;
 class ImplGetDevSizeList;
 class ImplMultiTextLineInfo;
 class SalGraphics;
@@ -361,7 +361,7 @@ private:
 mutable ImplFontEntry*  mpFontEntry;
 mutable ImplFontCache*  mpFontCache;
 mutable PhysicalFontCollection* mpFontCollection;
-mutable ImplGetDevFontList* mpGetDevFontList;
+mutable ImplDeviceFontList* mpDeviceFontList;
 mutable ImplGetDevSizeList* mpGetDevSizeList;
 OutDevStateStack*   mpOutDevStateStack;
 ImplOutDevData* mpOutDevData;
diff --git a/vcl/inc/PhysicalFontCollection.hxx 
b/vcl/inc/PhysicalFontCollection.hxx
index 4adbbe7..38b2973 100644
--- a/vcl/inc/PhysicalFontCollection.hxx
+++ b/vcl/inc/PhysicalFontCollection.hxx
@@ -62,7 +62,7 @@ public:
 
 // misc utilities
 PhysicalFontCollection* Clone( bool bScalable, bool bEmbeddable ) const;
-ImplGetDevFontList* GetDevFontList() const;
+ImplDeviceFontList* GetDevFontList() const;
 ImplGetDevSizeList* GetDevSizeList( const OUString& rFontName ) const;
 
 private:
diff --git a/vcl/inc/PhysicalFontFamily.hxx b/vcl/inc/PhysicalFontFamily.hxx
index a2fbf1b..8c38586 100644
--- a/vcl/inc/PhysicalFontFamily.hxx
+++ b/vcl/inc/PhysicalFontFamily.hxx
@@ -61,7 +61,7 @@ public:
 PhysicalFontFace*   FindBestFontFace( const FontSelectPattern& rFSD ) 
const;
 
 voidGetFontHeights( std::set& rHeights ) const;
-voidUpdateDevFontList( ImplGetDevFontList& ) const;
+voidUpdateDevFontList( ImplDeviceFontList& ) const;
 voidUpdateCloneFontList( PhysicalFontCollection&,
  bool bScalable, bool bEmbeddable 
) const;
 
diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h
index d48fa99..90fad99 100644
--- a/vcl/inc/outdev.h
+++ b/vcl/inc/outdev.h
@@ -36,15 +36,15 @@ class VirtualDevice;
 class PhysicalFontCollection;
 enum class AddFontSubstituteFlags;
 
-// an ImplGetDevFontList is created by an PhysicalFontCollection
+// an ImplDeviceFontList is created by an PhysicalFontCollection
 // it becomes invalid when original PhysicalFontCollection is modified
-class ImplGetDevFontList
+class ImplDeviceFontList
 {
 private:
 std::vector maDevFontVector;
 
 public:
-ImplGetDevFontList(){ 
maDevFontVector.reserve(1024); }
+ImplDeviceFontList(){ 
maDevFontVector.reserve(1024); }
 voidAdd( PhysicalFontFace* pFace )  { 
maDevFontVector.push_back( pFace ); }
 PhysicalFontFace*   Get( int nIndex ) const { return maDevFontVector[ 
nIndex ]; }
 int Count() const   { return 
maDevFontVector.size(); }
diff --git a/vcl/source/font/PhysicalFontCollection.cxx 
b/vcl/source/font/PhysicalFontCollection.cxx
index 033499e..df863b6 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -953,18 +953,18 @@ PhysicalFontCollection* PhysicalFontCollection::Clone( 
bool bScalable, bool bEmb
 return pClonedCollection;
 }
 
-ImplGetDevFontList* PhysicalFontCollection::GetDevFontList() const
+ImplDeviceFontList* PhysicalFontCollection::GetDevFontList() const
 {
-ImplGetDevFontList* pGetDevFontList = new ImplGetDevFontList;
+ImplDeviceFontList* pDeviceFontList = new ImplDeviceFontList;