[Libreoffice-commits] core.git: Branch 'distro/vector/vector-5.4' - 18 commits - dbaccess/source desktop/source filter/CppunitTest_filter_textfilterdetect.mk filter/Module_filter.mk filter/qa filter/source framework/inc framework/source include/sfx2 include/svtools include/toolkit include/tools include/vcl package/inc package/source sfx2/sdi sfx2/source svtools/CppunitTest_svtools_html.mk svtools/qa svtools/source sw/inc sw/qa sw/source toolkit/source vcl/inc vcl/qa vcl/source vcl/unx
Miklos Vajna
vmiklos at collabora.co.uk
Wed Mar 14 08:21:47 UTC 2018
dbaccess/source/ui/misc/controllerframe.cxx | 2
dbaccess/source/ui/misc/databaseobjectview.cxx | 2
desktop/source/app/app.cxx | 4
filter/CppunitTest_filter_textfilterdetect.mk | 46 ++++++++
filter/Module_filter.mk | 1
filter/qa/unit/data/tdf114428.xhtml | 9 +
filter/qa/unit/textfilterdetect.cxx | 63 +++++++++++
filter/source/config/fragments/types/generic_HTML.xcu | 2
filter/source/textfilterdetect/filterdetect.cxx | 24 +++-
framework/inc/classes/taskcreator.hxx | 3
framework/source/classes/taskcreator.cxx | 10 +
framework/source/helper/tagwindowasmodified.cxx | 4
framework/source/loadenv/loadenv.cxx | 4
framework/source/services/desktop.cxx | 4
framework/source/services/frame.cxx | 23 +++-
framework/source/services/taskcreatorsrv.cxx | 11 +-
include/sfx2/docfile.hxx | 2
include/sfx2/sfxsids.hrc | 4
include/svtools/htmlkywd.hxx | 4
include/toolkit/awt/vclxwindow.hxx | 17 +++
include/tools/wintypes.hxx | 4
include/vcl/window.hxx | 22 +++-
package/inc/ZipPackage.hxx | 1
package/source/xstor/xfactory.cxx | 7 +
package/source/xstor/xstorage.cxx | 4
package/source/zippackage/ZipPackage.cxx | 4
sfx2/sdi/sfx.sdi | 4
sfx2/source/appl/appuno.cxx | 2
sfx2/source/doc/docfile.cxx | 96 +++++++++++++-----
sfx2/source/doc/guisaveas.cxx | 3
sfx2/source/doc/objstor.cxx | 19 +++
sfx2/source/doc/sfxbasemodel.cxx | 3
svtools/CppunitTest_svtools_html.mk | 1
svtools/qa/unit/testHtmlReader.cxx | 70 +++++++++++++
svtools/source/control/toolbarmenu.cxx | 2
svtools/source/svhtml/parhtml.cxx | 3
svtools/source/uno/popupwindowcontroller.cxx | 3
sw/inc/doc.hxx | 11 +-
sw/qa/extras/htmlexport/data/hello.html | 8 +
sw/qa/extras/htmlexport/htmlexport.cxx | 38 +++++++
sw/source/core/doc/docnew.cxx | 4
sw/source/core/docnode/ndtbl.cxx | 10 +
sw/source/core/unocore/unostyle.cxx | 3
sw/source/filter/html/htmlflywriter.cxx | 20 +--
sw/source/filter/html/wrthtml.cxx | 15 ++
sw/source/filter/html/wrthtml.hxx | 2
sw/source/uibase/app/docstyle.cxx | 23 ++--
toolkit/source/controls/unocontrol.cxx | 55 +++++++---
vcl/inc/unx/genpspgraphics.h | 5
vcl/inc/unx/glyphcache.hxx | 1
vcl/inc/unx/gtk/gtkframe.hxx | 1
vcl/inc/unx/i18n_cb.hxx | 2
vcl/inc/unx/i18n_xkb.hxx | 3
vcl/inc/unx/printergfx.hxx | 1
vcl/inc/unx/saldisp.hxx | 3
vcl/inc/unx/salframe.h | 3
vcl/inc/window.h | 4
vcl/qa/cppunit/wmf/wmfimporttest.cxx | 4
vcl/source/filter/wmf/enhwmf.cxx | 10 +
vcl/source/filter/wmf/winmtf.hxx | 5
vcl/source/filter/wmf/winwmf.cxx | 11 --
vcl/source/fontsubset/cff.cxx | 78 --------------
vcl/source/gdi/pdfwriter_impl.cxx | 8 -
vcl/source/gdi/pdfwriter_impl.hxx | 2
vcl/source/gdi/pngread.cxx | 4
vcl/source/window/dockmgr.cxx | 15 --
vcl/source/window/menubarwindow.cxx | 1
vcl/source/window/menubarwindow.hxx | 3
vcl/source/window/menufloatingwindow.cxx | 1
vcl/source/window/menufloatingwindow.hxx | 1
vcl/source/window/mouse.cxx | 3
vcl/source/window/toolbox.cxx | 4
vcl/source/window/window.cxx | 11 --
vcl/source/window/window2.cxx | 4
vcl/source/window/winproc.cxx | 1
vcl/unx/generic/app/i18n_cb.cxx | 1
vcl/unx/generic/app/i18n_ic.cxx | 1
vcl/unx/generic/app/i18n_status.cxx | 5
vcl/unx/generic/app/i18n_xkb.cxx | 4
vcl/unx/generic/app/saldisp.cxx | 4
vcl/unx/generic/app/wmadaptor.cxx | 1
vcl/unx/generic/dtrans/X11_selection.cxx | 14 --
vcl/unx/generic/dtrans/X11_selection.hxx | 7 -
vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 15 --
vcl/unx/generic/print/common_gfx.cxx | 4
vcl/unx/generic/print/genprnpsp.cxx | 4
vcl/unx/generic/print/genpspgraphics.cxx | 9 -
vcl/unx/generic/print/glyphset.cxx | 1
vcl/unx/generic/print/glyphset.hxx | 1
vcl/unx/generic/window/salframe.cxx | 5
vcl/unx/gtk/gtksalframe.cxx | 5
vcl/unx/gtk3/gtk3gtkframe.cxx | 5
92 files changed, 602 insertions(+), 349 deletions(-)
New commits:
commit bc2b8cbacb07efe69c5f11b4e15ecedff4801515
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Jan 25 12:21:12 2018 +0100
tdf#115227 svtools: suppress UNO notifications for color selectors
This is nominally a regression from commit
43bc3031483d172eccd72c3804e2d4fc2ef37de4 (unify color selectors,
2016-10-28), but that just changed the Writer color picker to behave the
same way as the Impress one.
The Impress one started to emit these events with
daeed90f4586eb9533041fb89bee163a5193596c (re-base on ALv2 code.
Includes:, 2012-11-15), to fix i#118707, improving accessibility.
That means either the focus changes and then accessibility is happy or
the focus does not change and then the UNO API client only gets events
when the user actually switches to an other window.
Fix the problem with suppressing UNO-level notifications for the
problematic events, by moving the existing VclListenerLock to a public
header and using it at two more places in svtools.
This should address not just color selectors, but in general other
toolbar menus / popup windows.
Change-Id: If427708c5b9fe4fa49cb8f00ec04b32cb28eb391
Reviewed-on: https://gerrit.libreoffice.org/48570
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
(cherry picked from commit 250ad9311a613d9b4e1cf5cf5fdaf33d9b326220)
diff --git a/include/toolkit/awt/vclxwindow.hxx b/include/toolkit/awt/vclxwindow.hxx
index 7c7913eadb56..aae9c7698312 100644
--- a/include/toolkit/awt/vclxwindow.hxx
+++ b/include/toolkit/awt/vclxwindow.hxx
@@ -232,6 +232,23 @@ public:
virtual css::uno::Reference< css::awt::XStyleSettings > SAL_CALL getStyleSettings() override;
};
+class TOOLKIT_DLLPUBLIC VclListenerLock
+{
+private:
+ VCLXWindow* m_pLockWindow;
+
+public:
+ explicit VclListenerLock(VCLXWindow* _pLockWindow);
+ /**
+ * @param bSystemWindow - if pVclWindow or its first system window parent
+ * is locked.
+ */
+ explicit VclListenerLock(vcl::Window* pVclWindow, bool bSystemWindow);
+ ~VclListenerLock();
+ VclListenerLock(const VclListenerLock&) = delete;
+ VclListenerLock& operator=(const VclListenerLock&) = delete;
+};
+
#endif // INCLUDED_TOOLKIT_AWT_VCLXWINDOW_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 17c666288fc6..f6f7bb463a99 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -35,6 +35,7 @@
#include <svtools/framestatuslistener.hxx>
#include <svtools/valueset.hxx>
#include <svtools/toolbarmenu.hxx>
+#include <toolkit/awt/vclxwindow.hxx>
#include "toolbarmenuimp.hxx"
using namespace ::com::sun::star::uno;
@@ -1477,6 +1478,7 @@ bool ToolbarPopup::IsInPopupMode()
void ToolbarPopup::EndPopupMode()
{
+ VclListenerLock aLock(this, /*bSystemWindow=*/true);
GetDockingManager()->EndPopupMode(this);
}
diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx
index dd4f6cf7a820..18da3a341a21 100644
--- a/svtools/source/uno/popupwindowcontroller.cxx
+++ b/svtools/source/uno/popupwindowcontroller.cxx
@@ -19,6 +19,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <toolkit/helper/vclunohelper.hxx>
+#include <toolkit/awt/vclxwindow.hxx>
#include <vcl/toolbox.hxx>
#include <vcl/svapp.hxx>
@@ -206,6 +207,8 @@ Reference< awt::XWindow > SAL_CALL PopupWindowController::createPopupWindow()
pWin->EnableDocking();
mxImpl->SetPopupWindow(pWin,pToolBox);
+
+ VclListenerLock aLock(pWin, /*bSystemWindow=*/true);
vcl::Window::GetDockingManager()->StartPopupMode( pToolBox, pWin, eFloatFlags );
}
}
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 3233f71081c2..33b66bddfae7 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -94,27 +94,50 @@ static Sequence< OUString> lcl_ImplGetPropertyNames( const Reference< XMultiProp
return aNames;
}
-
-class VclListenerLock
+namespace
{
-private:
- VCLXWindow* m_pLockWindow;
-
-public:
- explicit VclListenerLock( VCLXWindow* _pLockWindow )
- : m_pLockWindow( _pLockWindow )
+VCLXWindow* GetParentSystemWindow(vcl::Window* pWindow)
+{
+ while (pWindow)
{
- if ( m_pLockWindow )
- m_pLockWindow->suspendVclEventListening( );
+ if (pWindow->IsSystemWindow())
+ break;
+
+ pWindow = pWindow->GetParent();
}
- ~VclListenerLock()
+
+ uno::Reference<awt::XWindow> xWindow = VCLUnoHelper::GetInterface(pWindow);
+ return VCLXWindow::GetImplementation(xWindow);
+}
+}
+
+VclListenerLock::VclListenerLock(VCLXWindow* _pLockWindow)
+ : m_pLockWindow(_pLockWindow)
+{
+ if (m_pLockWindow)
+ m_pLockWindow->suspendVclEventListening();
+}
+
+VclListenerLock::VclListenerLock(vcl::Window* pVclWindow, bool bSystemWindow)
+ : m_pLockWindow(nullptr)
+{
+ if (bSystemWindow)
+ m_pLockWindow = GetParentSystemWindow(pVclWindow);
+ else
{
- if ( m_pLockWindow )
- m_pLockWindow->resumeVclEventListening( );
+ uno::Reference<awt::XWindow> xWindow = VCLUnoHelper::GetInterface(pVclWindow);
+ m_pLockWindow = VCLXWindow::GetImplementation(xWindow);
}
- VclListenerLock(const VclListenerLock&) = delete;
- VclListenerLock& operator=(const VclListenerLock&) = delete;
-};
+
+ if (m_pLockWindow)
+ m_pLockWindow->suspendVclEventListening();
+}
+
+VclListenerLock::~VclListenerLock()
+{
+ if (m_pLockWindow)
+ m_pLockWindow->resumeVclEventListening();
+}
typedef ::std::map< OUString, sal_Int32 > MapString2Int;
struct UnoControl_Data
commit 6239927f3a9b972c09134b1e672a3fadb000e080
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Jan 17 17:24:35 2018 +0100
framework: disable layout manager in hidden frames
The point of hidden frames is that they are not visible on the UI, only their
doc model / layout is accessible via the API or file format conversion. That
means that laying out the UI elements like menus and toolbars is pointless.
So change Frame::initialize() and Frame::setLayoutManager() to not enable the
layout manager for hidden frames. To do this, we need a new window style flag,
as both hidden and visible frames have an underlying hidden window at the time
the framework layout manager would be enabled.
Times for 200 hello world inputs: 5780 -> 5054 ms is spent in XHTML-load + ODT
export + close (87% of original).
Reviewed-on: https://gerrit.libreoffice.org/48068
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
(cherry picked from commit 4a0f506f0d8c2a017f0cf880481d3c0c32a48909)
Conflicts:
framework/source/loadenv/loadenv.cxx
Change-Id: I841507bbb62f8fc2979d20e2d579d0bb47b98f37
diff --git a/framework/inc/classes/taskcreator.hxx b/framework/inc/classes/taskcreator.hxx
index e5d9916e9564..4288f6d6dd45 100644
--- a/framework/inc/classes/taskcreator.hxx
+++ b/framework/inc/classes/taskcreator.hxx
@@ -27,6 +27,7 @@
#include <com/sun/star/uno/Reference.hxx>
#include <rtl/ustring.hxx>
+#include <unotools/mediadescriptor.hxx>
namespace framework{
@@ -53,7 +54,7 @@ class TaskCreator final
TaskCreator( const css::uno::Reference< css::uno::XComponentContext >& xContext );
~TaskCreator( );
- css::uno::Reference< css::frame::XFrame > createTask( const OUString& sName );
+ css::uno::Reference< css::frame::XFrame > createTask( const OUString& sName, const utl::MediaDescriptor& rDesciprtor );
}; // class TaskCreator
diff --git a/framework/source/classes/taskcreator.cxx b/framework/source/classes/taskcreator.cxx
index 9994fa944c70..f4097eb1b4b9 100644
--- a/framework/source/classes/taskcreator.cxx
+++ b/framework/source/classes/taskcreator.cxx
@@ -57,7 +57,7 @@ TaskCreator::~TaskCreator()
/*-****************************************************************************************************
TODO document me
*//*-*****************************************************************************************************/
-css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const OUString& sName )
+css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const OUString& sName, const utl::MediaDescriptor& rDescriptor )
{
css::uno::Reference< css::lang::XSingleServiceFactory > xCreator;
OUString sCreator = IMPLEMENTATIONNAME_FWK_TASKCREATOR;
@@ -86,7 +86,7 @@ css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const OUStrin
if ( ! xCreator.is())
xCreator = css::frame::TaskCreator::create(m_xContext);
- css::uno::Sequence< css::uno::Any > lArgs(5);
+ css::uno::Sequence< css::uno::Any > lArgs(6);
css::beans::NamedValue aArg;
aArg.Name = ARGUMENT_PARENTFRAME;
@@ -109,6 +109,12 @@ css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const OUStrin
aArg.Value <<= sName;
lArgs[4] <<= aArg;
+ bool bHidden
+ = rDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN(), false);
+ aArg.Name = "Hidden";
+ aArg.Value <<= bHidden;
+ lArgs[5] <<= aArg;
+
css::uno::Reference< css::frame::XFrame > xTask(xCreator->createInstanceWithArguments(lArgs), css::uno::UNO_QUERY_THROW);
return xTask;
}
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 99dbb690afb6..78eb9576fd46 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -84,6 +84,7 @@
#include <rtl/bootstrap.hxx>
#include <vcl/svapp.hxx>
#include <cppuhelper/implbase.hxx>
+#include <classes/taskcreator.hxx>
const char PROP_TYPES[] = "Types";
const char PROP_NAME[] = "Name";
@@ -985,7 +986,8 @@ bool LoadEnv::impl_loadContent()
{
if (! impl_furtherDocsAllowed())
return false;
- m_xTargetFrame = m_xBaseFrame->findFrame(SPECIALTARGET_BLANK, 0);
+ TaskCreator aCreator(m_xContext);
+ m_xTargetFrame = aCreator.createTask(SPECIALTARGET_BLANK, m_lMediaDescriptor);
m_bCloseFrameOnError = m_xTargetFrame.is();
}
else
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index c0ac034cc801..943dd2e33a29 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -974,7 +974,7 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL Desktop::findFrame( const OUS
if ( sTargetFrameName==SPECIALTARGET_BLANK )
{
TaskCreator aCreator( m_xContext );
- xTarget = aCreator.createTask(sTargetFrameName);
+ xTarget = aCreator.createTask(sTargetFrameName, utl::MediaDescriptor());
}
// I.II) "_top"
@@ -1058,7 +1058,7 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL Desktop::findFrame( const OUS
)
{
TaskCreator aCreator( m_xContext );
- xTarget = aCreator.createTask(sTargetFrameName);
+ xTarget = aCreator.createTask(sTargetFrameName, utl::MediaDescriptor());
}
}
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index a4e21ae052b8..9cb41494d655 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -412,6 +412,8 @@ private:
bool m_bSelfClose;
/// indicates, if this frame is used in hidden mode or not
bool m_bIsHidden;
+ /// The container window has WindowExtendedStyle::DocHidden set.
+ bool m_bDocHidden = false;
/// is used to layout the child windows of the frame.
css::uno::Reference< css::frame::XLayoutManager2 > m_xLayoutManager;
css::uno::Reference< css::frame::XDispatchInformationProvider > m_xDispatchInfoHelper;
@@ -772,8 +774,13 @@ void SAL_CALL Frame::initialize( const css::uno::Reference< css::awt::XWindow >&
// if window is initially visible, we will never get a windowShowing event
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xWindow);
- if (pWindow && pWindow->IsVisible())
- m_bIsHidden = false;
+ if (pWindow)
+ {
+ if (pWindow->IsVisible())
+ m_bIsHidden = false;
+ m_bDocHidden
+ = static_cast<bool>(pWindow->GetExtendedStyle() & WindowExtendedStyle::DocHidden);
+ }
css::uno::Reference< css::frame::XLayoutManager2 > xLayoutManager = m_xLayoutManager;
@@ -782,7 +789,9 @@ void SAL_CALL Frame::initialize( const css::uno::Reference< css::awt::XWindow >&
aWriteLock.clear();
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */
- if (xLayoutManager.is())
+ // Avoid enabling the layout manager for hidden frames: it's expensive and
+ // provides little value.
+ if (xLayoutManager.is() && !m_bDocHidden)
lcl_enableLayoutManager(xLayoutManager, this);
// create progress helper
@@ -971,7 +980,7 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL Frame::findFrame( const OUStr
if ( sTargetFrameName==SPECIALTARGET_BLANK )
{
TaskCreator aCreator(m_xContext);
- xTarget = aCreator.createTask(sTargetFrameName);
+ xTarget = aCreator.createTask(sTargetFrameName, utl::MediaDescriptor());
}
// I.II) "_parent"
@@ -1171,7 +1180,7 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL Frame::findFrame( const OUStr
)
{
TaskCreator aCreator(m_xContext);
- xTarget = aCreator.createTask(sTargetFrameName);
+ xTarget = aCreator.createTask(sTargetFrameName, utl::MediaDescriptor());
}
}
@@ -1828,7 +1837,7 @@ void SAL_CALL Frame::setLayoutManager(const css::uno::Reference<css::uno::XInter
m_xLayoutManager = xNewLayoutManager;
if (xOldLayoutManager.is())
disableLayoutManager(xOldLayoutManager);
- if (xNewLayoutManager.is())
+ if (xNewLayoutManager.is() && !m_bDocHidden)
lcl_enableLayoutManager(xNewLayoutManager, this);
}
}
@@ -2741,7 +2750,7 @@ void SAL_CALL Frame::impl_setPropertyValue(sal_Int32 nHandle,
m_xLayoutManager = xNewLayoutManager;
if (xOldLayoutManager.is())
disableLayoutManager(xOldLayoutManager);
- if (xNewLayoutManager.is())
+ if (xNewLayoutManager.is() && !m_bDocHidden)
lcl_enableLayoutManager(xNewLayoutManager, this);
}
}
diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx
index b6f6a7ff1920..e526481c709f 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -129,6 +129,8 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL TaskCreatorService::createI
css::uno::Reference< css::awt::XWindow > xContainerWindow = lArgs.getUnpackedValueOrDefault(ARGUMENT_CONTAINERWINDOW , css::uno::Reference< css::awt::XWindow >() );
bool bSupportPersistentWindowState = lArgs.getUnpackedValueOrDefault(ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE , false );
bool bEnableTitleBarUpdate = lArgs.getUnpackedValueOrDefault(ARGUMENT_ENABLE_TITLEBARUPDATE , true );
+ // If the frame is explicitly requested to be hidden.
+ bool bHidden = lArgs.getUnpackedValueOrDefault("Hidden", false);
// We use FrameName property to set it as API name of the new created frame later.
// But those frame names must be different from the set of special target names as e.g. _blank, _self etcpp !
@@ -167,6 +169,13 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL TaskCreatorService::createI
//------------------->
// create the new frame
+ VclPtr<vcl::Window> pContainerWindow = VCLUnoHelper::GetWindow(xContainerWindow);
+ if (pContainerWindow && bHidden)
+ {
+ WindowExtendedStyle eStyle = pContainerWindow->GetExtendedStyle();
+ eStyle |= WindowExtendedStyle::DocHidden;
+ pContainerWindow->SetExtendedStyle(eStyle);
+ }
css::uno::Reference< css::frame::XFrame2 > xFrame = implts_createFrame(xParentFrame, xContainerWindow, sRightName);
// special freature:
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 169532719d71..ad38c61eb79e 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -470,9 +470,14 @@ enum class WindowExtendedStyle {
NONE = 0x0000,
Document = 0x0001,
DocModified = 0x0002,
+ /**
+ * This is a frame window that is requested to be hidden (not just "not yet
+ * shown").
+ */
+ DocHidden = 0x0004,
};
namespace o3tl {
- template<> struct typed_flags<WindowExtendedStyle> : is_typed_flags<WindowExtendedStyle, 0x0003> {};
+ template<> struct typed_flags<WindowExtendedStyle> : is_typed_flags<WindowExtendedStyle, 0x0007> {};
};
namespace vcl {
commit fcae8fd199897f6187c2290f136cef29f949252a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Aug 18 16:32:18 2017 +0200
convert extended WinBits to scoped enum
Reviewed-on: https://gerrit.libreoffice.org/41301
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit 4105174973aaabc25148e53571b7a4fc356098de)
Conflicts:
vcl/source/window/window.cxx
Change-Id: If35f4fcda2415c858ba8f963e9f471c87169bc99
diff --git a/dbaccess/source/ui/misc/controllerframe.cxx b/dbaccess/source/ui/misc/controllerframe.cxx
index 9c885ee40fb9..006f0ed9cee6 100644
--- a/dbaccess/source/ui/misc/controllerframe.cxx
+++ b/dbaccess/source/ui/misc/controllerframe.cxx
@@ -261,7 +261,7 @@ namespace dbaui
const vcl::Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow );
ENSURE_OR_THROW( pContainerWindow, "no Window implementation for the frame's container window!" );
- m_pData->m_bIsTopLevelDocumentWindow = ( pContainerWindow->GetExtendedStyle() & WB_EXT_DOCUMENT ) != 0;
+ m_pData->m_bIsTopLevelDocumentWindow = bool( pContainerWindow->GetExtendedStyle() & WindowExtendedStyle::Document );
}
const Reference< XTopWindow > xFrameContainer( xContainerWindow, UNO_QUERY );
diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx b/dbaccess/source/ui/misc/databaseobjectview.cxx
index d764b507dd45..874687f8ec83 100644
--- a/dbaccess/source/ui/misc/databaseobjectview.cxx
+++ b/dbaccess/source/ui/misc/databaseobjectview.cxx
@@ -135,7 +135,7 @@ namespace dbaui
const Reference< XWindow > xFrameWindow( xFrame->getContainerWindow(), UNO_SET_THROW );
VclPtr<vcl::Window> pContainerWindow = VCLUnoHelper::GetWindow( xFrameWindow );
ENSURE_OR_THROW( pContainerWindow, "no implementation access to the frame's container window!" );
- pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WB_EXT_DOCUMENT );
+ pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WindowExtendedStyle::Document );
}
Reference< XComponentLoader > xFrameLoader( m_xFrameLoader, UNO_QUERY_THROW );
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 7c5191debf49..8bb6696c4f98 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2588,12 +2588,12 @@ void Desktop::ShowBackingComponent(Desktop * progress)
xContainerWindow = xBackingFrame->getContainerWindow();
if (xContainerWindow.is())
{
- // set the WB_EXT_DOCUMENT style. Normally, this is done by the TaskCreator service when a "_blank"
+ // set the WindowExtendedStyle::Document style. Normally, this is done by the TaskCreator service when a "_blank"
// frame/window is created. Since we do not use the TaskCreator here, we need to mimic its behavior,
// otherwise documents loaded into this frame will later on miss functionality depending on the style.
VclPtr<vcl::Window> pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow );
SAL_WARN_IF( !pContainerWindow, "desktop.app", "Desktop::Main: no implementation access to the frame's container window!" );
- pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WB_EXT_DOCUMENT );
+ pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WindowExtendedStyle::Document );
if (progress != nullptr)
{
progress->SetSplashScreenProgress(75);
diff --git a/framework/source/helper/tagwindowasmodified.cxx b/framework/source/helper/tagwindowasmodified.cxx
index b17dc129a242..bb2f3958cae8 100644
--- a/framework/source/helper/tagwindowasmodified.cxx
+++ b/framework/source/helper/tagwindowasmodified.cxx
@@ -95,9 +95,9 @@ void SAL_CALL TagWindowAsModified::modified(const css::lang::EventObject& aEvent
return;
if (bModified)
- pWindow->SetExtendedStyle(WB_EXT_DOCMODIFIED);
+ pWindow->SetExtendedStyle(WindowExtendedStyle::DocModified);
else
- pWindow->SetExtendedStyle(0);
+ pWindow->SetExtendedStyle(WindowExtendedStyle::NONE);
// <- SYNCHRONIZED
}
diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx
index 13c5a5679bba..b6f6a7ff1920 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -202,7 +202,7 @@ void TaskCreatorService::implts_applyDocStyleToWindow(const css::uno::Reference<
SolarMutexGuard aSolarGuard;
VclPtr<vcl::Window> pVCLWindow = VCLUnoHelper::GetWindow(xWindow);
if (pVCLWindow)
- pVCLWindow->SetExtendedStyle(WB_EXT_DOCUMENT);
+ pVCLWindow->SetExtendedStyle(WindowExtendedStyle::Document);
// <- SYNCHRONIZED
}
diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx
index 7c0c29a87a82..def5ffd6bb09 100644
--- a/include/tools/wintypes.hxx
+++ b/include/tools/wintypes.hxx
@@ -271,10 +271,6 @@ WinBits const WB_SAVEAS = 0x00400000;
// Window-Bits for TabControl
WinBits const WB_SLIDERSET = 0x02000000;
-// extended WinBits
-WinBits const WB_EXT_DOCUMENT = 0x00000001;
-WinBits const WB_EXT_DOCMODIFIED = 0x00000002;
-
// WindowAlign
enum class WindowAlign { Left, Top, Right, Bottom };
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 7e67182d5095..169532719d71 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -453,8 +453,9 @@ class ImplDockingWindowWrapper;
class ImplPopupFloatWin;
class MenuFloatingWindow;
class LifecycleTest;
-
namespace svt { class PopupWindowControllerImpl; }
+
+
enum class WindowHitTest {
NONE = 0x0000,
Inside = 0x0001,
@@ -464,6 +465,16 @@ namespace o3tl {
template<> struct typed_flags<WindowHitTest> : is_typed_flags<WindowHitTest, 0x0003> {};
};
+
+enum class WindowExtendedStyle {
+ NONE = 0x0000,
+ Document = 0x0001,
+ DocModified = 0x0002,
+};
+namespace o3tl {
+ template<> struct typed_flags<WindowExtendedStyle> : is_typed_flags<WindowExtendedStyle, 0x0003> {};
+};
+
namespace vcl {
class VCL_DLLPUBLIC RenderTools
@@ -826,8 +837,8 @@ public:
void SetStyle( WinBits nStyle );
WinBits GetStyle() const;
WinBits GetPrevStyle() const;
- void SetExtendedStyle( WinBits nExtendedStyle );
- WinBits GetExtendedStyle() const;
+ void SetExtendedStyle( WindowExtendedStyle nExtendedStyle );
+ WindowExtendedStyle GetExtendedStyle() const;
void SetType( WindowType nType );
WindowType GetType() const;
bool IsSystemWindow() const;
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index c55f650b6e2b..9c064feb6a6f 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -263,7 +263,7 @@ public:
vcl::Region* mpPaintRegion; //< only set during Paint() method call (window coordinates)
WinBits mnStyle;
WinBits mnPrevStyle;
- WinBits mnExtendedStyle;
+ WindowExtendedStyle mnExtendedStyle;
WindowType mnType;
ControlPart mnNativeBackground;
sal_uInt16 mnWaitCount;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 19fcebba9c48..04031ed8113f 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -642,7 +642,7 @@ WindowImpl::WindowImpl( WindowType nType )
mpPaintRegion = nullptr; // Paint-ClipRegion
mnStyle = 0; // style (init in ImplInitWindow)
mnPrevStyle = 0; // prevstyle (set in SetStyle)
- mnExtendedStyle = 0; // extended style (init in ImplInitWindow)
+ mnExtendedStyle = WindowExtendedStyle::NONE; // extended style (init in ImplInitWindow)
mnType = nType; // type
mnGetFocusFlags = GetFocusFlags::NONE; // Flags fuer GetFocus()-Aufruf
mnWaitCount = 0; // Wait-Count (>1 == Warte-MousePointer)
@@ -1981,7 +1981,7 @@ void Window::SetStyle( WinBits nStyle )
}
}
-void Window::SetExtendedStyle( WinBits nExtendedStyle )
+void Window::SetExtendedStyle( WindowExtendedStyle nExtendedStyle )
{
if ( mpWindowImpl->mnExtendedStyle != nExtendedStyle )
@@ -1992,9 +1992,9 @@ void Window::SetExtendedStyle( WinBits nExtendedStyle )
if( pWindow->mpWindowImpl->mbFrame )
{
SalExtStyle nExt = 0;
- if( (nExtendedStyle & WB_EXT_DOCUMENT) )
+ if( nExtendedStyle & WindowExtendedStyle::Document )
nExt |= SAL_FRAME_EXT_STYLE_DOCUMENT;
- if( (nExtendedStyle & WB_EXT_DOCMODIFIED) )
+ if( nExtendedStyle & WindowExtendedStyle::DocModified )
nExt |= SAL_FRAME_EXT_STYLE_DOCMODIFIED;
pWindow->ImplGetFrame()->SetExtendedFrameStyle( nExt );
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 9c891ec309d9..9ca424da7fe5 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1012,9 +1012,9 @@ WinBits Window::GetPrevStyle() const
return mpWindowImpl ? mpWindowImpl->mnPrevStyle : 0;
}
-WinBits Window::GetExtendedStyle() const
+WindowExtendedStyle Window::GetExtendedStyle() const
{
- return mpWindowImpl ? mpWindowImpl->mnExtendedStyle : 0;
+ return mpWindowImpl ? mpWindowImpl->mnExtendedStyle : WindowExtendedStyle::NONE;
}
void Window::SetType( WindowType nType )
commit 02bcb59ea5f842498e8da6d02c29583b1ece5b3d
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Thu Jun 15 14:48:24 2017 +0200
loplugin:unusedfields in vcl part2
Change-Id: Icd02f63e9738c0bb91348e2084649f9edc281e67
Reviewed-on: https://gerrit.libreoffice.org/38833
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit f9d5da8b491e30a08fa6996164e12e4d8715af46)
diff --git a/vcl/inc/unx/genpspgraphics.h b/vcl/inc/unx/genpspgraphics.h
index b37bb909d1f2..01c061c565cc 100644
--- a/vcl/inc/unx/genpspgraphics.h
+++ b/vcl/inc/unx/genpspgraphics.h
@@ -46,14 +46,11 @@ class VCL_DLLPUBLIC GenPspGraphics : public SalGraphics
psp::PrinterGfx* m_pPrinterGfx;
FreetypeFont* m_pFreetypeFont[ MAX_FALLBACK ];
- bool m_bFontVertical;
- SalInfoPrinter* m_pInfoPrinter;
public:
GenPspGraphics();
virtual ~GenPspGraphics() override;
- void Init( psp::JobData* pJob, psp::PrinterGfx* pGfx,
- SalInfoPrinter* pInfoPrinter );
+ void Init( psp::JobData* pJob, psp::PrinterGfx* pGfx );
// helper methods
static const void * DoGetEmbedFontData(psp::fontID aFont, long* pDataLen);
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx
index eb350ef0abd1..05095e5c9eca 100644
--- a/vcl/inc/unx/glyphcache.hxx
+++ b/vcl/inc/unx/glyphcache.hxx
@@ -190,7 +190,6 @@ private:
bool mbFaceOk;
bool mbArtItalic;
bool mbArtBold;
- bool mbUseGamma;
hb_font_t* mpHbFont;
};
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index cf644b281c77..ab487156d063 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -190,7 +190,6 @@ class GtkSalFrame : public SalFrame
bool m_bGraphics;
ModKeyFlags m_nKeyModifiers;
GdkCursor *m_pCurrentCursor;
- GdkVisibilityState m_nVisibility;
PointerStyle m_ePointerStyle;
ScreenSaverInhibitor m_ScreenSaverInhibitor;
int m_nWorkArea;
diff --git a/vcl/inc/unx/i18n_cb.hxx b/vcl/inc/unx/i18n_cb.hxx
index ceaf53eb3826..5ba32eea0fb0 100644
--- a/vcl/inc/unx/i18n_cb.hxx
+++ b/vcl/inc/unx/i18n_cb.hxx
@@ -50,13 +50,11 @@ struct preedit_text_t
{
sal_Unicode *pUnicodeBuffer;
XIMFeedback *pCharStyle;
- unsigned int nCursorPos;
unsigned int nLength;
unsigned int nSize;
preedit_text_t()
: pUnicodeBuffer(nullptr)
, pCharStyle(nullptr)
- , nCursorPos(0)
, nLength(0)
, nSize(0)
{
diff --git a/vcl/inc/unx/i18n_xkb.hxx b/vcl/inc/unx/i18n_xkb.hxx
index 69d0303f0309..d3641312f3da 100644
--- a/vcl/inc/unx/i18n_xkb.hxx
+++ b/vcl/inc/unx/i18n_xkb.hxx
@@ -27,9 +27,8 @@ class VCLPLUG_GEN_PUBLIC SalI18N_KeyboardExtension
{
private:
- bool mbUseExtension;
+ bool mbUseExtension;
sal_uInt32 mnDefaultGroup;
- sal_uInt32 mnGroup;
int mnEventBase;
int mnErrorBase;
Display* mpDisplay;
diff --git a/vcl/inc/unx/printergfx.hxx b/vcl/inc/unx/printergfx.hxx
index f1fc5229ced3..a232d68de2f9 100644
--- a/vcl/inc/unx/printergfx.hxx
+++ b/vcl/inc/unx/printergfx.hxx
@@ -170,7 +170,6 @@ private:
bool mbColor;
bool mbUploadPS42Fonts;
- osl::File* mpPageHeader;
osl::File* mpPageBody;
/* text/font related data, for a type1 font it has to be checked
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index d28326e389bb..31b11b470530 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -260,8 +260,6 @@ protected:
SalXLib *pXLib_;
SalI18N_KeyboardExtension *mpKbdExtension;
- AttributeProvider *mpFactory;
-
Display *pDisp_; // X Display
SalX11Screen m_nXDefaultScreen;
@@ -279,7 +277,6 @@ protected:
// Keyboard
bool bNumLockFromXS_; // Num Lock handled by X Server
int nNumLockIndex_; // modifier index in modmap
- int nNumLockMask_; // keyevent state mask for
KeySym nShiftKeySym_; // first shift modifier
KeySym nCtrlKeySym_; // first control modifier
KeySym nMod1KeySym_; // first mod1 modifier
diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h
index 4263581a979f..175b25a81bef 100644
--- a/vcl/inc/unx/salframe.h
+++ b/vcl/inc/unx/salframe.h
@@ -86,8 +86,6 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame, public NativeWindowHandl
X11SalGraphics *pGraphics_; // current frame graphics
X11SalGraphics *pFreeGraphics_; // first free frame graphics
- sal_uInt16 nKeyCode_; // last key code
- sal_uInt16 nKeyState_; // last key state
bool mbSendExtKeyModChange;
ModKeyFlags mnExtKeyMod;
@@ -114,7 +112,6 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame, public NativeWindowHandl
// data for WMAdaptor
WMWindowType meWindowType;
- int mnDecorationFlags;
bool mbMaximizedVert;
bool mbMaximizedHorz;
bool mbShaded;
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 0825ccfed464..c55f650b6e2b 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -264,7 +264,6 @@ public:
WinBits mnStyle;
WinBits mnPrevStyle;
WinBits mnExtendedStyle;
- WinBits mnPrevExtendedStyle;
WindowType mnType;
ControlPart mnNativeBackground;
sal_uInt16 mnWaitCount;
@@ -309,7 +308,6 @@ public:
mbNoPtrVisible:1,
mbPaintFrame:1,
mbInPaint:1,
- mbMouseMove:1,
mbMouseButtonDown:1,
mbMouseButtonUp:1,
mbKeyInput:1,
diff --git a/vcl/qa/cppunit/wmf/wmfimporttest.cxx b/vcl/qa/cppunit/wmf/wmfimporttest.cxx
index ca9900c18ad9..4b9c46d51471 100644
--- a/vcl/qa/cppunit/wmf/wmfimporttest.cxx
+++ b/vcl/qa/cppunit/wmf/wmfimporttest.cxx
@@ -253,15 +253,11 @@ void WmfTest::testTdf99402()
logfontw.lfHeight = 0;
logfontw.lfWidth = 0;
logfontw.lfEscapement = 0;
- logfontw.lfOrientation = 0;
logfontw.lfWeight = 0;
logfontw.lfItalic = 0;
logfontw.lfUnderline = 0;
logfontw.lfStrikeOut = 0;
logfontw.lfCharSet = OEM_CHARSET;
- logfontw.lfOutPrecision = 0; // OUT_DEFAULT_PRECIS
- logfontw.lfClipPrecision = 0; // CLIP_DEFAULT_PRECIS
- logfontw.lfQuality = 0; // DEFAULT_QUALITY
logfontw.lfPitchAndFamily = FF_ROMAN | DEFAULT_PITCH;
logfontw.alfFaceName = "Symbol";
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 22125d747dbe..0a22ab3762fd 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -1523,18 +1523,20 @@ bool EnhWMFReader::ReadEnhWMF()
if ( ( nIndex & ENHMETA_STOCK_OBJECT ) == 0 )
{
LOGFONTW aLogFont;
+ sal_Int32 nTmp;
+ unsigned char nTmp2;
pWMF->ReadInt32( aLogFont.lfHeight )
.ReadInt32( aLogFont.lfWidth )
.ReadInt32( aLogFont.lfEscapement )
- .ReadInt32( aLogFont.lfOrientation )
+ .ReadInt32( nTmp ) // lfOrientation
.ReadInt32( aLogFont.lfWeight )
.ReadUChar( aLogFont.lfItalic )
.ReadUChar( aLogFont.lfUnderline )
.ReadUChar( aLogFont.lfStrikeOut )
.ReadUChar( aLogFont.lfCharSet )
- .ReadUChar( aLogFont.lfOutPrecision )
- .ReadUChar( aLogFont.lfClipPrecision )
- .ReadUChar( aLogFont.lfQuality )
+ .ReadUChar( nTmp2 ) // lfOutPrecision
+ .ReadUChar( nTmp2 ) // lfClipPrecision
+ .ReadUChar( nTmp2 ) // lfQuality
.ReadUChar( aLogFont.lfPitchAndFamily );
sal_Unicode lfFaceName[LF_FACESIZE+1];
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index a10d5f158da2..ff7d3d5307e9 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -109,15 +109,11 @@ struct LOGFONTW
sal_Int32 lfHeight;
sal_Int32 lfWidth;
sal_Int32 lfEscapement;
- sal_Int32 lfOrientation;
sal_Int32 lfWeight;
sal_uInt8 lfItalic;
sal_uInt8 lfUnderline;
sal_uInt8 lfStrikeOut;
sal_uInt8 lfCharSet;
- sal_uInt8 lfOutPrecision;
- sal_uInt8 lfClipPrecision;
- sal_uInt8 lfQuality;
sal_uInt8 lfPitchAndFamily;
OUString alfFaceName;
};
@@ -692,7 +688,6 @@ private:
sal_uInt32 nEMFSize;
sal_uInt32 nSkipActions;
- sal_uInt32 nCurrentAction;
WMF_EXTERNALHEADER* pExternalHeader;
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index c1cd0901b5b1..b9d2f8d27615 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -912,6 +912,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
sal_Int16 lfWeight = 0;
LOGFONTW aLogFont;
+ unsigned char nTmp;
aFontSize = ReadYXExt();
pWMF->ReadInt16( lfEscapement );
pWMF->ReadInt16( lfOrientation );
@@ -920,16 +921,15 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
pWMF->ReadUChar( aLogFont.lfUnderline );
pWMF->ReadUChar( aLogFont.lfStrikeOut );
pWMF->ReadUChar( aLogFont.lfCharSet );
- pWMF->ReadUChar( aLogFont.lfOutPrecision );
- pWMF->ReadUChar( aLogFont.lfClipPrecision );
- pWMF->ReadUChar( aLogFont.lfQuality );
+ pWMF->ReadUChar( nTmp ); // lfOutPrecision
+ pWMF->ReadUChar( nTmp ); // lfClipPrecision
+ pWMF->ReadUChar( nTmp ); // lfQuality
pWMF->ReadUChar( aLogFont.lfPitchAndFamily );
size_t nRet = pWMF->ReadBytes( lfFaceName, LF_FACESIZE );
lfFaceName[nRet] = 0;
aLogFont.lfWidth = aFontSize.Width();
aLogFont.lfHeight = aFontSize.Height();
aLogFont.lfEscapement = lfEscapement;
- aLogFont.lfOrientation = lfOrientation;
aLogFont.lfWeight = lfWeight;
rtl_TextEncoding eCharSet;
@@ -1330,7 +1330,6 @@ void WMFReader::ReadWMF()
sal_uLong nPos, nPercent, nLastPercent;
nSkipActions = 0;
- nCurrentAction = 0;
pEMFStream.reset();
nEMFRecCount = 0;
@@ -1355,7 +1354,6 @@ void WMFReader::ReadWMF()
bool bEMFAvailable = false;
while( true )
{
- nCurrentAction++;
nPercent = ( nPos - nStartPos ) * 100 / ( nEndPos - nStartPos );
if( nLastPercent + 4 <= nPercent )
@@ -1829,7 +1827,6 @@ WMFReader::WMFReader(SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile,
, nEMFRec(0)
, nEMFSize(0)
, nSkipActions(0)
- , nCurrentAction(0)
, pExternalHeader(pExtHeader)
{}
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index f7d3cdd3d8ca..436102be52e4 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -162,29 +162,6 @@ static const char* pDictEscs[] = {
"nFDArray", "nFDSelect", "sFontName"
};
-static const char* pType1Ops[] = {
- nullptr, "2hstem", nullptr, "2vstem",
- "1vmoveto", "Arlineto", "1hlineto", "1vlineto",
- "Crrcurveto", "0closepath", "Lcallsubr", "0return",
- "xT1ESC", "2hsbw", "0endchar", nullptr,
- nullptr, nullptr, nullptr, nullptr,
- nullptr, "2rmoveto", "1hmoveto", nullptr,
- nullptr, nullptr, nullptr, nullptr,
- nullptr, nullptr, "4vhcurveto", "4hvcurveto"
-};
-
-static const char* pT1EscOps[] = {
- "0dotsection", "6vstem3", "6hstem3", nullptr,
- nullptr, nullptr, "5seac", "4sbw",
- nullptr, "1abs", "2add", "2sub",
- "2div", nullptr, nullptr, nullptr,
- "Gcallothersubr", "1pop", nullptr, nullptr,
- nullptr, nullptr, nullptr, nullptr,
- nullptr, nullptr, nullptr, nullptr,
- nullptr, nullptr, nullptr, nullptr,
- nullptr, "2setcurrentpoint"
-};
-
struct TYPE1OP
{
enum OPS
@@ -204,30 +181,6 @@ struct TYPE1OP
};
};
-static const char* pType2Ops[] = {
- nullptr, "hhstem", nullptr, "vvstem",
- "mvmoveto", "Arlineto", "Ehlineto", "Evlineto",
- "Crrcurveto", nullptr, "Lcallsubr", "Xreturn",
- "xT2ESC", nullptr, "eendchar", nullptr,
- nullptr, nullptr, "Hhstemhm", "Khintmask",
- "Kcntrmask", "Mrmoveto", "mhmoveto", "Vvstemhm",
- ".rcurveline", ".rlinecurve", ".vvcurveto", ".hhcurveto",
- ".shortint", "Gcallgsubr", ".vhcurveto", ".hvcurveto"
-};
-
-static const char* pT2EscOps[] = {
- nullptr, nullptr, nullptr, "2and",
- "2or", "1not", nullptr, nullptr,
- nullptr, "1abs", "2add", "2sub",
- "2div", nullptr, "1neg", "2eq",
- nullptr, nullptr, "1drop", nullptr,
- "1put", "1get", "4ifelse", "0random",
- "2mul", nullptr, "1sqrt", "1dup",
- "2exch", "Iindex", "Rroll", nullptr,
- nullptr, nullptr, "7hflex", "Fflex",
- "9hflex1", "fflex1"
-};
-
struct TYPE2OP
{
enum OPS
@@ -257,13 +210,10 @@ struct CffGlobal
explicit CffGlobal();
int mnNameIdxBase;
- int mnNameIdxCount;
int mnStringIdxBase;
- int mnStringIdxCount;
bool mbCIDFont;
int mnCharStrBase;
int mnCharStrCount;
- int mnEncodingBase;
int mnCharsetBase;
int mnGlobalSubrBase;
int mnGlobalSubrCount;
@@ -277,7 +227,6 @@ struct CffGlobal
int mnFontNameSID;
int mnFullNameSID;
- int mnFamilyNameSID;
};
struct CffLocal
@@ -326,8 +275,6 @@ public:
const sal_GlyphId* pGlyphIds, const U8* pEncoding,
GlyphWidth* pGlyphWidths, int nGlyphCount, FontSubsetInfo& );
- // used by charstring converter
- void setCharStringType( int);
protected:
int convert2Type1Ops( CffLocal*, const U8* pType2Ops, int nType2Len, U8* pType1Ops);
private:
@@ -352,9 +299,6 @@ private:
void seekIndexEnd( int nIndexBase);
private:
- const char** mpCharStringOps;
- const char** mpCharStringEscs;
-
CffLocal maCffLocal[256];
CffLocal* mpCffLocal;
@@ -415,8 +359,6 @@ CffSubsetterContext::CffSubsetterContext( const U8* pBasePtr, int nBaseLen)
, mbNeedClose(false)
, mbIgnoreHints(false)
, mnCntrMask(0)
- , mpCharStringOps(nullptr)
- , mpCharStringEscs(nullptr)
, mnStackIdx(0)
, mnValStack{}
, mnTransVals{}
@@ -484,15 +426,6 @@ void CffSubsetterContext::addHints( bool bVerticalHints)
mnStackIdx = 0;
}
-void CffSubsetterContext::setCharStringType( int nVal)
-{
- switch( nVal) {
- case 1: mpCharStringOps=pType1Ops; mpCharStringEscs=pT1EscOps; break;
- case 2: mpCharStringOps=pType2Ops; mpCharStringEscs=pT2EscOps; break;
- default: fprintf( stderr, "Unknown CharstringType=%d\n",nVal); break;
- }
-}
-
void CffSubsetterContext::readDictOp()
{
const U8 c = *mpReadPtr;
@@ -529,7 +462,7 @@ void CffSubsetterContext::readDictOp()
case 10: mpCffLocal->maStemStdHW = nVal; break; // "StdHW"
case 11: mpCffLocal->maStemStdVW = nVal; break; // "StdVW"
case 15: mnCharsetBase = nInt; break; // "charset"
- case 16: mnEncodingBase = nInt; break; // "nEncoding"
+ case 16: break; // "nEncoding"
case 17: mnCharStrBase = nInt; break; // "nCharStrings"
case 19: mpCffLocal->mnLocalSubrOffs = nInt; break;// "nSubrs"
case 20: setDefaultWidth( nVal ); break; // "defaultWidthX"
@@ -580,7 +513,7 @@ void CffSubsetterContext::readDictOp()
nInt = popInt();
switch( nOpId ) {
case 2: mnFullNameSID = nInt; break; // "FullName"
- case 3: mnFamilyNameSID = nInt; break; // "FamilyName"
+ case 3: break; // "FamilyName"
case 938: mnFontNameSID = nInt; break; // "FontName"
default: break; // TODO: handle more string dictops?
}
@@ -599,7 +532,6 @@ void CffSubsetterContext::readDictOp()
} break;
case 't': // CharstringType
nInt = popInt();
- setCharStringType( nInt );
break;
}
} else if( (c >= 32) || (c == 28) ) {
@@ -1370,13 +1302,10 @@ CffLocal::CffLocal()
CffGlobal::CffGlobal()
: mnNameIdxBase( 0)
-, mnNameIdxCount( 0)
, mnStringIdxBase( 0)
-, mnStringIdxCount( 0)
, mbCIDFont( false)
, mnCharStrBase( 0)
, mnCharStrCount( 0)
-, mnEncodingBase( 0)
, mnCharsetBase( 0)
, mnGlobalSubrBase( 0)
, mnGlobalSubrCount( 0)
@@ -1386,7 +1315,6 @@ CffGlobal::CffGlobal()
, mnFDAryCount( 1)
, mnFontNameSID( 0)
, mnFullNameSID( 0)
-, mnFamilyNameSID( 0)
{
}
@@ -1405,7 +1333,6 @@ bool CffSubsetterContext::initialCffRead()
// prepare access to the NameIndex
mnNameIdxBase = nHeaderSize;
mpReadPtr = mpBasePtr + nHeaderSize;
- mnNameIdxCount = (mpReadPtr[0]<<8) + mpReadPtr[1];
seekIndexEnd( mnNameIdxBase);
// get the TopDict index
@@ -1422,7 +1349,6 @@ bool CffSubsetterContext::initialCffRead()
// prepare access to the String index
mnStringIdxBase = getReadOfs();
- mnStringIdxCount = (mpReadPtr[0]<<8) + mpReadPtr[1];
seekIndexEnd( mnStringIdxBase);
// prepare access to the GlobalSubr index
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 025adf8afd6d..1cbdd642b504 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1133,13 +1133,11 @@ PDFWriterImpl::PDFPage::PDFPage( PDFWriterImpl* pWriter, double nPageWidth, doub
m_nPageHeight( nPageHeight ),
m_eOrientation( eOrientation ),
m_nPageObject( 0 ), // invalid object number
- m_nPageIndex( -1 ), // invalid index
m_nStreamLengthObject( 0 ),
m_nBeginStreamPos( 0 ),
m_eTransition( PDFWriter::PageTransition::Regular ),
m_nTransTime( 0 ),
- m_nDuration( 0 ),
- m_bHasWidgets( false )
+ m_nDuration( 0 )
{
// object ref must be only ever updated in emit()
m_nPageObject = m_pWriter->createObject();
@@ -2263,7 +2261,6 @@ void PDFWriterImpl::newPage( double nPageWidth, double nPageHeight, PDFWriter::O
endPage();
m_nCurrentPage = m_aPages.size();
m_aPages.push_back( PDFPage(this, nPageWidth, nPageHeight, eOrientation ) );
- m_aPages.back().m_nPageIndex = m_nCurrentPage;
m_aPages.back().beginStream();
// setup global graphics state
@@ -13666,9 +13663,6 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa
// insert widget to page's annotation list
m_aPages[ nPageNr ].m_aAnnotations.push_back( rNewWidget.m_nObject );
- // mark page as having widgets
- m_aPages[ nPageNr ].m_bHasWidgets = true;
-
return nNewWidget;
}
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 0132897f71ee..850ea559bc0c 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -139,7 +139,6 @@ public:
double m_nPageHeight; // in inch/72
PDFWriter::Orientation m_eOrientation;
sal_Int32 m_nPageObject;
- sal_Int32 m_nPageIndex;
std::vector<sal_Int32> m_aStreamObjects;
sal_Int32 m_nStreamLengthObject;
sal_uInt64 m_nBeginStreamPos;
@@ -148,7 +147,6 @@ public:
PDFWriter::PageTransition m_eTransition;
sal_uInt32 m_nTransTime;
sal_uInt32 m_nDuration;
- bool m_bHasWidgets;
PDFPage( PDFWriterImpl* pWriter, double nPageWidth, double nPageHeight, PDFWriter::Orientation eOrientation );
~PDFPage();
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index ec55d383c485..9d3845db981c 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -125,7 +125,6 @@ private:
bool mbStatus : 1;
bool mbIDATStarted : 1; // true if IDAT seen
bool mbIDAT : 1; // true if finished with enough IDAT chunks
- bool mbGamma : 1; // true if Gamma Correction available
bool mbpHYs : 1; // true if physical size of pixel available
bool mbIgnoreGammaChunk : 1;
@@ -204,7 +203,6 @@ PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
mbStatus( true ),
mbIDATStarted( false ),
mbIDAT( false ),
- mbGamma ( false ),
mbpHYs ( false ),
mbIgnoreGammaChunk ( false ),
#if OSL_DEBUG_LEVEL > 0
@@ -829,8 +827,6 @@ void PNGReaderImpl::ImplGetGamma()
if ( fInvGamma != 1.0 )
{
- mbGamma = true;
-
if ( mpColorTable == mpDefaultColorTable )
mpColorTable = new sal_uInt8[ 256 ];
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 0df373e02a10..7e281884507f 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -420,7 +420,6 @@ tools::Rectangle DockingManager::GetPosSizePixel( const vcl::Window *pWindow )
class ImplPopupFloatWin : public FloatingWindow
{
private:
- ImplDockingWindowWrapper* mpDockingWin;
bool mbMoving;
bool mbTrackingEnabled;
Point maDelta;
@@ -428,9 +427,8 @@ private:
void ImplSetBorder();
public:
- ImplPopupFloatWin( vcl::Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip );
+ ImplPopupFloatWin( vcl::Window* pParent, bool bHasGrip );
virtual ~ImplPopupFloatWin() override;
- virtual void dispose() override;
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
@@ -448,12 +446,11 @@ public:
bool hasGrip() const { return mbHasGrip; }
};
-ImplPopupFloatWin::ImplPopupFloatWin( vcl::Window* pParent, ImplDockingWindowWrapper* pDockingWin, bool bHasGrip ) :
+ImplPopupFloatWin::ImplPopupFloatWin( vcl::Window* pParent, bool bHasGrip ) :
FloatingWindow( pParent, WB_NOBORDER | WB_SYSTEMWINDOW | WB_NOSHADOW )
{
mpWindowImpl->mbToolbarFloatingWindow = true; // indicate window type, required for accessibility
// which should not see this window as a toplevel window
- mpDockingWin = pDockingWin;
mbMoving = false;
mbTrackingEnabled = false;
mbHasGrip = bHasGrip;
@@ -466,12 +463,6 @@ ImplPopupFloatWin::~ImplPopupFloatWin()
disposeOnce();
}
-void ImplPopupFloatWin::dispose()
-{
- mpDockingWin = nullptr;
- FloatingWindow::dispose();
-}
-
css::uno::Reference< css::accessibility::XAccessible > ImplPopupFloatWin::CreateAccessible()
{
// switch off direct accessibility support for this window
@@ -967,7 +958,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
if ( bUseStdPopup )
pWin = VclPtr<FloatingWindow>::Create( mpParent, WB_STDPOPUP );
else
- pWin = VclPtr<ImplPopupFloatWin>::Create( mpParent, this, bAllowTearOff );
+ pWin = VclPtr<ImplPopupFloatWin>::Create( mpParent, bAllowTearOff );
pWin->SetPopupModeEndHdl( LINK( this, ImplDockingWindowWrapper, PopupModeEnd ) );
pWin->SetText( GetWindow()->GetText() );
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index bbc2c702928c..3e1f88c0578a 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -1120,7 +1120,6 @@ sal_uInt16 MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link<Me
} while( it != m_aAddButtons.end() && nId < 128 );
SAL_WARN_IF( nId >= 128, "vcl", "too many addbuttons in menubar" );
AddButtonEntry& rNewEntry = m_aAddButtons[nId];
- rNewEntry.m_nId = nId;
rNewEntry.m_aSelectLink = i_rLink;
aCloseBtn->InsertItem(nId, i_rImage, ToolBoxItemBits::NONE, 0);
aCloseBtn->calcMinSize();
diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx
index e1e3d36cb8b9..da097587cbf3 100644
--- a/vcl/source/window/menubarwindow.hxx
+++ b/vcl/source/window/menubarwindow.hxx
@@ -63,11 +63,8 @@ class MenuBarWindow : public vcl::Window, public MenuWindow
private:
struct AddButtonEntry
{
- sal_uInt16 m_nId;
Link<MenuBar::MenuBarButtonCallbackArg&,bool> m_aSelectLink;
Link<MenuBar::MenuBarButtonCallbackArg&,bool> m_aHighlightLink;
-
- AddButtonEntry() : m_nId( 0 ) {}
};
VclPtr<Menu> pMenu;
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 5852b1980505..a30653f1c6cb 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -38,7 +38,6 @@ MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, vcl::Window* pParent, WinBit
nMBDownPos = ITEMPOS_INVALID;
nPosInParent = ITEMPOS_INVALID;
nScrollerHeight = 0;
- nBorder = EXTRASPACEY;
nFirstEntry = 0;
bScrollUp = false;
bScrollDown = false;
diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx
index d53a92964fe3..a65c3fbfb172 100644
--- a/vcl/source/window/menufloatingwindow.hxx
+++ b/vcl/source/window/menufloatingwindow.hxx
@@ -46,7 +46,6 @@ private:
sal_uInt16 nMBDownPos;
sal_uInt16 nScrollerHeight;
sal_uInt16 nFirstEntry;
- sal_uInt16 nBorder;
sal_uInt16 nPosInParent;
bool bInExecute : 1;
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 9f258feb7362..4f1fe06782b6 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -406,8 +406,7 @@ void Window::ImplGrabFocusToDocument( GetFocusFlags nFlags )
void Window::MouseMove( const MouseEvent& rMEvt )
{
NotifyEvent aNEvt( MouseNotifyEvent::MOUSEMOVE, this, &rMEvt );
- if (!EventNotify(aNEvt))
- mpWindowImpl->mbMouseMove = true;
+ EventNotify(aNEvt);
}
void Window::MouseButtonDown( const MouseEvent& rMEvt )
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index b08cf4ca5261..f0334ea4e13d 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -93,7 +93,6 @@ private:
Accelerator maAccel;
sal_uInt16 mnLineMode;
ToolBox::ImplToolItems::size_type mnStartLines;
- bool mbShowDragRect;
ImplTBDragMgr(const ImplTBDragMgr&) = delete;
ImplTBDragMgr& operator=(const ImplTBDragMgr&) = delete;
@@ -1036,7 +1035,6 @@ ImplTBDragMgr::ImplTBDragMgr()
: mpDragBox(nullptr)
, mnLineMode(0)
, mnStartLines(0)
- , mbShowDragRect(false)
{
maAccel.InsertItem( KEY_RETURN, vcl::KeyCode( KEY_RETURN ) );
maAccel.InsertItem( KEY_ESCAPE, vcl::KeyCode( KEY_ESCAPE ) );
@@ -1060,7 +1058,6 @@ void ImplTBDragMgr::StartDragging( ToolBox* pToolBox,
maMouseOff.Y() = rRect.Top() - rPos.Y();
maRect = rRect;
maStartRect = rRect;
- mbShowDragRect = true;
pToolBox->ShowTracking( maRect );
}
@@ -1080,7 +1077,6 @@ void ImplTBDragMgr::EndDragging( bool bOK )
if (mpDragBox->IsMouseCaptured())
mpDragBox->ReleaseMouse();
mpDragBox->mbDragging = false;
- mbShowDragRect = false;
Application::RemoveAccel( &maAccel );
if ( !bOK )
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index eb5e72e6d30b..19fcebba9c48 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -643,7 +643,6 @@ WindowImpl::WindowImpl( WindowType nType )
mnStyle = 0; // style (init in ImplInitWindow)
mnPrevStyle = 0; // prevstyle (set in SetStyle)
mnExtendedStyle = 0; // extended style (init in ImplInitWindow)
- mnPrevExtendedStyle = 0; // prevstyle (set in SetExtendedStyle)
mnType = nType; // type
mnGetFocusFlags = GetFocusFlags::NONE; // Flags fuer GetFocus()-Aufruf
mnWaitCount = 0; // Wait-Count (>1 == Warte-MousePointer)
@@ -690,7 +689,6 @@ WindowImpl::WindowImpl( WindowType nType )
mbInInitShow = false; // true: we are in InitShow
mbChildPtrOverwrite = false; // true: PointerStyle overwrites Child-Pointer
mbNoPtrVisible = false; // true: ShowPointer( false ) called
- mbMouseMove = false; // true: BaseMouseMove called
mbPaintFrame = false; // true: Paint is visible, but not painted
mbInPaint = false; // true: Inside PaintHdl
mbMouseButtonDown = false; // true: BaseMouseButtonDown called
@@ -2001,7 +1999,6 @@ void Window::SetExtendedStyle( WinBits nExtendedStyle )
pWindow->ImplGetFrame()->SetExtendedFrameStyle( nExt );
}
- mpWindowImpl->mnPrevExtendedStyle = mpWindowImpl->mnExtendedStyle;
mpWindowImpl->mnExtendedStyle = nExtendedStyle;
CompatStateChanged( StateChangedType::ExtendedStyle );
}
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 9c900ce0e3d5..e49896d3d446 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -680,7 +680,6 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
// if the MouseMove handler changes the help window's visibility
// the HelpRequest handler should not be called anymore
vcl::Window* pOldHelpTextWin = pSVData->maHelpData.mpHelpWin;
- pChild->ImplGetWindowImpl()->mbMouseMove = false;
pChild->MouseMove( aMEvt );
if ( pOldHelpTextWin != pSVData->maHelpData.mpHelpWin )
bCallHelpRequest = false;
diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx
index d62ca0ad75bf..668b31b7ba53 100644
--- a/vcl/unx/generic/app/i18n_cb.cxx
+++ b/vcl/unx/generic/app/i18n_cb.cxx
@@ -45,7 +45,6 @@ PreeditStartCallback ( XIC, XPointer client_data, XPointer )
if ( pPreeditData->eState == PreeditStatus::ActivationRequired )
{
pPreeditData->eState = PreeditStatus::Active;
- pPreeditData->aText.nCursorPos = 0;
pPreeditData->aText.nLength = 0;
}
diff --git a/vcl/unx/generic/app/i18n_ic.cxx b/vcl/unx/generic/app/i18n_ic.cxx
index 2532e9f8b094..ec2f1a5fbf7d 100644
--- a/vcl/unx/generic/app/i18n_ic.cxx
+++ b/vcl/unx/generic/app/i18n_ic.cxx
@@ -182,7 +182,6 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
maClientData.aText.pCharStyle =
static_cast<XIMFeedback*>(malloc(PREEDIT_BUFSZ * sizeof(XIMFeedback)));
maClientData.aText.nSize = PREEDIT_BUFSZ;
- maClientData.aText.nCursorPos = 0;
maClientData.aText.nLength = 0;
// Status attributes
diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx
index 40c89dd83519..7e59021a031b 100644
--- a/vcl/unx/generic/app/i18n_status.cxx
+++ b/vcl/unx/generic/app/i18n_status.cxx
@@ -81,7 +81,6 @@ class XIMStatusWindow : public StatusWindow
// for delayed showing
bool m_bDelayedShow;
- I18NStatus::ShowReason m_eDelayedReason;
ImplSVEvent * m_nDelayedEvent;
// for toggling
bool m_bOn;
@@ -113,7 +112,6 @@ XIMStatusWindow::XIMStatusWindow( bool bOn ) :
m_pLastParent( nullptr ),
m_bAnchoredAtRight( false ),
m_bDelayedShow( false ),
- m_eDelayedReason( I18NStatus::contextmap ),
m_nDelayedEvent( nullptr ),
m_bOn( bOn )
{
@@ -276,13 +274,12 @@ IMPL_LINK_NOARG(XIMStatusWindow, DelayedShowHdl, void*, void)
}
}
-void XIMStatusWindow::show( bool bShow, I18NStatus::ShowReason eReason )
+void XIMStatusWindow::show( bool bShow, I18NStatus::ShowReason )
{
if( bShow && m_aStatusText->GetText().isEmpty() )
bShow = false;
m_bDelayedShow = bShow;
- m_eDelayedReason = eReason;
if( ! m_nDelayedEvent )
m_nDelayedEvent = Application::PostUserEvent( LINK( this, XIMStatusWindow, DelayedShowHdl ), nullptr, true );
}
diff --git a/vcl/unx/generic/app/i18n_xkb.cxx b/vcl/unx/generic/app/i18n_xkb.cxx
index 79739be87249..16dbc6067543 100644
--- a/vcl/unx/generic/app/i18n_xkb.cxx
+++ b/vcl/unx/generic/app/i18n_xkb.cxx
@@ -28,7 +28,6 @@
SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay )
: mbUseExtension(true)
, mnDefaultGroup(0)
- , mnGroup(0)
, mnEventBase(0)
, mnErrorBase(0)
, mpDisplay(pDisplay)
@@ -78,7 +77,6 @@ SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay )
{
XkbStateRec aStateRecord;
XkbGetState( mpDisplay, XkbUseCoreKbd, &aStateRecord );
- mnGroup = aStateRecord.group;
}
}
@@ -96,8 +94,6 @@ SalI18N_KeyboardExtension::Dispatch( XEvent* pEvent )
switch ( nXKBType )
{
case XkbStateNotify:
-
- mnGroup = reinterpret_cast<XkbStateNotifyEvent*>(pEvent)->group;
break;
default:
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 59b9069a578c..9d64d665648a 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -277,14 +277,12 @@ bool SalDisplay::BestVisual( Display *pDisplay,
SalDisplay::SalDisplay( Display *display ) :
pXLib_( nullptr ),
mpKbdExtension( nullptr ),
- mpFactory( nullptr ),
pDisp_( display ),
m_nXDefaultScreen( 0 ),
nMaxRequestSize_( 0 ),
meServerVendor( vendor_unknown ),
bNumLockFromXS_( false ),
nNumLockIndex_( 0 ),
- nNumLockMask_( 0 ),
nShiftKeySym_( 0 ),
nCtrlKeySym_( 0 ),
nMod1KeySym_( 0 ),
@@ -580,7 +578,6 @@ void SalDisplay::Init()
for( Cursor & aCsr : aPointerCache_ )
aCsr = None;
- mpFactory = nullptr;
m_bXinerama = false;
int nDisplayScreens = ScreenCount( pDisp_ );
@@ -805,7 +802,6 @@ void SalDisplay::ModifierMapping()
{
bNumLockFromXS_ = False;
nNumLockIndex_ = i;
- nNumLockMask_ = 1<<i;
break;
}
}
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 7b4cc062f854..85152168aa3c 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -1261,7 +1261,6 @@ void GnomeWMAdaptor::setGnomeWMState( X11SalFrame* pFrame ) const
void WMAdaptor::setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pReferenceFrame ) const
{
pFrame->meWindowType = eType;
- pFrame->mnDecorationFlags = nDecorationFlags;
if( ! pFrame->mbFullScreen )
{
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index 10045e76b144..632b818b440b 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -221,7 +221,6 @@ SelectionManager::SelectionManager() :
m_nLastDropAction( 0 ),
m_nLastX( 0 ),
m_nLastY( 0 ),
- m_nDropTimestamp( 0 ),
m_bDropWaitingForCompletion( false ),
m_aDropWindow( None ),
m_aDropProxy( None ),
@@ -241,21 +240,18 @@ SelectionManager::SelectionManager() :
m_bDropSent( false ),
m_nDropTimeout( 0 ),
m_bWaitingForPrimaryConversion( false ),
- m_nDragTimestamp( None ),
m_aMoveCursor( None ),
m_aCopyCursor( None ),
m_aLinkCursor( None ),
m_aNoneCursor( None ),
m_aCurrentCursor( None ),
m_nCurrentProtocolVersion( nXdndProtocolRevision ),
- m_nCLIPBOARDAtom( None ),
m_nTARGETSAtom( None ),
m_nTIMESTAMPAtom( None ),
m_nTEXTAtom( None ),
m_nINCRAtom( None ),
m_nCOMPOUNDAtom( None ),
m_nMULTIPLEAtom( None ),
- m_nUTF16Atom( None ),
m_nImageBmpAtom( None ),
m_nXdndAware( None ),
m_nXdndEnter( None ),
@@ -271,7 +267,6 @@ SelectionManager::SelectionManager() :
m_nXdndActionMove( None ),
m_nXdndActionLink( None ),
m_nXdndActionAsk( None ),
- m_nXdndActionPrivate( None ),
m_bShutDown( false )
{
memset(&m_aDropEnterEvent, 0, sizeof(m_aDropEnterEvent));
@@ -361,9 +356,6 @@ void SelectionManager::initialize( const Sequence< Any >& arguments )
#ifdef SYNCHRONIZE
XSynchronize( m_pDisplay, True );
#endif
- // clipboard selection
- m_nCLIPBOARDAtom = getAtom( "CLIPBOARD" );
-
// special targets
m_nTARGETSAtom = getAtom( "TARGETS" );
m_nTIMESTAMPAtom = getAtom( "TIMESTAMP" );
@@ -371,7 +363,6 @@ void SelectionManager::initialize( const Sequence< Any >& arguments )
m_nINCRAtom = getAtom( "INCR" );
m_nCOMPOUNDAtom = getAtom( "COMPOUND_TEXT" );
m_nMULTIPLEAtom = getAtom( "MULTIPLE" );
- m_nUTF16Atom = getAtom( "ISO10646-1" );
m_nImageBmpAtom = getAtom( "image/bmp" );
// Atoms for Xdnd protocol
@@ -389,7 +380,6 @@ void SelectionManager::initialize( const Sequence< Any >& arguments )
m_nXdndActionMove = getAtom( "XdndActionMove" );
m_nXdndActionLink = getAtom( "XdndActionLink" );
m_nXdndActionAsk = getAtom( "XdndActionAsk" );
- m_nXdndActionPrivate= getAtom( "XdndActionPrivate" );
// initialize map with member none
m_aAtomToString[ 0 ]= "None";
@@ -2143,8 +2133,6 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage )
{
bHandled = true;
m_nDropTime = m_nCurrentProtocolVersion > 0 ? rMessage.data.l[3] : CurrentTime;
- if( ! m_bDropEnterSent )
- m_nDropTimestamp = m_nDropTime;
::Window aChild;
XTranslateCoordinates( m_pDisplay,
@@ -2623,7 +2611,6 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
int root_x = rMessage.type == MotionNotify ? rMessage.xmotion.x_root : rMessage.xcrossing.x_root;
int root_y = rMessage.type == MotionNotify ? rMessage.xmotion.y_root : rMessage.xcrossing.y_root;
::Window root = rMessage.type == MotionNotify ? rMessage.xmotion.root : rMessage.xcrossing.root;
- m_nDragTimestamp = rMessage.type == MotionNotify ? rMessage.xmotion.time : rMessage.xcrossing.time;
aGuard.clear();
if( rMessage.type == MotionNotify )
@@ -3830,7 +3817,6 @@ void SelectionManager::registerHandler( Atom selection, SelectionAdaptor& rAdapt
Selection* pNewSelection = new Selection();
pNewSelection->m_pAdaptor = &rAdaptor;
- pNewSelection->m_aAtom = selection;
m_aSelections[ selection ] = pNewSelection;
}
diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx
index 550e24a31a9f..1aac1ab253a4 100644
--- a/vcl/unx/generic/dtrans/X11_selection.hxx
+++ b/vcl/unx/generic/dtrans/X11_selection.hxx
@@ -182,7 +182,6 @@ namespace x11 {
State m_eState;
SelectionAdaptor* m_pAdaptor;
- Atom m_aAtom;
::osl::Condition m_aDataArrived;
css::uno::Sequence< sal_Int8 > m_aData;
css::uno::Sequence< css::datatransfer::DataFlavor >
@@ -206,7 +205,6 @@ namespace x11 {
Selection() : m_eState( Inactive ),
m_pAdaptor( nullptr ),
- m_aAtom( None ),
m_aRequestedType( None ),
m_nLastTimestamp( 0 ),
m_bHaveUTF16( false ),
@@ -273,7 +271,6 @@ namespace x11 {
css::uno::Reference< css::datatransfer::XTransferable >
m_xDropTransferable;
int m_nLastX, m_nLastY;
- Time m_nDropTimestamp;
// set to true when calling drop()
// if another XdndEnter is received this shows that
// someone forgot to call dropComplete - we should reset
@@ -308,7 +305,6 @@ namespace x11 {
bool m_bDropSent;
time_t m_nDropTimeout;
bool m_bWaitingForPrimaryConversion;
- Time m_nDragTimestamp;
// drag cursors
Cursor m_aMoveCursor;
@@ -324,14 +320,12 @@ namespace x11 {
m_aDropTargets;
// some special atoms that are needed often
- Atom m_nCLIPBOARDAtom;
Atom m_nTARGETSAtom;
Atom m_nTIMESTAMPAtom;
Atom m_nTEXTAtom;
Atom m_nINCRAtom;
Atom m_nCOMPOUNDAtom;
Atom m_nMULTIPLEAtom;
- Atom m_nUTF16Atom;
Atom m_nImageBmpAtom;
Atom m_nXdndAware;
Atom m_nXdndEnter;
@@ -347,7 +341,6 @@ namespace x11 {
Atom m_nXdndActionMove;
Atom m_nXdndActionLink;
Atom m_nXdndActionAsk;
- Atom m_nXdndActionPrivate;
// caching for atoms
std::unordered_map< Atom, OUString >
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index a3a9f6f5faab..468deab7e61c 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -380,7 +380,6 @@ FreetypeFont::FreetypeFont( const FontSelectPattern& rFSD, FreetypeFontInfo* pFI
mbFaceOk( false ),
mbArtItalic( false ),
mbArtBold( false ),
- mbUseGamma( false ),
mpHbFont( nullptr )
{
// TODO: move update of mpFontInstance into FontEntry class when
@@ -432,20 +431,6 @@ FreetypeFont::FreetypeFont( const FontSelectPattern& rFSD, FreetypeFontInfo* pFI
mbArtItalic = (rFSD.GetItalic() != ITALIC_NONE && pFI->GetFontAttributes().GetItalic() == ITALIC_NONE);
mbArtBold = (rFSD.GetWeight() > WEIGHT_MEDIUM && pFI->GetFontAttributes().GetWeight() <= WEIGHT_MEDIUM);
- if( mbArtBold )
- {
- //static const int TT_CODEPAGE_RANGE_874 = (1L << 16); // Thai
- //static const int TT_CODEPAGE_RANGE_932 = (1L << 17); // JIS/Japan
- //static const int TT_CODEPAGE_RANGE_936 = (1L << 18); // Chinese: Simplified
- //static const int TT_CODEPAGE_RANGE_949 = (1L << 19); // Korean Wansung
- //static const int TT_CODEPAGE_RANGE_950 = (1L << 20); // Chinese: Traditional
- //static const int TT_CODEPAGE_RANGE_1361 = (1L << 21); // Korean Johab
- static const int TT_CODEPAGE_RANGES1_CJKT = 0x3F0000; // all of the above
- const TT_OS2* pOs2 = static_cast<const TT_OS2*>(FT_Get_Sfnt_Table( maFaceFT, ft_sfnt_os2 ));
- if ((pOs2) && (pOs2->ulCodePageRange1 & TT_CODEPAGE_RANGES1_CJKT )
- && rFSD.mnHeight < 20)
- mbUseGamma = true;
- }
if( ((mnCos != 0) && (mnSin != 0)) || (mnPrioEmbedded <= 0) )
mnLoadFlags |= FT_LOAD_NO_BITMAP;
diff --git a/vcl/unx/generic/print/common_gfx.cxx b/vcl/unx/generic/print/common_gfx.cxx
index b06767308b7a..9b9f5dd8abb8 100644
--- a/vcl/unx/generic/print/common_gfx.cxx
+++ b/vcl/unx/generic/print/common_gfx.cxx
@@ -55,7 +55,6 @@ GraphicsStatus::GraphicsStatus() :
void
PrinterGfx::Init (PrinterJob &rPrinterJob)
{
- mpPageHeader = rPrinterJob.GetCurrentPageHeader ();
mpPageBody = rPrinterJob.GetCurrentPageBody ();
mnDepth = rPrinterJob.GetDepth ();
mnPSLevel = rPrinterJob.GetPostscriptLevel ();
@@ -70,7 +69,6 @@ PrinterGfx::Init (PrinterJob &rPrinterJob)
void
PrinterGfx::Init (const JobData& rData)
{
- mpPageHeader = nullptr;
mpPageBody = nullptr;
mnDepth = rData.m_nColorDepth;
mnPSLevel = rData.m_nPSLevel ? rData.m_nPSLevel : (rData.m_pParser ? rData.m_pParser->getLanguageLevel() : 2 );
@@ -92,7 +90,6 @@ PrinterGfx::PrinterGfx()
, mnPSLevel(0)
, mbColor(false)
, mbUploadPS42Fonts(false)
- , mpPageHeader(nullptr)
, mpPageBody(nullptr)
, mnFontID(0)
, mnTextAngle(0)
@@ -116,7 +113,6 @@ PrinterGfx::~PrinterGfx()
void
PrinterGfx::Clear()
{
- mpPageHeader = nullptr;
mpPageBody = nullptr;
mnFontID = 0;
maVirtualStatus = GraphicsStatus();
diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx
index 1feccabbd013..621cbf10f6ea 100644
--- a/vcl/unx/generic/print/genprnpsp.cxx
+++ b/vcl/unx/generic/print/genprnpsp.cxx
@@ -524,7 +524,7 @@ SalGraphics* PspSalInfoPrinter::AcquireGraphics()
if( ! m_pGraphics )
{
m_pGraphics = GetGenericInstance()->CreatePrintGraphics();
- m_pGraphics->Init(&m_aJobData, &m_aPrinterGfx, this);
+ m_pGraphics->Init(&m_aJobData, &m_aPrinterGfx);
pRet = m_pGraphics;
}
return pRet;
@@ -944,7 +944,7 @@ SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, bool )
JobData::constructFromStreamBuffer( pJobSetup->GetDriverData(), pJobSetup->GetDriverDataLen(), m_aJobData );
m_pGraphics = GetGenericInstance()->CreatePrintGraphics();
- m_pGraphics->Init(&m_aJobData, &m_aPrinterGfx, m_pInfoPrinter);
+ m_pGraphics->Init(&m_aJobData, &m_aPrinterGfx);
if( m_nCopies > 1 )
{
diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx
index ed50638a45b4..6e30a1da8591 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -243,20 +243,16 @@ SalPrinterBmp::GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const
GenPspGraphics::GenPspGraphics()
: m_pJobData( nullptr ),
- m_pPrinterGfx( nullptr ),
- m_bFontVertical( false ),
- m_pInfoPrinter( nullptr )
+ m_pPrinterGfx( nullptr )
{
for(FreetypeFont* & rp : m_pFreetypeFont)
rp = nullptr;
}
-void GenPspGraphics::Init(psp::JobData* pJob, psp::PrinterGfx* pGfx,
- SalInfoPrinter* pInfoPrinter)
+void GenPspGraphics::Init(psp::JobData* pJob, psp::PrinterGfx* pGfx)
{
m_pJobData = pJob;
m_pPrinterGfx = pGfx;
- m_pInfoPrinter = pInfoPrinter;
SetLayout( SalLayoutFlags::NONE );
}
@@ -651,7 +647,6 @@ void GenPspGraphics::SetFont( FontSelectPattern *pEntry, int nFallbackLevel )
}
// also set the serverside font for layouting
- m_bFontVertical = pEntry->mbVertical;
if( pEntry->mpFontData )
{
// requesting a font provided by builtin rasterizer
diff --git a/vcl/unx/generic/print/glyphset.cxx b/vcl/unx/generic/print/glyphset.cxx
index 531af284aa8e..4d71420aa0ca 100644
--- a/vcl/unx/generic/print/glyphset.cxx
+++ b/vcl/unx/generic/print/glyphset.cxx
@@ -51,7 +51,6 @@ GlyphSet::GlyphSet (sal_Int32 nFontID, bool bVertical)
PrintFontManager &rMgr = PrintFontManager::get();
maBaseName = OUStringToOString (rMgr.getPSName(mnFontID),
RTL_TEXTENCODING_ASCII_US);
- mnBaseEncoding = rMgr.getFontEncoding(mnFontID);
}
GlyphSet::~GlyphSet ()
diff --git a/vcl/unx/generic/print/glyphset.hxx b/vcl/unx/generic/print/glyphset.hxx
index c7b023cc2610..4b47f6fdd442 100644
--- a/vcl/unx/generic/print/glyphset.hxx
+++ b/vcl/unx/generic/print/glyphset.hxx
@@ -43,7 +43,6 @@ private:
sal_Int32 mnFontID;
bool mbVertical;
OString maBaseName;
- rtl_TextEncoding mnBaseEncoding;
typedef std::unordered_map< sal_GlyphId, sal_uInt8 > glyph_map_t;
typedef std::list< glyph_map_t > glyph_list_t;
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index f3c47a661d49..f1b1fa676380 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -837,8 +837,6 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle,
hCursor_ = None;
nCaptured_ = 0;
- nKeyCode_ = 0;
- nKeyState_ = 0;
mbSendExtKeyModChange = false;
mnExtKeyMod = ModKeyFlags::NONE;
@@ -868,7 +866,6 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle,
maAlwaysOnTopRaiseTimer.SetDebugName( "vcl::X11SalFrame maAlwaysOnTopRaiseTimer" );
meWindowType = WMWindowType::Normal;
- mnDecorationFlags = WMAdaptor::decoration_All;
mbMaximizedVert = false;
mbMaximizedHorz = false;
mbShaded = false;
@@ -3911,8 +3908,6 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
switch( pEvent->type )
{
case KeyPress:
- nKeyCode_ = pEvent->xkey.keycode;
- nKeyState_ = pEvent->xkey.state;
nRet = HandleKeyEvent( &pEvent->xkey );
break;
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index e171c2ba51bc..ee6b20378580 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -972,7 +972,6 @@ void GtkSalFrame::InitCommon()
m_bFullscreen = false;
m_bSpanMonitorsWhenFullscreen = false;
m_nState = GDK_WINDOW_STATE_WITHDRAWN;
- m_nVisibility = GDK_VISIBILITY_FULLY_OBSCURED;
m_pIMHandler = nullptr;
m_pRegion = nullptr;
m_ePointerStyle = static_cast<PointerStyle>(0xffff);
@@ -3272,10 +3271,8 @@ gboolean GtkSalFrame::signalWindowState( GtkWidget*, GdkEvent* pEvent, gpointer
return false;
}
-gboolean GtkSalFrame::signalVisibility( GtkWidget*, GdkEventVisibility* pEvent, gpointer frame )
+gboolean GtkSalFrame::signalVisibility( GtkWidget*, GdkEventVisibility* /*pEvent*/, gpointer /*frame*/ )
{
- GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
- pThis->m_nVisibility = pEvent->state;
return true;
}
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index c69aa3f71b13..1f5b04e7d112 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1088,7 +1088,6 @@ void GtkSalFrame::InitCommon()
m_bFullscreen = false;
m_bSpanMonitorsWhenFullscreen = false;
m_nState = GDK_WINDOW_STATE_WITHDRAWN;
- m_nVisibility = GDK_VISIBILITY_FULLY_OBSCURED;
m_pIMHandler = nullptr;
m_pRegion = nullptr;
m_pDropTarget = nullptr;
@@ -3283,10 +3282,8 @@ gboolean GtkSalFrame::signalWindowState( GtkWidget*, GdkEvent* pEvent, gpointer
return false;
}
-gboolean GtkSalFrame::signalVisibility( GtkWidget*, GdkEventVisibility* pEvent, gpointer frame )
+gboolean GtkSalFrame::signalVisibility( GtkWidget*, GdkEventVisibility* /*pEvent*/, gpointer /*frame*/ )
{
- GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
- pThis->m_nVisibility = pEvent->state;
return true;
}
commit 70ddc71b13ce201b40aeb8d39586acab7c04186d
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Jan 17 18:11:41 2018 +0100
sfx2 store: create temp files next to local files (storage case)
This is similar to commit 5259ab8104cfba60c40748ed0cd59d93df038c5b (sfx2
store: create temp files next to local files, 2018-01-08), except there
only the stream case was handled (e.g. sw HTML export), while this is
the storage case (e.g. ODT export).
Change-Id: I88d78aa0f09e9fdfdd27cd0fad1a2633ff54d576
Reviewed-on: https://gerrit.libreoffice.org/48071
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
(cherry picked from commit 27938e1bbd5f3405c47b9933be7489eeb03920f3)
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 9b44e90dc19d..1838af974842 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -3344,19 +3344,13 @@ bool SfxMedium::SetWritableForUserOnly( const OUString& aURL )
return bResult;
}
-
-void SfxMedium::CreateTempFile( bool bReplace )
+namespace
+{
+/// Get the parent directory of a temporary file for output purposes.
+OUString GetLogicBase(std::unique_ptr<SfxMedium_Impl>& pImpl)
{
- if ( pImpl->pTempFile )
- {
- if ( !bReplace )
- return;
-
- DELETEZ( pImpl->pTempFile );
- pImpl->m_aName.clear();
- }
-
OUString aLogicBase;
+
if (comphelper::isFileUrl(pImpl->m_aLogicName) && !pImpl->m_pInStream)
{
// Try to create the temp file in the same directory when storing.
@@ -3367,6 +3361,23 @@ void SfxMedium::CreateTempFile( bool bReplace )
// Doesn't make sense.
aLogicBase.clear();
}
+
+ return aLogicBase;
+}
+}
+
+void SfxMedium::CreateTempFile( bool bReplace )
+{
+ if ( pImpl->pTempFile )
+ {
+ if ( !bReplace )
+ return;
+
+ DELETEZ( pImpl->pTempFile );
+ pImpl->m_aName.clear();
+ }
+
+ OUString aLogicBase = GetLogicBase(pImpl);
pImpl->pTempFile = new ::utl::TempFile(aLogicBase.isEmpty() ? nullptr : &aLogicBase);
pImpl->pTempFile->EnableKillingFile();
pImpl->m_aName = pImpl->pTempFile->GetFileName();
@@ -3466,7 +3477,8 @@ void SfxMedium::CreateTempFileNoCopy()
if ( pImpl->pTempFile )
delete pImpl->pTempFile;
- pImpl->pTempFile = new ::utl::TempFile();
+ OUString aLogicBase = GetLogicBase(pImpl);
+ pImpl->pTempFile = new ::utl::TempFile(aLogicBase.isEmpty() ? nullptr : &aLogicBase);
pImpl->pTempFile->EnableKillingFile();
pImpl->m_aName = pImpl->pTempFile->GetFileName();
if ( pImpl->m_aName.isEmpty() )
commit a542da609eff32ac5a39c29285f7b902886d5ad6
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Jan 15 15:10:22 2018 +0100
sfx2 store: handle NoFileSync for Save (not SaveAs)
The code-path in SfxMedium and lower layers is the same, but not in
SfxObjectShell.
Change-Id: I85542d17cd6b3c2a0d257f5ff196e6504a194e51
Reviewed-on: https://gerrit.libreoffice.org/47903
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit e90a16d71cdcfbd785401613a2e5a29cb1167acf)
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 665b9d8ad736..a312d53868cb 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3500,7 +3500,7 @@ SfxVoidItem SaveSimple SID_SAVESIMPLE
]
SfxStringItem Save SID_SAVEDOC
-(SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem Author SID_DOCINFO_AUTHOR,SfxBoolItem DontTerminateEdit FN_PARAM_1)
+(SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem Author SID_DOCINFO_AUTHOR,SfxBoolItem DontTerminateEdit FN_PARAM_1,SfxBoolItem NoFileSync SID_NO_FILE_SYNC)
[
AutoUpdate = FALSE,
FastCall = FALSE,
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 1df20de8d694..bb506f4ed3f4 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -674,6 +674,7 @@ sal_Int8 ModelData_Impl::CheckStateForSave()
const OUString aInteractionHandlerString("InteractionHandler");
const OUString aStatusIndicatorString("StatusIndicator");
const OUString aFailOnWarningString("FailOnWarning");
+ const OUString aNoFileSync("NoFileSync");
if ( GetMediaDescr().find( aVersionCommentString ) != GetMediaDescr().end() )
aAcceptedArgs[ aVersionCommentString ] = GetMediaDescr()[ aVersionCommentString ];
@@ -687,6 +688,8 @@ sal_Int8 ModelData_Impl::CheckStateForSave()
aAcceptedArgs[ aStatusIndicatorString ] = GetMediaDescr()[ aStatusIndicatorString ];
if ( GetMediaDescr().find( aFailOnWarningString ) != GetMediaDescr().end() )
aAcceptedArgs[ aFailOnWarningString ] = GetMediaDescr()[ aFailOnWarningString ];
+ if (GetMediaDescr().find(aNoFileSync) != GetMediaDescr().end())
+ aAcceptedArgs[aNoFileSync] = GetMediaDescr()[aNoFileSync];
// remove unacceptable entry if there is any
DBG_ASSERT( GetMediaDescr().size() == aAcceptedArgs.size(),
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 6a77dac93513..4923b8cc953e 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2493,6 +2493,10 @@ bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs )
if ( pxInteractionItem && ( pxInteractionItem->GetValue() >>= xInteract ) && xInteract.is() )
pMediumTmp->GetItemSet()->Put( SfxUnoAnyItem( SID_INTERACTIONHANDLER, makeAny( xInteract ) ) );
+ const SfxBoolItem* pNoFileSync = pArgs->GetItem<SfxBoolItem>(SID_NO_FILE_SYNC, false);
+ if (pNoFileSync && pNoFileSync->GetValue())
+ pMediumTmp->DisableFileSync(true);
+
bool bSaved = false;
if( !GetError() && SaveTo_Impl( *pMediumTmp, pArgs ) )
{
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 7430b1a02b9d..d2c8dbee1d3f 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1482,7 +1482,8 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
&& aSeqArgs[nInd].Name != "InteractionHandler" && aSeqArgs[nInd].Name != "StatusIndicator"
&& aSeqArgs[nInd].Name != "VersionMajor"
&& aSeqArgs[nInd].Name != "FailOnWarning"
- && aSeqArgs[nInd].Name != "CheckIn" )
+ && aSeqArgs[nInd].Name != "CheckIn"
+ && aSeqArgs[nInd].Name != "NoFileSync" )
{
OUString aMessage( "Unexpected MediaDescriptor parameter: " );
aMessage += aSeqArgs[nInd].Name;
commit 6a4944cf87bd1e2a52fec4301293ec8a9493bb9b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jan 12 17:08:31 2018 +0100
sw: lazy load table autoformats for style purposes
Commit b7138e03ebc8a33258c099c5cf6015970646a40e (GSoC Writer Table
Styles; Import bugfix, 2016-07-26) changed the SwDoc ctor to always load
the table autoformats, which is expensive for simple documents. Avoid
the load in the ctor by switching to lazy-load and adding a way to count
the number of styles without loading the autoformats when there would be
none.
(mpTableStyles -> m_pTableStyles was only necessary to see if there is
access outside GetTableStyles() to this member, but there were not any.)
Times for 100 hello world inputs: 3863 -> 2753 ms is spent in XHTML-load + ODT
export + close (71% of original).
Reviewed-on: https://gerrit.libreoffice.org/47820
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
(cherry picked from commit 53ef918a6839c8d587dec1bb635e6b39397c53d0)
Conflicts:
sw/source/uibase/app/docstyle.cxx
Change-Id: I6737e7712c775573b56c8b0566e8e7fb615edee6
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 08c590a81024..1e76bffb68d1 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -330,7 +330,7 @@ class SW_DLLPUBLIC SwDoc :
css::uno::Reference<css::container::XNameContainer> m_xTemplateToProjectCache;
/// Table styles (autoformats that are applied with table changes).
- std::unique_ptr<SwTableAutoFormatTable> mpTableStyles;
+ std::unique_ptr<SwTableAutoFormatTable> m_pTableStyles;
/// Cell Styles not assigned to a Table Style
std::unique_ptr<SwCellStyleTable> mpCellStyles;
private:
@@ -1233,8 +1233,13 @@ public:
bool GetTableAutoFormat( const SwSelBoxes& rBoxes, SwTableAutoFormat& rGet );
/// Return the available table styles.
- SwTableAutoFormatTable& GetTableStyles() { return *mpTableStyles.get(); }
- const SwTableAutoFormatTable& GetTableStyles() const { return *mpTableStyles.get(); }
+ SwTableAutoFormatTable& GetTableStyles();
+ const SwTableAutoFormatTable& GetTableStyles() const
+ {
+ return const_cast<SwDoc*>(this)->GetTableStyles();
+ }
+ /// Counts table styles without triggering lazy-load of them.
+ bool HasTableStyles() const { return m_pTableStyles != nullptr; }
// Create a new table style. Tracked by Undo.
SwTableAutoFormat* MakeTableStyle(const OUString& rName, bool bBroadcast = false);
// Delete table style named rName. Tracked by undo.
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index f69b35dac309..42d9b2484286 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -243,7 +243,7 @@ SwDoc::SwDoc()
mpStyleAccess( nullptr ),
mpLayoutCache( nullptr ),
mpGrammarContact(createGrammarContact()),
- mpTableStyles(new SwTableAutoFormatTable),
+ m_pTableStyles(nullptr),
mpCellStyles(new SwCellStyleTable),
m_pXmlIdRegistry(),
mReferenceCount(0),
@@ -362,8 +362,6 @@ SwDoc::SwDoc()
}
mnRsidRoot = mnRsid;
- mpTableStyles->Load();
-
getIDocumentState().ResetModified();
}
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 9a1bdbd8eea2..7c6305e01151 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -3904,6 +3904,16 @@ bool SwDoc::GetTableAutoFormat( const SwSelBoxes& rBoxes, SwTableAutoFormat& rGe
return true;
}
+SwTableAutoFormatTable& SwDoc::GetTableStyles()
+{
+ if (!m_pTableStyles)
+ {
+ m_pTableStyles.reset(new SwTableAutoFormatTable);
+ m_pTableStyles->Load();
+ }
+ return *m_pTableStyles.get();
+}
+
OUString SwDoc::GetUniqueTableName() const
{
if( IsInMailMerge())
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index c2237f4a0ae1..1f04fb05cca6 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -696,6 +696,9 @@ sal_Int32 lcl_GetCountOrName<SfxStyleFamily::Pseudo>(const SwDoc& rDoc, OUString
template<>
sal_Int32 lcl_GetCountOrName<SfxStyleFamily::Table>(const SwDoc& rDoc, OUString* pString, sal_Int32 nIndex)
{
+ if (!rDoc.HasTableStyles())
+ return 0;
+
const auto pAutoFormats = &rDoc.GetTableStyles();
const sal_Int32 nCount = pAutoFormats->size();
if (0 <= nIndex && nIndex < nCount)
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index b694ca7f0a51..59ef92ba6ca1 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -3059,18 +3059,21 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
nSearchFamily == SfxStyleFamily::All )
{
const auto& aTableTemplateMap = SwTableAutoFormat::GetTableTemplateMap();
- const SwTableAutoFormatTable& rTableStyles = rDoc.GetTableStyles();
- for(size_t i = 0; i < rTableStyles.size(); ++i)
+ if (rDoc.HasTableStyles())
{
- const SwTableAutoFormat& rTableStyle = rTableStyles[i];
- for(size_t nBoxFormat = 0; nBoxFormat < aTableTemplateMap.size(); ++nBoxFormat)
+ const SwTableAutoFormatTable& rTableStyles = rDoc.GetTableStyles();
+ for(size_t i = 0; i < rTableStyles.size(); ++i)
{
- const sal_uInt32 nBoxIndex = aTableTemplateMap[nBoxFormat];
- const SwBoxAutoFormat& rBoxFormat = rTableStyle.GetBoxFormat(nBoxIndex);
- OUString sBoxFormatName;
- SwStyleNameMapper::FillProgName(rTableStyle.GetName(), sBoxFormatName, SwGetPoolIdFromName::CellStyle, true);
- sBoxFormatName += rTableStyle.GetTableTemplateCellSubName(rBoxFormat);
- aLst.Append( cCELLSTYLE, sBoxFormatName );
+ const SwTableAutoFormat& rTableStyle = rTableStyles[i];
+ for(size_t nBoxFormat = 0; nBoxFormat < aTableTemplateMap.size(); ++nBoxFormat)
+ {
+ const sal_uInt32 nBoxIndex = aTableTemplateMap[nBoxFormat];
+ const SwBoxAutoFormat& rBoxFormat = rTableStyle.GetBoxFormat(nBoxIndex);
+ OUString sBoxFormatName;
+ SwStyleNameMapper::FillProgName(rTableStyle.GetName(), sBoxFormatName, SwGetPoolIdFromName::CellStyle, true);
+ sBoxFormatName += rTableStyle.GetTableTemplateCellSubName(rBoxFormat);
+ aLst.Append( cCELLSTYLE, sBoxFormatName );
+ }
}
}
const SwCellStyleTable& rCellStyles = rDoc.GetCellStyles();
commit ec8ae5902f01fb0e17882b63513a5c0b06101d7c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jan 12 14:32:21 2018 +0100
sfx2 store: add API to allow disabling thumbnails only for a single save
This is similar to the
officecfg::Office::Common::Save::Document::GenerateThumbnail config
setting, but here we allow configuring this at a per-save basis, not
persistently.
Reviewed-on: https://gerrit.libreoffice.org/47812
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
(cherry picked from commit a746f20cae91a87b8263342fb558a12f2f0d50b2)
Conflicts:
sfx2/qa/cppunit/test_misc.cxx
Change-Id: Ieb5bd57f1d8fc9e211011f2647276d985cf53131
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index f75351cd6a69..3c8569f439f7 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -240,8 +240,9 @@
#define SID_TEMPLATE_MANAGER (SID_SFX_START + 1727)
#define SID_TOOLBAR_MODE (SID_SFX_START + 1728)
#define SID_NO_FILE_SYNC (SID_SFX_START + 1729)
+#define SID_NO_THUMBNAIL (SID_SFX_START + 1730)
-// SID_SFX_free_START (SID_SFX_START + 1730)
+// SID_SFX_free_START (SID_SFX_START + 1731)
// SID_SFX_free_END (SID_SFX_START + 3999)
#define SID_OPEN_NEW_VIEW (SID_SFX_START + 520)
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index e065460df3e8..665b9d8ad736 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3537,7 +3537,7 @@ SfxVoidItem SaveAll SID_SAVEDOCS
SfxStringItem SaveAs SID_SAVEASDOC
-(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName SID_FILTER_NAME,SfxStringItem Password SID_PASSWORD,SfxBoolItem PasswordInteraction SID_PASSWORDINTERACTION,SfxStringItem FilterOptions SID_FILE_FILTEROPTIONS,SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem VersionAuthor SID_DOCINFO_AUTHOR,SfxBoolItem Overwrite SID_OVERWRITE,SfxBoolItem Unpacked SID_UNPACK,SfxBoolItem SaveTo SID_SAVETO,SfxBoolItem NoFileSync SID_NO_FILE_SYNC)
+(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName SID_FILTER_NAME,SfxStringItem Password SID_PASSWORD,SfxBoolItem PasswordInteraction SID_PASSWORDINTERACTION,SfxStringItem FilterOptions SID_FILE_FILTEROPTIONS,SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem VersionAuthor SID_DOCINFO_AUTHOR,SfxBoolItem Overwrite SID_OVERWRITE,SfxBoolItem Unpacked SID_UNPACK,SfxBoolItem SaveTo SID_SAVETO,SfxBoolItem NoFileSync SID_NO_FILE_SYNC,SfxBoolItem NoThumbnail SID_NO_THUMBNAIL)
[
AutoUpdate = FALSE,
FastCall = FALSE,
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 6b9f071d45b2..0d34a1080a41 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -104,6 +104,7 @@ SfxFormalArgument const aFormalArgs[] = {
{ reinterpret_cast<SfxType*>(&aSfxInt16Item_Impl), "Version", SID_VERSION },
{ reinterpret_cast<SfxType*>(&aSfxBoolItem_Impl), "SaveACopy", SID_SAVEACOPYITEM },
{ reinterpret_cast<SfxType*>(&aSfxBoolItem_Impl), "NoFileSync", SID_NO_FILE_SYNC },
+ { reinterpret_cast<SfxType*>(&aSfxBoolItem_Impl), "NoThumbnail", SID_NO_THUMBNAIL },
};
static sal_uInt16 nMediaArgsCount = sizeof(aFormalArgs) / sizeof (SfxFormalArgument);
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 5d15cfc0ea14..6a77dac93513 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -101,6 +101,7 @@
#include <basic/modsizeexceeded.hxx>
#include <officecfg/Office/Common.hxx>
#include <osl/file.hxx>
+#include <comphelper/scopeguard.hxx>
#include <sfx2/signaturestate.hxx>
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list