[Libreoffice-commits] core.git: fpicker/Library_fps.mk fpicker/source

2021-04-22 Thread Matt K (via logerrit)
 fpicker/Library_fps.mk   |1 
 fpicker/source/win32/VistaFilePicker.cxx |  212 +
 fpicker/source/win32/VistaFilePicker.hxx |   10 
 fpicker/source/win32/VistaFilePickerEventHandler.cxx |   36 --
 fpicker/source/win32/VistaFilePickerImpl.cxx |  307 +++
 fpicker/source/win32/VistaFilePickerImpl.hxx |   66 +---
 fpicker/source/win32/asyncrequests.cxx   |  227 --
 fpicker/source/win32/asyncrequests.hxx   |  211 -
 fpicker/source/win32/requests.hxx|   76 
 9 files changed, 334 insertions(+), 812 deletions(-)

New commits:
commit 1c1226709c6be39c5462f5e6e1262ca630b30b34
Author: Matt K 
AuthorDate: Wed Apr 21 17:34:16 2021 -0500
Commit: Mike Kaganski 
CommitDate: Thu Apr 22 22:20:55 2021 +0200

tdf#106282 Change Windows File Dialog to run on the main thread

Windows crashes when an IFileDialog object is used on a non-main
thread when cancelling a long search operation, when COM is
initialized as single-threaded apartment for that thread.
Trying to use a non-main thread with COM initialized to
multi-threaded apartment hangs the dialog UI.  The only solution
that works is to run all File Dialogs on the main thread.  This
has a performance penalty on the application while a File Dialog
is open or if multiple dialogs are searching and then cancelled,
but it's better than crashing.  Other applications like Firefox
use only the main thread for File Dialogs, but have additional
processes to avoid the performance penalty.

Change-Id: Icf8a8179dbea19bd3d749a1c2fe8e67dbfc726c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114482
Reviewed-by: Matt K 
Reviewed-by: Jan-Marek Glogowski 
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/fpicker/Library_fps.mk b/fpicker/Library_fps.mk
index e41a8a40a081..047e888e3954 100644
--- a/fpicker/Library_fps.mk
+++ b/fpicker/Library_fps.mk
@@ -54,7 +54,6 @@ $(eval $(call gb_Library_add_libs,fps,\
 endif
 
 $(eval $(call gb_Library_add_exception_objects,fps,\
-   fpicker/source/win32/asyncrequests \
fpicker/source/win32/FilterContainer \
fpicker/source/win32/VistaFilePicker \
fpicker/source/win32/VistaFilePickerEventHandler \
diff --git a/fpicker/source/win32/VistaFilePicker.cxx 
b/fpicker/source/win32/VistaFilePicker.cxx
index e391bcf53c58..367f938dd3a6 100644
--- a/fpicker/source/win32/VistaFilePicker.cxx
+++ b/fpicker/source/win32/VistaFilePicker.cxx
@@ -19,8 +19,6 @@
 
 #include 
 
-#include 
-
 #include "VistaFilePicker.hxx"
 
 #include "WinImplHelper.hxx"
@@ -36,7 +34,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -48,9 +45,6 @@ namespace vista{
 
 VistaFilePicker::VistaFilePicker(bool bFolderPicker)
 : TVistaFilePickerBase  (m_aMutex )
-, m_rDialog (std::make_shared())
-, m_aAsyncExecute   (m_rDialog)
-, m_nFilePickerThreadId (0)
 , m_bInitialized(false)
 , m_bFolderPicker   (bFolderPicker)
 {
@@ -62,20 +56,20 @@ VistaFilePicker::~VistaFilePicker()
 
 void SAL_CALL VistaFilePicker::addFilePickerListener(const 
css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener)
 {
-RequestRef rRequest = std::make_shared();
-rRequest->setRequest (VistaFilePickerImpl::E_ADD_PICKER_LISTENER);
-rRequest->setArgument(PROP_PICKER_LISTENER, xListener);
+Request rRequest;
+rRequest.setRequest (VistaFilePickerImpl::E_ADD_PICKER_LISTENER);
+rRequest.setArgument(PROP_PICKER_LISTENER, xListener);
 
-m_aAsyncExecute.triggerRequestThreadAware(rRequest, 
AsyncRequests::NON_BLOCKED);
+m_rDialog.doRequest(rRequest);
 }
 
 void SAL_CALL VistaFilePicker::removeFilePickerListener(const 
css::uno::Reference< css::ui::dialogs::XFilePickerListener >& xListener )
 {
-RequestRef rRequest = std::make_shared();
-rRequest->setRequest (VistaFilePickerImpl::E_REMOVE_PICKER_LISTENER);
-rRequest->setArgument(PROP_PICKER_LISTENER, xListener);
+Request rRequest;
+rRequest.setRequest (VistaFilePickerImpl::E_REMOVE_PICKER_LISTENER);
+rRequest.setArgument(PROP_PICKER_LISTENER, xListener);
 
-m_aAsyncExecute.triggerRequestThreadAware(rRequest, 
AsyncRequests::NON_BLOCKED);
+m_rDialog.doRequest(rRequest);
 }
 
 void VistaFilePicker::disposing(const css::lang::EventObject& /*aEvent*/)
@@ -86,95 +80,95 @@ void SAL_CALL 
VistaFilePicker::setMultiSelectionMode(sal_Bool bMode)
 {
 ensureInit();
 
-RequestRef rRequest = std::make_shared();
-rRequest->setRequest (VistaFilePickerImpl::E_SET_MULTISELECTION_MODE);
-rRequest->setArgument(PROP_MULTISELECTION_MODE, bMode);
+Request rRequest;
+rRequest.setRequest (VistaFilePickerImpl::E_SET_MULTISELECTION_MODE);
+

[Libreoffice-commits] core.git: fpicker/Library_fps.mk fpicker/source

2020-07-26 Thread Noel Grandin (via logerrit)
 fpicker/Library_fps.mk  |1 
 fpicker/source/win32/FPServiceInfo.hxx  |   37 --
 fpicker/source/win32/FPentry.cxx|   97 
 fpicker/source/win32/VistaFilePicker.cxx|   39 ++-
 fpicker/source/win32/VistaFilePicker.hxx|9 --
 fpicker/source/win32/fps.component  |8 +-
 fpicker/source/win32/workbench/Test_fps.cxx |2 
 7 files changed, 29 insertions(+), 164 deletions(-)

New commits:
commit 946e742aa63a2559721c761cea5c80286fbffa6b
Author: Noel Grandin 
AuthorDate: Sun Jul 26 20:54:22 2020 +0200
Commit: Noel Grandin 
CommitDate: Sun Jul 26 22:15:12 2020 +0200

fpicker/win32: create instances with uno constructors

See tdf#74608 for motivation.

Change-Id: Ic7d6c94e8709184fc8f195bd019402e361e9b810
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99461
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/fpicker/Library_fps.mk b/fpicker/Library_fps.mk
index 31dd47e88b30..e41a8a40a081 100644
--- a/fpicker/Library_fps.mk
+++ b/fpicker/Library_fps.mk
@@ -56,7 +56,6 @@ endif
 $(eval $(call gb_Library_add_exception_objects,fps,\
fpicker/source/win32/asyncrequests \
fpicker/source/win32/FilterContainer \
-   fpicker/source/win32/FPentry \
fpicker/source/win32/VistaFilePicker \
fpicker/source/win32/VistaFilePickerEventHandler \
fpicker/source/win32/VistaFilePickerImpl \
diff --git a/fpicker/source/win32/FPServiceInfo.hxx 
b/fpicker/source/win32/FPServiceInfo.hxx
deleted file mode 100644
index edc350c1a9cc..
--- a/fpicker/source/win32/FPServiceInfo.hxx
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- 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_FPICKER_SOURCE_WIN32_FILEPICKER_FPSERVICEINFO_HXX
-#define INCLUDED_FPICKER_SOURCE_WIN32_FILEPICKER_FPSERVICEINFO_HXX
-
-// the service names
-#define FILE_PICKER_SERVICE_NAME  "com.sun.star.ui.dialogs.SystemFilePicker"
-
-// the implementation names
-#define FILE_PICKER_IMPL_NAME  "com.sun.star.ui.dialogs.Win32FilePicker"
-
-// the service names
-#define FOLDER_PICKER_SERVICE_NAME  
"com.sun.star.ui.dialogs.SystemFolderPicker"
-
-// the implementation names
-#define FOLDER_PICKER_IMPL_NAME  "com.sun.star.ui.dialogs.Win32FolderPicker"
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/FPentry.cxx b/fpicker/source/win32/FPentry.cxx
deleted file mode 100644
index a4e48f8865e5..
--- a/fpicker/source/win32/FPentry.cxx
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- 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 .
- */
-
-#include 
-#include 
-#include 
-#include "FPServiceInfo.hxx"
-
-#include "VistaFilePicker.hxx"
-#include "WinImplHelper.hxx"
-#include 
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
-using namespace ::cppu;
-using ::com::sun::star::ui::dialogs::XFilePicker2;
-using ::com::sun::star::ui::dialogs::XFolderPicker2;
-
-static Reference< XInterface > createInstance(
-const Reference< XMultiServiceFactory >& rServiceManager )
-{
-return Reference(
- 

[Libreoffice-commits] core.git: fpicker/Library_fps.mk fpicker/source fpicker/WinResTarget_fps.mk solenv/clang-format

2018-09-11 Thread Libreoffice Gerrit user
 fpicker/Library_fps.mk   |   16 +++
 fpicker/WinResTarget_fps.mk  |2 
 fpicker/source/win32/FPentry.cxx |2 
 fpicker/source/win32/VistaFilePicker.cxx |2 
 fpicker/source/win32/VistaFilePickerImpl.cxx |2 
 fpicker/source/win32/VistaFilePickerImpl.hxx |2 
 solenv/clang-format/blacklist|   57 +++
 7 files changed, 37 insertions(+), 46 deletions(-)

New commits:
commit 591db0f97b6084723c138a01d5f336b1f1a3a639
Author: Jan-Marek Glogowski 
AuthorDate: Fri Sep 7 13:09:35 2018 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Tue Sep 11 18:05:35 2018 +0200

WIN drop unused fpicker subdirs

While the folder picker had some shared code with the file picker,
the folder hierarchy made some sense, but since it's gone now,
move the files to the base directory.

Change-Id: Ib78ada9cdb570df64ccbc28da835cfcaf25009db
Reviewed-on: https://gerrit.libreoffice.org/60145
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/fpicker/Library_fps.mk b/fpicker/Library_fps.mk
index cc08f47525d5..27432868c004 100644
--- a/fpicker/Library_fps.mk
+++ b/fpicker/Library_fps.mk
@@ -61,14 +61,14 @@ $(eval $(call gb_Library_add_libs,fps,\
 endif
 
 $(eval $(call gb_Library_add_exception_objects,fps,\
-   fpicker/source/win32/filepicker/asyncrequests \
-   fpicker/source/win32/filepicker/FilterContainer \
-   fpicker/source/win32/filepicker/FPentry \
-   fpicker/source/win32/filepicker/VistaFilePicker \
-   fpicker/source/win32/filepicker/VistaFilePickerEventHandler \
-   fpicker/source/win32/filepicker/VistaFilePickerImpl \
-   fpicker/source/win32/misc/resourceprovider \
-   fpicker/source/win32/misc/WinImplHelper \
+   fpicker/source/win32/asyncrequests \
+   fpicker/source/win32/FilterContainer \
+   fpicker/source/win32/FPentry \
+   fpicker/source/win32/VistaFilePicker \
+   fpicker/source/win32/VistaFilePickerEventHandler \
+   fpicker/source/win32/VistaFilePickerImpl \
+   fpicker/source/win32/resourceprovider \
+   fpicker/source/win32/WinImplHelper \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/fpicker/WinResTarget_fps.mk b/fpicker/WinResTarget_fps.mk
index ef69bde33d10..07fe66bcca35 100644
--- a/fpicker/WinResTarget_fps.mk
+++ b/fpicker/WinResTarget_fps.mk
@@ -9,6 +9,6 @@
 
 $(eval $(call gb_WinResTarget_WinResTarget,fps/Fps))
 
-$(eval $(call 
gb_WinResTarget_set_rcfile,fps/Fps,fpicker/source/win32/filepicker/Fps))
+$(eval $(call gb_WinResTarget_set_rcfile,fps/Fps,fpicker/source/win32/Fps))
 
 # vim: set ts=4 sw=4 et:
diff --git a/fpicker/source/win32/filepicker/FPServiceInfo.hxx 
b/fpicker/source/win32/FPServiceInfo.hxx
similarity index 100%
rename from fpicker/source/win32/filepicker/FPServiceInfo.hxx
rename to fpicker/source/win32/FPServiceInfo.hxx
diff --git a/fpicker/source/win32/filepicker/FPentry.cxx 
b/fpicker/source/win32/FPentry.cxx
similarity index 98%
rename from fpicker/source/win32/filepicker/FPentry.cxx
rename to fpicker/source/win32/FPentry.cxx
index 885104529f48..2e24682d5544 100644
--- a/fpicker/source/win32/filepicker/FPentry.cxx
+++ b/fpicker/source/win32/FPentry.cxx
@@ -23,7 +23,7 @@
 #include "FPServiceInfo.hxx"
 
 #include "VistaFilePicker.hxx"
-#include "../misc/WinImplHelper.hxx"
+#include "WinImplHelper.hxx"
 #include 
 
 using namespace ::com::sun::star;
diff --git a/fpicker/source/win32/filepicker/FilterContainer.cxx 
b/fpicker/source/win32/FilterContainer.cxx
similarity index 100%
rename from fpicker/source/win32/filepicker/FilterContainer.cxx
rename to fpicker/source/win32/FilterContainer.cxx
diff --git a/fpicker/source/win32/filepicker/FilterContainer.hxx 
b/fpicker/source/win32/FilterContainer.hxx
similarity index 100%
rename from fpicker/source/win32/filepicker/FilterContainer.hxx
rename to fpicker/source/win32/FilterContainer.hxx
diff --git a/fpicker/source/win32/filepicker/Fps.rc 
b/fpicker/source/win32/Fps.rc
similarity index 100%
rename from fpicker/source/win32/filepicker/Fps.rc
rename to fpicker/source/win32/Fps.rc
diff --git a/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx 
b/fpicker/source/win32/IVistaFilePickerInternalNotify.hxx
similarity index 100%
rename from fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
rename to fpicker/source/win32/IVistaFilePickerInternalNotify.hxx
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx 
b/fpicker/source/win32/VistaFilePicker.cxx
similarity index 99%
rename from fpicker/source/win32/filepicker/VistaFilePicker.cxx
rename to fpicker/source/win32/VistaFilePicker.cxx
index 17b6a566d8ce..0737100d07e6 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx
+++ b/fpicker/source/win32/VistaFilePicker.cxx
@@ -19,7 +19,7 @@
 
 #include "VistaFilePicker.hxx"
 
-#include "../misc/WinImplHelper.hxx"
+#include "WinImplHelper.hxx"
 #include "FPServiceInfo.hxx"
 

[Libreoffice-commits] core.git: fpicker/Library_fps.mk fpicker/source

2018-09-08 Thread Libreoffice Gerrit user
 fpicker/Library_fps.mk|3 
 fpicker/source/win32/filepicker/FPServiceInfo.hxx |6 
 fpicker/source/win32/filepicker/FPentry.cxx   |   17 
 fpicker/source/win32/filepicker/VistaFilePicker.cxx   |   46 
 fpicker/source/win32/filepicker/VistaFilePicker.hxx   |   21 
 fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx   |  177 ++-
 fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx   |   17 
 fpicker/source/win32/filepicker/vistatypes.h  |1 
 fpicker/source/win32/folderpicker/FOPServiceInfo.hxx  |   35 
 fpicker/source/win32/folderpicker/FolderPicker.cxx|  134 --
 fpicker/source/win32/folderpicker/FolderPicker.hxx|  104 --
 fpicker/source/win32/folderpicker/FopEvtDisp.hxx  |   39 
 fpicker/source/win32/folderpicker/MtaFop.cxx  |  722 --
 fpicker/source/win32/folderpicker/MtaFop.hxx  |  137 --
 fpicker/source/win32/folderpicker/WinFOPImpl.cxx  |  117 --
 fpicker/source/win32/folderpicker/WinFOPImpl.hxx  |   64 -
 fpicker/source/win32/folderpicker/workbench/Test_fops.cxx |  147 --
 fpicker/source/win32/folderpicker/workbench/makefile.mk   |   54 -
 18 files changed, 197 insertions(+), 1644 deletions(-)

New commits:
commit 2129753120d8101f0f484571b6a8cd8eb4d4629c
Author: Jan-Marek Glogowski 
AuthorDate: Fri Sep 7 13:00:38 2018 +0200
Commit: Jan-Marek Glogowski 
CommitDate: Sat Sep 8 23:07:06 2018 +0200

tdf#119730 WIN switch to IFileDialog FOS_PICKFOLDERS

Citing SHBrowseForFolderW remarks: "For Windows Vista or later, it
is recommended that you use IFileDialog with the FOS_PICKFOLDERS
option rather than the SHBrowseForFolder function."

Since the minimum required Windows version is already 7 and we
already just provide the Vista file picker, this gets rid of the
Windows XP compatible folder picker code.

Change-Id: I85daae84d4eb36fc827cf20aa277ce6a2f63dd2c
Reviewed-on: https://gerrit.libreoffice.org/60144
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/fpicker/Library_fps.mk b/fpicker/Library_fps.mk
index d6be222b1f19..cc08f47525d5 100644
--- a/fpicker/Library_fps.mk
+++ b/fpicker/Library_fps.mk
@@ -67,9 +67,6 @@ $(eval $(call gb_Library_add_exception_objects,fps,\
fpicker/source/win32/filepicker/VistaFilePicker \
fpicker/source/win32/filepicker/VistaFilePickerEventHandler \
fpicker/source/win32/filepicker/VistaFilePickerImpl \
-   fpicker/source/win32/folderpicker/FolderPicker \
-   fpicker/source/win32/folderpicker/MtaFop \
-   fpicker/source/win32/folderpicker/WinFOPImpl \
fpicker/source/win32/misc/resourceprovider \
fpicker/source/win32/misc/WinImplHelper \
 ))
diff --git a/fpicker/source/win32/filepicker/FPServiceInfo.hxx 
b/fpicker/source/win32/filepicker/FPServiceInfo.hxx
index 36aadf4b1c97..edc350c1a9cc 100644
--- a/fpicker/source/win32/filepicker/FPServiceInfo.hxx
+++ b/fpicker/source/win32/filepicker/FPServiceInfo.hxx
@@ -26,6 +26,12 @@
 // the implementation names
 #define FILE_PICKER_IMPL_NAME  "com.sun.star.ui.dialogs.Win32FilePicker"
 
+// the service names
+#define FOLDER_PICKER_SERVICE_NAME  
"com.sun.star.ui.dialogs.SystemFolderPicker"
+
+// the implementation names
+#define FOLDER_PICKER_IMPL_NAME  "com.sun.star.ui.dialogs.Win32FolderPicker"
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/filepicker/FPentry.cxx 
b/fpicker/source/win32/filepicker/FPentry.cxx
index 2166ba82e6d4..d62dda491128 100644
--- a/fpicker/source/win32/filepicker/FPentry.cxx
+++ b/fpicker/source/win32/filepicker/FPentry.cxx
@@ -25,32 +25,27 @@
 #include "../misc/WinImplHelper.hxx"
 #include 
 
-#include "../folderpicker/FolderPicker.hxx"
-#include "../folderpicker/FOPServiceInfo.hxx"
-#include "../folderpicker/WinFOPImpl.hxx"
-
+using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::registry;
 using namespace ::cppu;
 using ::com::sun::star::ui::dialogs::XFilePicker2;
+using ::com::sun::star::ui::dialogs::XFolderPicker2;
 
 static Reference< XInterface > createInstance(
 const Reference< XMultiServiceFactory >& rServiceManager )
 {
-Reference< XInterface > xDlg;
-
-xDlg.set(static_cast(
-new ::fpicker::win32::vista::VistaFilePicker(rServiceManager)));
-
-return xDlg;
+return Reference(
+new ::fpicker::win32::vista::VistaFilePicker(rServiceManager, 
false));
 }
 
 static Reference< XInterface >
 createInstance_fop( const Reference< XMultiServiceFactory >& rServiceManager )
 {
-return Reference< XInterface >( static_cast< cppu::OWeakObject * >( new 
CFolderPicker( rServiceManager ) ) );
+return Reference(
+new ::fpicker::win32::vista::VistaFilePicker(rServiceManager, 

[Libreoffice-commits] core.git: fpicker/Library_fps.mk fpicker/source

2016-10-13 Thread Stephan Bergmann
 fpicker/Library_fps.mk |1 
 fpicker/source/win32/filepicker/SolarMutex.cxx |   40 -
 fpicker/source/win32/filepicker/SolarMutex.hxx |   27 ---
 fpicker/source/win32/filepicker/asynceventnotifier.cxx |2 
 4 files changed, 70 deletions(-)

New commits:
commit e35e95560d714a84da4c3a07f50de1de339ab727
Author: Stephan Bergmann 
Date:   Thu Oct 13 22:02:19 2016 +0200

ReleaseSolarMutexOnMainThreadContext is unused

...ever since its introduction in 29da2639353762a64673d6ae5b32a36045caa7d3
"CWS-TOOLING: integrate CWS filepicker01"

Change-Id: I2bd989e7e950bf58a8f26708f79eeed223c4fb4a
Reviewed-on: https://gerrit.libreoffice.org/29799
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/fpicker/Library_fps.mk b/fpicker/Library_fps.mk
index 90eb8da..c57b411 100644
--- a/fpicker/Library_fps.mk
+++ b/fpicker/Library_fps.mk
@@ -78,7 +78,6 @@ $(eval $(call gb_Library_add_exception_objects,fps,\
fpicker/source/win32/filepicker/helppopupwindow \
fpicker/source/win32/filepicker/previewadapter \
fpicker/source/win32/filepicker/previewbase \
-   fpicker/source/win32/filepicker/SolarMutex \
fpicker/source/win32/filepicker/VistaFilePicker \
fpicker/source/win32/filepicker/VistaFilePickerEventHandler \
fpicker/source/win32/filepicker/VistaFilePickerImpl \
diff --git a/fpicker/source/win32/filepicker/SolarMutex.cxx 
b/fpicker/source/win32/filepicker/SolarMutex.cxx
deleted file mode 100644
index 3b8fdbb..000
--- a/fpicker/source/win32/filepicker/SolarMutex.cxx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- 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 .
- */
-
-
-#include 
-#include 
-#include 
-
-int ReleaseSolarMutexOnMainThreadContext(unsigned nThreadId)
-{
-int nAcquireCount = 0;
-oslThreadIdentifier nMainThreadId = Application::GetMainThreadIdentifier();
-
-if ( nMainThreadId == nThreadId )
-{
-comphelper::SolarMutex& rMutex = Application::GetSolarMutex();
-if ( rMutex.tryToAcquire() )
-nAcquireCount = Application::ReleaseSolarMutex() - 1;
-}
-
-return nAcquireCount;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/filepicker/SolarMutex.hxx 
b/fpicker/source/win32/filepicker/SolarMutex.hxx
deleted file mode 100644
index 3233083..000
--- a/fpicker/source/win32/filepicker/SolarMutex.hxx
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- 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_FPICKER_SOURCE_WIN32_FILEPICKER_SOLARMUTEX_HXX
-#define INCLUDED_FPICKER_SOURCE_WIN32_FILEPICKER_SOLARMUTEX_HXX
-
-int ReleaseSolarMutexOnMainThreadContext(unsigned nThreadId);
-
-#endif // INCLUDED_FPICKER_SOURCE_WIN32_FILEPICKER_SOLARMUTEX_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/filepicker/asynceventnotifier.cxx 
b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
index 08b61f8..854a6b8 100644
--- a/fpicker/source/win32/filepicker/asynceventnotifier.cxx
+++ b/fpicker/source/win32/filepicker/asynceventnotifier.cxx
@@ -25,8 +25,6 @@
 
 #include 
 #include 
-#include 

[Libreoffice-commits] core.git: fpicker/Library_fps.mk fpicker/source

2013-09-07 Thread Julien Nabet
 fpicker/Library_fps.mk   |1 
 fpicker/source/win32/misc/AutoBuffer.cxx |  156 ---
 fpicker/source/win32/misc/AutoBuffer.hxx |   72 --
 3 files changed, 229 deletions(-)

New commits:
commit a92be728a5affb7d74c8c6831968c05aeff4
Author: Julien Nabet serval2...@yahoo.fr
Date:   Thu Sep 5 19:47:57 2013 +0200

fdo#42155: Replace the only use of CAutoUnicodeBuffer end part

Change-Id: Id1c00a24cdc1914693d8cad64923af3db786
Reviewed-on: https://gerrit.libreoffice.org/5829
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org

diff --git a/fpicker/Library_fps.mk b/fpicker/Library_fps.mk
index 4a1056a..6595f6c 100644
--- a/fpicker/Library_fps.mk
+++ b/fpicker/Library_fps.mk
@@ -86,7 +86,6 @@ $(eval $(call gb_Library_add_exception_objects,fps,\
fpicker/source/win32/folderpicker/FolderPicker \
fpicker/source/win32/folderpicker/MtaFop \
fpicker/source/win32/folderpicker/WinFOPImpl \
-   fpicker/source/win32/misc/AutoBuffer \
fpicker/source/win32/misc/resourceprovider \
fpicker/source/win32/misc/WinImplHelper \
 ))
diff --git a/fpicker/source/win32/misc/AutoBuffer.cxx 
b/fpicker/source/win32/misc/AutoBuffer.cxx
deleted file mode 100644
index 17162e3..000
--- a/fpicker/source/win32/misc/AutoBuffer.cxx
+++ /dev/null
@@ -1,156 +0,0 @@
-/* -*- 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 .
- */
-
-#include AutoBuffer.hxx
-#include osl/diagnose.h
-
-#if defined _MSC_VER
-#pragma warning(push, 1)
-#endif
-#include windows.h
-#if defined _MSC_VER
-#pragma warning(pop)
-#endif
-
-//
-// namespace directives
-//
-
-
-//
-//
-//
-
-CAutoUnicodeBuffer::CAutoUnicodeBuffer( size_t nSize, sal_Bool bLazyCreation ) 
:
-m_buffSize( nSize ),
-m_pBuff( NULL )
-{
-if ( !bLazyCreation )
-init( );
-}
-
-//
-//
-//
-
-CAutoUnicodeBuffer::~CAutoUnicodeBuffer( )
-{
-delete [] m_pBuff;
-}
-
-//
-//
-//
-
-sal_Bool SAL_CALL CAutoUnicodeBuffer::resize( size_t new_size )
-{
-if ( new_size != m_buffSize )
-{
-if ( new_size  m_buffSize )
-{
-delete [] m_pBuff;
-m_pBuff = NULL;
-}
-
-m_buffSize = new_size;
-}
-
-return sal_True;
-}
-
-//
-//
-//
-
-void SAL_CALL CAutoUnicodeBuffer::empty( )
-{
-if ( m_pBuff )
-ZeroMemory( m_pBuff, m_buffSize * sizeof( sal_Unicode ) );
-}
-
-//
-//
-//
-
-sal_Bool SAL_CALL CAutoUnicodeBuffer::fill( const sal_Unicode* pContent, 
size_t nLen )
-{
-OSL_ASSERT( pContent  m_buffSize  (m_buffSize = nLen) );
-
-init( );
-
-sal_Bool bRet = sal_False;
-
-if ( m_pBuff  pContent  nLen )
-{
-CopyMemory( m_pBuff, pContent, nLen * sizeof( sal_Unicode ) );
-bRet = sal_True;
-}
-
-return bRet;
-}
-
-//
-//
-//
-
-size_t SAL_CALL CAutoUnicodeBuffer::size( ) const
-{
-return m_buffSize;
-}
-
-//
-//
-//
-
-CAutoUnicodeBuffer::operator 

[Libreoffice-commits] core.git: fpicker/Library_fps.mk fpicker/source writerfilter/Library_writerfilter.mk

2013-07-23 Thread Fridrich Štrba
 fpicker/Library_fps.mk  |4 
 fpicker/source/win32/filepicker/VistaFilePicker.cxx |   19 +++
 writerfilter/Library_writerfilter.mk|2 +-
 3 files changed, 12 insertions(+), 13 deletions(-)

New commits:
commit 57ebb84c1fdfc868cc01bd4b12e95ca043cda718
Author: Fridrich Å trba fridrich.st...@bluewin.ch
Date:   Wed Jul 24 00:29:11 2013 +0200

Revert fdo#46037: no more comphelper/configurationhelper.hxx in fpicker

This reverts commit 7cbf9c9e0a34937783dfa7f78d460dcf70504841.

Revert Trying to fix the windows build

This reverts commit d1f58e5ea695e823e931aad1bfb1d7b4bf17634c.

Change-Id: I67d00ec010a834e27b0e79b0afd92c5a2e7d47d6

diff --git a/fpicker/Library_fps.mk b/fpicker/Library_fps.mk
index 4a1056a..c4b3e0e 100644
--- a/fpicker/Library_fps.mk
+++ b/fpicker/Library_fps.mk
@@ -10,10 +10,6 @@
 
 $(eval $(call gb_Library_Library,fps))
 
-$(eval $(call gb_Library_use_custom_headers,fps,\
-   officecfg/registry \
-))
-
 $(eval $(call gb_Library_add_nativeres,fps,fps/Fps))
 
 $(eval $(call gb_Library_set_componentfile,fps,fpicker/source/win32/fps))
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx 
b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index 1f204d6..2bf2e28 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
@@ -37,12 +37,12 @@
 #include com/sun/star/ui/dialogs/ExecutableDialogResults.hpp
 
 #include cppuhelper/interfacecontainer.h
+#include comphelper/configurationhelper.hxx
 #include comphelper/processfactory.hxx
 #include osl/diagnose.h
 #include osl/mutex.hxx
 #include osl/file.hxx
 #include tchar.h
-#include officecfg/Office/Common.hxx
 
 #ifdef _MSC_VER
 #pragma warning (push, 1)
@@ -215,15 +215,18 @@ void SAL_CALL VistaFilePicker::setDisplayDirectory(const 
OUString sDirectory)
 throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException )
 {
-bool bChanged = 
officecfg::Office::Common::Path::Info::WorkPathChanged::get();
+const OUString aPackage(org.openoffice.Office.Common/);
+const OUString aRelPath(Path/Info);
+const OUString aKey(WorkPathChanged);
 
-if (bChanged )
+css::uno::Any aValue = ::comphelper::ConfigurationHelper::readDirectKey(
+comphelper::getComponentContext(m_xSMGR), aPackage, aRelPath, aKey, 
::comphelper::ConfigurationHelper::E_READONLY);
+
+bool bChanged(false);
+if (( aValue = bChanged )  bChanged )
 {
-boost::shared_ptr comphelper::ConfigurationChanges  batch(
-comphelper::ConfigurationChanges::create());
-officecfg::Office::Common::Path::Info::WorkPathChanged::set(
-false, batch);
-batch-commit();
+::comphelper::ConfigurationHelper::writeDirectKey(
+comphelper::getComponentContext(m_xSMGR), aPackage, aRelPath, 
aKey, css::uno::makeAny(false), ::comphelper::ConfigurationHelper::E_STANDARD);
 }
 
 RequestRef rRequest(new Request());
diff --git a/writerfilter/Library_writerfilter.mk 
b/writerfilter/Library_writerfilter.mk
index 0f3bdb1..aaa2969 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -10,7 +10,7 @@
 $(eval $(call gb_Library_Library,writerfilter))
 
 $(eval $(call gb_Library_use_custom_headers,writerfilter,\
-   officecfg/registry \
+officecfg/registry \
oox/generated \
writerfilter/source \
 ))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: fpicker/Library_fps.mk fpicker/source writerfilter/Library_writerfilter.mk

2013-07-23 Thread Julien Nabet
 fpicker/Library_fps.mk  |4 +++
 fpicker/source/win32/filepicker/VistaFilePicker.cxx |   22 ++--
 writerfilter/Library_writerfilter.mk|2 -
 3 files changed, 16 insertions(+), 12 deletions(-)

New commits:
commit 75ef95ebc48517d228d369167f89424a72b320bf
Author: Julien Nabet serval2...@yahoo.fr
Date:   Tue Jul 23 09:49:31 2013 +0200

fdo#46037: no more comphelper/configurationhelper.hxx in fpicker

Change-Id: I571e0271d9432118d886561e140d689b2d1b8713
Reviewed-on: https://gerrit.libreoffice.org/5042
Reviewed-by: Fridrich Strba fridr...@documentfoundation.org
Tested-by: Fridrich Strba fridr...@documentfoundation.org

diff --git a/fpicker/Library_fps.mk b/fpicker/Library_fps.mk
index c4b3e0e..4a1056a 100644
--- a/fpicker/Library_fps.mk
+++ b/fpicker/Library_fps.mk
@@ -10,6 +10,10 @@
 
 $(eval $(call gb_Library_Library,fps))
 
+$(eval $(call gb_Library_use_custom_headers,fps,\
+   officecfg/registry \
+))
+
 $(eval $(call gb_Library_add_nativeres,fps,fps/Fps))
 
 $(eval $(call gb_Library_set_componentfile,fps,fpicker/source/win32/fps))
diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx 
b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
index 2bf2e28..b7f7d83 100644
--- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx
@@ -37,12 +37,15 @@
 #include com/sun/star/ui/dialogs/ExecutableDialogResults.hpp
 
 #include cppuhelper/interfacecontainer.h
-#include comphelper/configurationhelper.hxx
 #include comphelper/processfactory.hxx
 #include osl/diagnose.h
 #include osl/mutex.hxx
 #include osl/file.hxx
 #include tchar.h
+#ifdef RGB
+#undef RGB
+#endif
+#include officecfg/Office/Common.hxx
 
 #ifdef _MSC_VER
 #pragma warning (push, 1)
@@ -215,18 +218,15 @@ void SAL_CALL VistaFilePicker::setDisplayDirectory(const 
OUString sDirectory)
 throw (css::lang::IllegalArgumentException,
css::uno::RuntimeException )
 {
-const OUString aPackage(org.openoffice.Office.Common/);
-const OUString aRelPath(Path/Info);
-const OUString aKey(WorkPathChanged);
-
-css::uno::Any aValue = ::comphelper::ConfigurationHelper::readDirectKey(
-comphelper::getComponentContext(m_xSMGR), aPackage, aRelPath, aKey, 
::comphelper::ConfigurationHelper::E_READONLY);
+bool bChanged = 
officecfg::Office::Common::Path::Info::WorkPathChanged::get();
 
-bool bChanged(false);
-if (( aValue = bChanged )  bChanged )
+if (bChanged )
 {
-::comphelper::ConfigurationHelper::writeDirectKey(
-comphelper::getComponentContext(m_xSMGR), aPackage, aRelPath, 
aKey, css::uno::makeAny(false), ::comphelper::ConfigurationHelper::E_STANDARD);
+boost::shared_ptr comphelper::ConfigurationChanges  batch(
+comphelper::ConfigurationChanges::create());
+officecfg::Office::Common::Path::Info::WorkPathChanged::set(
+false, batch);
+batch-commit();
 }
 
 RequestRef rRequest(new Request());
diff --git a/writerfilter/Library_writerfilter.mk 
b/writerfilter/Library_writerfilter.mk
index aaa2969..0f3bdb1 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -10,7 +10,7 @@
 $(eval $(call gb_Library_Library,writerfilter))
 
 $(eval $(call gb_Library_use_custom_headers,writerfilter,\
-officecfg/registry \
+   officecfg/registry \
oox/generated \
writerfilter/source \
 ))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits