[Libreoffice-commits] core.git: sw/source

2019-08-17 Thread Mike Kaganski (via logerrit)
 sw/source/uibase/utlui/uitool.cxx |   36 ++--
 1 file changed, 6 insertions(+), 30 deletions(-)

New commits:
commit e0826f8e18b5ad8f8743a4aa2fb78bffda2524f8
Author: Mike Kaganski 
AuthorDate: Sat Aug 17 18:20:09 2019 +0300
Commit: Mike Kaganski 
CommitDate: Sun Aug 18 07:31:08 2019 +0200

Related: tdf#126787: remove some defensive programming parts

I assume that these shouldn't be possible. If I am wrong, this commit
is easy to revert.

Change-Id: Icc2acb4d1150b713233823fe313b4d5044d4b33e
Reviewed-on: https://gerrit.libreoffice.org/77641
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sw/source/uibase/utlui/uitool.cxx 
b/sw/source/uibase/utlui/uitool.cxx
index 0ed3fe8b24a5..034bb5eaf990 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -145,25 +145,18 @@ void ConvertAttrCharToGen(SfxItemSet& rSet)
 // Tell dialogs to use character-specific slots/whichIds
 // tdf#126684: We use RES_PARATR_GRABBAG, because RES_CHRATR_GRABBAG may 
be overwritten later in
 // SwDocStyleSheet::GetItemSet when applying attributes from char format
-std::unique_ptr pGrabBag;
-const SfxPoolItem *pTmpItem;
-if (SfxItemState::SET == rSet.GetItemState(RES_PARATR_GRABBAG, false, 
&pTmpItem))
-{
-SAL_WARN("sw.ui", "Unexpected: non-empty paragraph grab bag in 
character item set!");
-pGrabBag.reset(static_cast(pTmpItem->Clone()));
-}
-else
-pGrabBag.reset(new SfxGrabBagItem(RES_PARATR_GRABBAG));
-pGrabBag->GetGrabBag()["DialogUseCharAttr"] <<= true;
+assert(SfxItemState::SET != rSet.GetItemState(RES_PARATR_GRABBAG, false));
+SfxGrabBagItem aGrabBag(RES_PARATR_GRABBAG);
+aGrabBag.GetGrabBag()["DialogUseCharAttr"] <<= true;
 // Store initial ranges to allow restoring later
 const sal_uInt16* pRanges = rSet.GetRanges();
 const sal_uInt16* pEnd = pRanges;
 while (*pEnd)
 ++pEnd;
 const uno::Sequence aOrigRanges(pRanges, pEnd - pRanges + 1);
-pGrabBag->GetGrabBag()["OrigItemSetRanges"] <<= aOrigRanges;
+aGrabBag.GetGrabBag()["OrigItemSetRanges"] <<= aOrigRanges;
 rSet.MergeRange(RES_PARATR_GRABBAG, RES_PARATR_GRABBAG);
-rSet.Put(std::move(pGrabBag));
+rSet.Put(aGrabBag);
 }
 
 void ConvertAttrGenToChar(SfxItemSet& rSet, const SfxItemSet& rOrigSet)
@@ -204,24 +197,7 @@ void ConvertAttrGenToChar(SfxItemSet& rSet, const 
SfxItemSet& rOrigSet)
 rSet.SetRanges(aOrigRanges.getConstArray());
 }
 }
-if (SfxItemState::SET == rSet.GetItemState(RES_PARATR_GRABBAG, false, 
&pTmpItem))
-{
-// In fact, we should not reach here: it shouldn't have been there; 
and even if it was, it
-// should have been erased on the previous step when restoring 
original ranges
-SAL_WARN("sw.ui", "Unexpected: paragraph grab bag in character item 
set!");
-SfxGrabBagItem aGrabBag(*static_cast(pTmpItem));
-std::map& rMap = aGrabBag.GetGrabBag();
-// Remove temporary GrabBag entries
-rMap.erase("DialogUseCharAttr");
-rMap.erase("OrigItemSetRanges");
-if (rMap.empty())
-rSet.ClearItem(RES_PARATR_GRABBAG);
-else
-{
-SAL_WARN("sw.ui", "Unexpected: non-empty paragraph grab bag in 
character item set!");
-rSet.Put(aGrabBag);
-}
-}
+assert(SfxItemState::SET != rSet.GetItemState(RES_PARATR_GRABBAG, false));
 }
 
 void ApplyCharBackground(const Color& rBackgroundColor, SwWrtShell& rShell)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'private/EL-SHREIF/ui_logger' - uitest/ui_logger_dsl

2019-08-17 Thread Ahmed ElShreif (via logerrit)
 uitest/ui_logger_dsl/dsl_core.py |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 671858c12e2eee7deacb2b7503ee7400e0f0bf5f
Author: Ahmed ElShreif 
AuthorDate: Sat Aug 17 21:37:21 2019 -0500
Commit: Ahmed ElShreif 
CommitDate: Sat Aug 17 21:37:21 2019 -0500

Fix some Logger issues:

add the SideBar implementation

Change-Id: I7de9bd97e868624476b5c39a5e37afc945206e4e

diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py
index 088fcf4a0d64..b77a3449aa6e 100644
--- a/uitest/ui_logger_dsl/dsl_core.py
+++ b/uitest/ui_logger_dsl/dsl_core.py
@@ -97,6 +97,7 @@ class ul_Compiler:
 'math_Type_command':self.handle_math_Type_command,
 'setZoom_command':self.handle_setZoom_command,
 'draw_Type_command':self.handle_draw_Type_command,
+'SideBar':self.handle_SideBar,
 
 'writer_Copy_Text':self.do_nothing,
 'writer_Cut_Text':self.do_nothing,
@@ -188,6 +189,15 @@ class ul_Compiler:
 self.current_app=app[StarterCommand.program_name]
 self.prev_command=StarterCommand
 
+def handle_SideBar(self , SideBar):
+
+line="self.xUITest.executeCommand(\".uno:Sidebar\")\n"
+self.variables.append(line)
+
+
self.write_line_with_one_parameters("MainWindow","SIDEBAR","PANEL",SideBar.name)
+
+self.prev_command=SideBar
+
 def handle_Dialog(self, DialogCommand):
 
 if (DialogCommand.__class__.__name__ == "OpenModalDialog"):
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

CppCheck Report Update

2019-08-17 Thread cppcheck.libreoff...@gmail.com

A new cppcheck report is available at : 
http://dev-builds.libreoffice.org/cppcheck_reports/master/


Note:
The script generating this report was run at :
2019-18-08 03:43:18 with user buildslave at host vm140 as 
/home/buildslave/source/dev-tools/cppcheck/cppcheck-report.sh -s 
/home/buildslave/source/libo-core -c /home/buildslave/source/cppcheck -w 
/home/buildslave/tmp/www

It can be found and improved here:

https://gerrit.libreoffice.org/plugins/gitiles/dev-tools/+/master/cppcheck/cppcheck-report.sh


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Libreoffice-commits] core.git: 2 commits - scaddins/source scripting/source sfx2/source stoc/source stoc/test

2019-08-17 Thread Julien Nabet (via logerrit)
 scaddins/source/analysis/analysis.cxx |6 +-
 scaddins/source/datefunc/datefunc.cxx |6 +-
 scaddins/source/pricing/pricing.cxx   |6 +-
 scripting/source/dlgprov/dlgprov.cxx  |8 +++-
 scripting/source/provider/BrowseNodeFactoryImpl.cxx   |5 +
 scripting/source/provider/MasterScriptProvider.cxx|   13 -
 scripting/source/provider/MasterScriptProviderFactory.cxx |8 ++--
 scripting/source/vbaevents/eventhelper.cxx|6 ++
 sfx2/source/appl/appdispatchprovider.cxx  |5 +
 sfx2/source/appl/xpackcreator.cxx |5 +
 sfx2/source/dialog/backingcomp.cxx|5 +
 sfx2/source/doc/ownsubfilterservice.cxx   |5 +
 sfx2/source/view/frmload.cxx  |5 +
 stoc/source/javaloader/javaloader.cxx |5 +
 stoc/source/proxy_factory/proxyfac.cxx|3 +--
 stoc/source/servicemanager/servicemanager.cxx |   10 ++
 stoc/test/testsmgr_cpnt.cxx   |5 +
 17 files changed, 25 insertions(+), 81 deletions(-)

New commits:
commit c5be21da5072a78525ee07bb16dfcf391b8dbf32
Author: Julien Nabet 
AuthorDate: Sat Aug 17 21:02:20 2019 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 17 22:16:38 2019 +0200

tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor

in scaddins, scripting

Change-Id: I92e6380f535aec12c1f1c5c51d8b544c8a7d9611
Reviewed-on: https://gerrit.libreoffice.org/77650
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/scaddins/source/analysis/analysis.cxx 
b/scaddins/source/analysis/analysis.cxx
index f9a398a8abb7..9e7cf05aa91c 100644
--- a/scaddins/source/analysis/analysis.cxx
+++ b/scaddins/source/analysis/analysis.cxx
@@ -148,11 +148,7 @@ OUString AnalysisAddIn::getImplementationName_Static()
 
 uno::Sequence< OUString > AnalysisAddIn::getSupportedServiceNames_Static()
 {
-uno::Sequence< OUString >   aRet(2);
-OUString* pArray = aRet.getArray();
-pArray[0] = ADDIN_SERVICE;
-pArray[1] = MY_SERVICE;
-return aRet;
+return { ADDIN_SERVICE, MY_SERVICE };
 }
 
 uno::Reference< uno::XInterface > AnalysisAddIn_CreateInstance(
diff --git a/scaddins/source/datefunc/datefunc.cxx 
b/scaddins/source/datefunc/datefunc.cxx
index 32c785643470..8f3832869266 100644
--- a/scaddins/source/datefunc/datefunc.cxx
+++ b/scaddins/source/datefunc/datefunc.cxx
@@ -177,11 +177,7 @@ OUString ScaDateAddIn::getImplementationName_Static()
 
 uno::Sequence< OUString > ScaDateAddIn::getSupportedServiceNames_Static()
 {
-uno::Sequence< OUString > aRet( 2 );
-OUString* pArray = aRet.getArray();
-pArray[0] = ADDIN_SERVICE;
-pArray[1] = MY_SERVICE;
-return aRet;
+return { ADDIN_SERVICE, MY_SERVICE };
 }
 
 // XServiceName
diff --git a/scaddins/source/pricing/pricing.cxx 
b/scaddins/source/pricing/pricing.cxx
index 6c3a6449b0d1..1d0fb69a1011 100644
--- a/scaddins/source/pricing/pricing.cxx
+++ b/scaddins/source/pricing/pricing.cxx
@@ -177,11 +177,7 @@ OUString ScaPricingAddIn::getImplementationName_Static()
 
 uno::Sequence< OUString > ScaPricingAddIn::getSupportedServiceNames_Static()
 {
-uno::Sequence< OUString > aRet( 2 );
-OUString* pArray = aRet.getArray();
-pArray[0] = ADDIN_SERVICE;
-pArray[1] = MY_SERVICE;
-return aRet;
+return { ADDIN_SERVICE, MY_SERVICE };
 }
 
 // XServiceName
diff --git a/scripting/source/dlgprov/dlgprov.cxx 
b/scripting/source/dlgprov/dlgprov.cxx
index 59bfbdfe041f..ef5673bafbfd 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -166,11 +166,9 @@ namespace dlgprov
 
 static Sequence< OUString > getSupportedServiceNames_DialogProviderImpl()
 {
-Sequence< OUString > aNames(3);
-aNames[0] = "com.sun.star.awt.DialogProvider";
-aNames[1] = "com.sun.star.awt.DialogProvider2";
-aNames[2] = "com.sun.star.awt.ContainerWindowProvider";
-return aNames;
+return { "com.sun.star.awt.DialogProvider",
+ "com.sun.star.awt.DialogProvider2",
+ "com.sun.star.awt.ContainerWindowProvider" };
 }
 
 
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx 
b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
index e89452c3c971..92ce1be6c273 100644
--- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx
+++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx
@@ -623,10 +623,7 @@ BrowseNodeFactoryImpl::getOrganizerHierarchy()
 Sequence< OUString >
 bnf_getSupportedServiceNames( )
 {
-OUString str_name(
-"com.sun.star.script.browse.BrowseNodeFactory");
-
-return Sequence< OUString >( &str_name, 1 );
+return { "com.sun.star.script.browse.BrowseNodeFac

[Libreoffice-commits] core.git: svx/source

2019-08-17 Thread Julien Nabet (via logerrit)
 svx/source/accessibility/GraphCtlAccessibleContext.cxx |   
10 +---
 svx/source/fmcomp/fmgridif.cxx |   
 5 --
 svx/source/form/legacyformcontroller.cxx   |   
 5 --
 svx/source/table/tabledesign.cxx   |   
 8 ---
 svx/source/tbxctrls/tbunosearchcontrollers.cxx |   
 5 --
 svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.cxx |   
 3 -
 svx/source/unodraw/XPropertyTable.cxx  |   
24 ++
 svx/source/unodraw/unomod.cxx  |   
 8 ---
 svx/source/unodraw/unoshcol.cxx|   
 5 --
 svx/source/xml/xmlgrhlp.cxx|   
 8 +--
 10 files changed, 21 insertions(+), 60 deletions(-)

New commits:
commit 4073994154fbcb3b3ae7ff396fee916a994265c7
Author: Julien Nabet 
AuthorDate: Sat Aug 17 20:53:12 2019 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 17 22:16:51 2019 +0200

tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor

in svx

Change-Id: I70cba5dbfed9b2bbfe82d89c9dc6a5875c953bd3
Reviewed-on: https://gerrit.libreoffice.org/77649
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx 
b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index cd90f449c9bb..f37c14b873a1 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -501,13 +501,9 @@ sal_Bool SAL_CALL 
SvxGraphCtrlAccessibleContext::supportsService( const OUString
 
 Sequence< OUString > SAL_CALL 
SvxGraphCtrlAccessibleContext::getSupportedServiceNames()
 {
-Sequence< OUString > aSNs( 3 );
-
-aSNs[0] = "com.sun.star.accessibility.Accessible";
-aSNs[1] = "com.sun.star.accessibility.AccessibleContext";
-aSNs[2] = "com.sun.star.drawing.AccessibleGraphControl";
-
-return aSNs;
+return { "com.sun.star.accessibility.Accessible",
+ "com.sun.star.accessibility.AccessibleContext",
+ "com.sun.star.drawing.AccessibleGraphControl" };
 }
 
 // XTypeProvider
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index fb89600530f8..e5c5b4e0ae4d 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -381,10 +381,7 @@ OUString SAL_CALL FmXGridControl::getImplementationName()
 
 css::uno::Sequence SAL_CALL 
FmXGridControl::getSupportedServiceNames()
 {
-Sequence< OUString > aServiceNames(2);
-aServiceNames[0] = FM_SUN_CONTROL_GRIDCONTROL;
-aServiceNames[1] = "com.sun.star.awt.UnoControl";
-return aServiceNames;
+return { FM_SUN_CONTROL_GRIDCONTROL, "com.sun.star.awt.UnoControl" };
 }
 
 
diff --git a/svx/source/form/legacyformcontroller.cxx 
b/svx/source/form/legacyformcontroller.cxx
index a310423da8d0..9e14d3758cd1 100644
--- a/svx/source/form/legacyformcontroller.cxx
+++ b/svx/source/form/legacyformcontroller.cxx
@@ -185,10 +185,7 @@ namespace svxform
 
 Sequence< OUString > SAL_CALL 
LegacyFormController::getSupportedServiceNames(  )
 {
-Sequence< OUString > aServices(2);
-aServices.getArray()[0] = "com.sun.star.form.FormController";
-aServices.getArray()[1] = "com.sun.star.awt.control.TabController";
-return aServices;
+return { "com.sun.star.form.FormController", 
"com.sun.star.awt.control.TabController" };
 }
 
 }
diff --git a/svx/source/table/tabledesign.cxx b/svx/source/table/tabledesign.cxx
index a27a8d810fc0..0a4f81417f63 100644
--- a/svx/source/table/tabledesign.cxx
+++ b/svx/source/table/tabledesign.cxx
@@ -214,9 +214,7 @@ sal_Bool SAL_CALL TableDesignStyle::supportsService( const 
OUString& ServiceName
 
 Sequence< OUString > SAL_CALL TableDesignStyle::getSupportedServiceNames()
 {
-OUString aServiceName("com.sun.star.style.Style");
-Sequence< OUString > aSeq( &aServiceName, 1 );
-return aSeq;
+return { "com.sun.star.style.Style" };
 }
 
 // XStyle
@@ -464,9 +462,7 @@ sal_Bool SAL_CALL TableDesignFamily::supportsService( const 
OUString& ServiceNam
 
 Sequence< OUString > SAL_CALL TableDesignFamily::getSupportedServiceNames()
 {
-OUString aServiceName("com.sun.star.style.StyleFamily");
-Sequence< OUString > aSeq( &aServiceName, 1 );
-return aSeq;
+return { "com.sun.star.style.StyleFamily" };
 }
 
 // XNamed
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx 
b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 1beda67e61d6..9499da1a99fa 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -1372,10 +1372,7 @@ sal_Bool SAL_CALL FindbarDispatcher::supportsService( 
const OUString& ServiceNam
 
 css::uno::Sequence< OUString > SAL_CALL 
FindbarDisp

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - 2 commits - download.lst external/libabw external/libvisio solenv/flatpak-manifest.in

2019-08-17 Thread David Tardon (via logerrit)
 download.lst   |8 ++--
 external/libabw/UnpackedTarball_libabw.mk  |4 --
 external/libabw/libabw-msvc.patch.1|   46 -
 external/libvisio/0001-fix-debug-build.patch.1 |   40 -
 external/libvisio/UnpackedTarball_libvisio.mk  |1 
 external/libvisio/ubsan.patch  |4 +-
 solenv/flatpak-manifest.in |   12 +++---
 7 files changed, 12 insertions(+), 103 deletions(-)

New commits:
commit f8bc846025bfafc543a4c25bdfa78952efdbb0e6
Author: David Tardon 
AuthorDate: Sat Aug 17 16:46:47 2019 +0200
Commit: Caolán McNamara 
CommitDate: Sat Aug 17 21:45:23 2019 +0200

upload libabw 0.1.3

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

diff --git a/download.lst b/download.lst
index 4d6b8520f566..2b4a0b1b4688 100644
--- a/download.lst
+++ b/download.lst
@@ -1,5 +1,5 @@
-export ABW_SHA256SUM := 
0b72944d5af81dda0a5c5803ee84cbac4b81441a4d767aa57029adc6744c2485
-export ABW_TARBALL := libabw-0.1.2.tar.xz
+export ABW_SHA256SUM := 
e763a9dc21c3d2667402d66e202e3f8ef4db51b34b79ef41f56cacb86dcd6eed
+export ABW_TARBALL := libabw-0.1.3.tar.xz
 export APACHE_COMMONS_LOGGING_SHA256SUM := 
49665da5a60d033e6dff40fe0a7f9173e886ae859ce6096c1afe34c48b677c81
 export APACHE_COMMONS_LOGGING_TARBALL := commons-logging-1.2-src.tar.gz
 export APR_SHA256SUM := 
1af06e1720a58851d90694a984af18355b65bb0d047be03ec7d659c746d6dbdb
diff --git a/external/libabw/UnpackedTarball_libabw.mk 
b/external/libabw/UnpackedTarball_libabw.mk
index 212abfbc4674..bb7e1fb4ae8c 100644
--- a/external/libabw/UnpackedTarball_libabw.mk
+++ b/external/libabw/UnpackedTarball_libabw.mk
@@ -15,10 +15,6 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libabw,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libabw))
 
-$(eval $(call gb_UnpackedTarball_add_patches,libabw, \
-external/libabw/libabw-msvc.patch.1 \
-))
-
 ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libabw, \
 external/libabw/ubsan-visibility.patch \
diff --git a/external/libabw/libabw-msvc.patch.1 
b/external/libabw/libabw-msvc.patch.1
deleted file mode 100644
index d14b122f9575..
--- a/external/libabw/libabw-msvc.patch.1
+++ /dev/null
@@ -1,46 +0,0 @@
-From 49f6461d4751d3b16e32ab8f9c93a3856b33be49 Mon Sep 17 00:00:00 2001
-From: Miklos Vajna 
-Date: Wed, 2 Aug 2017 14:53:36 +0200
-Subject: [PATCH] m4: MSVC defines __cplusplus as 199711L still
-
-See e.g.
-,
-on MSVC we can't depend on the value of __cplusplus, since that one is a
-too low value, even if everything else works fine.

- m4/ax_cxx_compile_stdcxx.m4 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff -Naur a/configure b/configure
 a/configure2017-08-02 14:50:09.0 +0200
-+++ b/configure2017-08-02 14:50:57.0 +0200
-@@ -16001,7 +16001,7 @@
- 
- #error "This is not a C++ compiler"
- 
--#elif __cplusplus < 201103L
-+#elif __cplusplus < 201103L && !(defined _MSC_VER)
- 
- #error "This is not a C++11 compiler"
- 
-@@ -16314,7 +16314,7 @@
- 
- #error "This is not a C++ compiler"
- 
--#elif __cplusplus < 201103L
-+#elif __cplusplus < 201103L && !(defined _MSC_VER)
- 
- #error "This is not a C++11 compiler"
- 
-@@ -16636,7 +16636,7 @@
- 
- #error "This is not a C++ compiler"
- 
--#elif __cplusplus < 201103L
-+#elif __cplusplus < 201103L && !(defined _MSC_VER)
- 
- #error "This is not a C++11 compiler"
- 
--- 
-2.12.3
-
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 7bb0e47db52e..e8849d22807c 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -203,10 +203,10 @@
 "dest-filename": 
"external/tarballs/libgpg-error-1.27.tar.bz2"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/libabw-0.1.2.tar.xz";,
-"sha256": 
"0b72944d5af81dda0a5c5803ee84cbac4b81441a4d767aa57029adc6744c2485",
+"url": 
"https://dev-www.libreoffice.org/src/libabw-0.1.3.tar.xz";,
+"sha256": 
"e763a9dc21c3d2667402d66e202e3f8ef4db51b34b79ef41f56cacb86dcd6eed",
 "type": "file",
-"dest-filename": "external/tarballs/libabw-0.1.2.tar.xz"
+"dest-filename": "external/tarballs/libabw-0.1.3.tar.xz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/libcdr-0.1.5.tar.xz";,
commit 26e318b52e60a704dc8b0ad0a3d8081dfb075c30
Author: David Tardon 
AuthorDate: Sat Aug 17 17:06:07 2019 +0200
Commit: Caolán McNamara 
CommitDate: Sat Aug 17 21:45:12 2019 +0200

upload 

[Libreoffice-commits] core.git: compilerplugins/clang dbaccess/source include/oox include/sfx2 include/svtools include/svx include/vcl sd/inc sd/source svtools/source svx/source sw/source vcl/source

2019-08-17 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/unusedmethods.results|  260 -
 compilerplugins/clang/unusedmethods.unused-returns.results |   58 +-
 dbaccess/source/ui/dlg/adminpages.hxx  |   22 -
 include/oox/ole/axcontrol.hxx  |2 
 include/sfx2/sidebar/Deck.hxx  |1 
 include/svtools/simptabl.hxx   |4 
 include/svx/colorbox.hxx   |4 
 include/svx/fntctrl.hxx|8 
 include/svx/txencbox.hxx   |5 
 include/vcl/button.hxx |4 
 include/vcl/svtabbx.hxx|2 
 sd/inc/sdabstdlg.hxx   |1 
 sd/source/ui/dlg/sddlgfact.cxx |5 
 sd/source/ui/dlg/sddlgfact.hxx |1 
 svtools/source/contnr/simptabl.cxx |   15 
 svx/source/dialog/fntctrl.cxx  |   38 -
 svx/source/dialog/txencbox.cxx |8 
 sw/source/uibase/inc/numfmtlb.hxx  |   11 
 vcl/source/treelist/svtabbx.cxx|   21 -
 19 files changed, 196 insertions(+), 274 deletions(-)

New commits:
commit 7990680e92e4fba376ef4f9346d1bc53661bde30
Author: Noel Grandin 
AuthorDate: Sat Aug 17 09:55:42 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat Aug 17 20:42:31 2019 +0200

loplugin:unusedmethods

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

diff --git a/compilerplugins/clang/unusedmethods.results 
b/compilerplugins/clang/unusedmethods.results
index b694a86f18fb..1b40d0def1e2 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -38,9 +38,9 @@ connectivity/source/drivers/firebird/Util.hxx:78
 const class rtl::OUString & 
connectivity::firebird::ColumnTypeInfo::getCharacterSet() const
 connectivity/source/drivers/mork/mork_helper.cxx:37
 int main(int,char **)
-connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx:95
-type-parameter-?-? 
connectivity::mysqlc::OPreparedResultSet::safelyRetrieveValue(const int)
 connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx:96
+type-parameter-?-? 
connectivity::mysqlc::OPreparedResultSet::safelyRetrieveValue(const int)
+connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx:97
 type-parameter-?-? 
connectivity::mysqlc::OPreparedResultSet::retrieveValue(const int)
 connectivity/source/inc/dbase/dindexnode.hxx:70
 _Bool connectivity::dbase::ONDXKey::operator<(const class 
connectivity::dbase::ONDXKey &) const
@@ -64,46 +64,54 @@ connectivity/source/inc/OTypeInfo.hxx:46
 _Bool connectivity::OTypeInfo::operator==(const struct 
connectivity::OTypeInfo &) const
 connectivity/source/inc/OTypeInfo.hxx:47
 _Bool connectivity::OTypeInfo::operator!=(const struct 
connectivity::OTypeInfo &) const
-cui/source/dialogs/SpellAttrib.hxx:75
+cui/source/dialogs/SpellAttrib.hxx:73
 _Bool svx::SpellErrorDescription::operator==(const struct 
svx::SpellErrorDescription &) const
-cui/source/inc/cfgutil.hxx:143
+cui/source/inc/cfgutil.hxx:142
 _Bool CuiConfigFunctionListBox::get_iter_first(class weld::TreeIter &) 
const
-cui/source/inc/cfgutil.hxx:145
+cui/source/inc/cfgutil.hxx:144
 _Bool CuiConfigFunctionListBox::iter_next(class weld::TreeIter &) const
-cui/source/inc/cfgutil.hxx:148
+cui/source/inc/cfgutil.hxx:147
 class rtl::OUString CuiConfigFunctionListBox::get_text(const class 
weld::TreeIter &) const
-cui/source/inc/cfgutil.hxx:151
+cui/source/inc/cfgutil.hxx:150
 class rtl::OUString CuiConfigFunctionListBox::get_id(int) const
-cui/source/inc/cfgutil.hxx:165
+cui/source/inc/cfgutil.hxx:164
 int CuiConfigFunctionListBox::get_selected_index() const
-cui/source/inc/CustomNotebookbarGenerator.hxx:30
+cui/source/inc/CustomNotebookbarGenerator.hxx:31
  CustomNotebookbarGenerator::CustomNotebookbarGenerator()
-cui/source/inc/hangulhanjadlg.hxx:245
+cui/source/inc/hangulhanjadlg.hxx:244
 class rtl::OUString svx::SuggestionEdit::get_text() const
-cui/source/inc/SvxNotebookbarConfigPage.hxx:51
+cui/source/inc/SvxNotebookbarConfigPage.hxx:40
 void SvxNotebookbarConfigPage::SetElement()
 dbaccess/source/filter/hsqldb/fbalterparser.hxx:20
 void dbahsql::FbAlterStmtParser::ensureProperTableLengths() const
 dbaccess/source/filter/hsqldb/parseschema.hxx:82
 const class std::__debug::map >, struct std::less, class 
std::allocator > > > > & dbahsql::SchemaParser::getPrimaryKeys() const
+dbaccess/source/ui/dlg/adminpages.hxx:48
+ dbaui::OSaveValueWrapper::OSaveValueWrapper(type-parameter-?-? *)
+dbaccess/source/ui/dlg/adminpages.hxx:103
+ dbau

[Libreoffice-commits] core.git: hwpfilter/source include/test io/test linguistic/source oox/source pyuno/source reportdesign/source

2019-08-17 Thread Julien Nabet (via logerrit)
 hwpfilter/source/hwpreader.hxx  |9 ++---
 include/test/testinteractionhandler.hxx |8 +++-
 io/test/stm/pumptest.cxx|4 +---
 linguistic/source/dlistimp.cxx  |3 +--
 linguistic/source/gciterator.cxx|3 +--
 linguistic/source/lngopt.cxx|3 +--
 linguistic/source/lngsvcmgr.cxx |3 +--
 oox/source/core/filterbase.cxx  |5 +
 pyuno/source/loader/pyuno_loader.cxx|3 +--
 reportdesign/source/core/api/FormattedField.cxx |6 +-
 reportdesign/source/core/api/Shape.cxx  |4 +---
 11 files changed, 14 insertions(+), 37 deletions(-)

New commits:
commit 7d3041beb90de4f3495addf139463860049740fb
Author: Julien Nabet 
AuthorDate: Sat Aug 17 18:52:37 2019 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 17 20:10:43 2019 +0200

tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor

in hwpfilter, include/test, io, linguistic, oox, pyuno, reportdesign

Change-Id: I5c265c4fde85dd6d7faab8ae82809c4a0e6dd69b
Reviewed-on: https://gerrit.libreoffice.org/77646
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/hwpfilter/source/hwpreader.hxx b/hwpfilter/source/hwpreader.hxx
index 6d6bf2c27204..16459320a4d1 100644
--- a/hwpfilter/source/hwpreader.hxx
+++ b/hwpfilter/source/hwpreader.hxx
@@ -194,8 +194,7 @@ Reference< XInterface > HwpImportFilter_CreateInstance(
 
 Sequence< OUString > HwpImportFilter::getSupportedServiceNames_Static() throw 
()
 {
-Sequence< OUString > aRet { 
HwpImportFilter::getImplementationName_Static() };
-return aRet;
+return { HwpImportFilter::getImplementationName_Static() };
 }
 
 HwpImportFilter::HwpImportFilter(const Reference< XMultiServiceFactory >& 
rFact)
@@ -284,11 +283,7 @@ OUString HwpImportFilter::detect( css::uno::Sequence< 
css::beans::PropertyValue
 
 Sequence< OUString> HwpImportFilter::getSupportedServiceNames()
 {
-Sequence < OUString > aRet(2);
-OUString* pArray = aRet.getArray();
-pArray[0] = SERVICE_NAME1;
-pArray[1] = SERVICE_NAME2;
-return aRet;
+return { SERVICE_NAME1, SERVICE_NAME2 };
 }
 
 extern "C"
diff --git a/include/test/testinteractionhandler.hxx 
b/include/test/testinteractionhandler.hxx
index 5e871c68af12..8d63b7ae9546 100644
--- a/include/test/testinteractionhandler.hxx
+++ b/include/test/testinteractionhandler.hxx
@@ -57,13 +57,11 @@ public:
 
 virtual css::uno::Sequence SAL_CALL getSupportedServiceNames() 
override
 {
-css::uno::Sequence aNames(3);
-aNames[0] = "com.sun.star.task.InteractionHandler";
+return { "com.sun.star.task.InteractionHandler",
 // added to indicate support for 
configuration.backend.MergeRecoveryRequest
-aNames[1] = "com.sun.star.configuration.backend.InteractionHandler";
-aNames[2] = "com.sun.star.uui.InteractionHandler";
+ "com.sun.star.configuration.backend.InteractionHandler",
 // for backwards compatibility
-return aNames;
+ "com.sun.star.uui.InteractionHandler" };
 }
 
 virtual void SAL_CALL initialize(css::uno::Sequence const & 
/*rArguments*/) override
diff --git a/io/test/stm/pumptest.cxx b/io/test/stm/pumptest.cxx
index d337bc21a81a..a2bdf4ff804f 100644
--- a/io/test/stm/pumptest.cxx
+++ b/io/test/stm/pumptest.cxx
@@ -414,9 +414,7 @@ Reference< XInterface > SAL_CALL OPumpTest_CreateInstance( 
const Reference< XMul
 
 Sequence OPumpTest_getSupportedServiceNames() throw()
 {
-OUString s = OPumpTest_getServiceName();
-Sequence< OUString > seq( &s , 1 );
-return seq;
+return { OPumpTest_getServiceName() };
 
 }
 OUString OPumpTest_getServiceName() throw()
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index e9b5da8d4e95..062e2ad0b017 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -694,8 +694,7 @@ uno::Sequence< OUString > SAL_CALL 
DicList::getSupportedServiceNames(  )
 
 uno::Sequence< OUString > DicList::getSupportedServiceNames_Static() throw()
 {
-uno::Sequence< OUString > aSNS { "com.sun.star.linguistic2.DictionaryList" 
};
-return aSNS;
+return { "com.sun.star.linguistic2.DictionaryList" };
 }
 
 void * DicList_getFactory( const sal_Char * pImplName,
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 247f430d9c06..0b284d660abc 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -1188,8 +1188,7 @@ static OUString 
GrammarCheckingIterator_getImplementationName() throw()
 
 static uno::Sequence< OUString > 
GrammarCheckingIterator_getSupportedServiceNames() throw()
 {
-uno::Sequence aSNS { 
"com.sun.star.linguistic2.ProofreadingIterator" };
-return aSNS;
+return { "com.sun.star.linguistic2.ProofreadingIterator" };
 }
 
 /// @throws uno::Exception
diff -

[Libreoffice-commits] core.git: connectivity/source

2019-08-17 Thread Julien Nabet (via logerrit)
 connectivity/source/drivers/ado/ADriver.cxx  |5 +
 connectivity/source/drivers/component/CResultSet.cxx |5 +
 connectivity/source/drivers/dbase/DResultSet.cxx |5 +
 connectivity/source/drivers/file/FDriver.cxx |5 +
 connectivity/source/drivers/firebird/Driver.cxx  |5 +
 connectivity/source/drivers/flat/EResultSet.cxx  |5 +
 connectivity/source/drivers/hsqldb/HDriver.cxx   |5 +
 connectivity/source/drivers/mysql_jdbc/YDriver.cxx   |5 +
 connectivity/source/drivers/mysqlc/mysqlc_connection.cxx |4 +---
 connectivity/source/drivers/mysqlc/mysqlc_driver.cxx |4 +---
 connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx |5 +
 connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx  |4 +---
 connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx  |5 +
 connectivity/source/drivers/mysqlc/mysqlc_statement.cxx  |4 +---
 connectivity/source/drivers/odbc/OResultSet.cxx  |5 +
 connectivity/source/sdbcx/VColumn.cxx|8 
+---
 connectivity/source/sdbcx/VIndex.cxx |8 
+---
 connectivity/source/sdbcx/VIndexColumn.cxx   |7 +--
 connectivity/source/sdbcx/VKey.cxx   |8 
+---
 connectivity/source/sdbcx/VKeyColumn.cxx |8 
+---
 connectivity/source/sdbcx/VTable.cxx |8 
+---
 21 files changed, 21 insertions(+), 97 deletions(-)

New commits:
commit e6196c6c9c85bdf446899a50da81adbfb7037d85
Author: Julien Nabet 
AuthorDate: Sat Aug 17 15:44:34 2019 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 17 18:43:28 2019 +0200

tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor

in connectivity

Change-Id: I00eeffd9a13cfad6bbf84ea2d4ab720eb8c45ed8
Reviewed-on: https://gerrit.libreoffice.org/77635
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/connectivity/source/drivers/ado/ADriver.cxx 
b/connectivity/source/drivers/ado/ADriver.cxx
index 69381285eb7d..d97d018bc202 100644
--- a/connectivity/source/drivers/ado/ADriver.cxx
+++ b/connectivity/source/drivers/ado/ADriver.cxx
@@ -85,10 +85,7 @@ OUString ODriver::getImplementationName_Static(  )
 
 Sequence< OUString > ODriver::getSupportedServiceNames_Static(  )
 {
-Sequence< OUString > aSNS( 2 );
-aSNS[0] = "com.sun.star.sdbc.Driver";
-aSNS[1] = "com.sun.star.sdbcx.Driver";
-return aSNS;
+return { "com.sun.star.sdbc.Driver", "com.sun.star.sdbcx.Driver" };
 }
 
 css::uno::Reference< css::uno::XInterface > 
connectivity::ado::ODriver_CreateInstance(const css::uno::Reference< 
css::lang::XMultiServiceFactory >& _rxFactory)
diff --git a/connectivity/source/drivers/component/CResultSet.cxx 
b/connectivity/source/drivers/component/CResultSet.cxx
index 79d97a62d29f..6c3e463d2012 100644
--- a/connectivity/source/drivers/component/CResultSet.cxx
+++ b/connectivity/source/drivers/component/CResultSet.cxx
@@ -51,10 +51,7 @@ OUString SAL_CALL 
OComponentResultSet::getImplementationName(  )
 
 Sequence< OUString > SAL_CALL OComponentResultSet::getSupportedServiceNames(  )
 {
-Sequence< OUString > aSupported(2);
-aSupported[0] = "com.sun.star.sdbc.ResultSet";
-aSupported[1] = "com.sun.star.sdbcx.ResultSet";
-return aSupported;
+return { "com.sun.star.sdbc.ResultSet", "com.sun.star.sdbcx.ResultSet" };
 }
 
 sal_Bool SAL_CALL OComponentResultSet::supportsService( const OUString& 
_rServiceName )
diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx 
b/connectivity/source/drivers/dbase/DResultSet.cxx
index 737a87bf559d..572eaa27d69c 100644
--- a/connectivity/source/drivers/dbase/DResultSet.cxx
+++ b/connectivity/source/drivers/dbase/DResultSet.cxx
@@ -54,10 +54,7 @@ OUString SAL_CALL ODbaseResultSet::getImplementationName(  )
 
 Sequence< OUString > SAL_CALL ODbaseResultSet::getSupportedServiceNames(  )
 {
-Sequence< OUString > aSupported(2);
-aSupported[0] = "com.sun.star.sdbc.ResultSet";
-aSupported[1] = "com.sun.star.sdbcx.ResultSet";
-return aSupported;
+return { "com.sun.star.sdbc.ResultSet", "com.sun.star.sdbcx.ResultSet" };
 }
 
 sal_Bool SAL_CALL ODbaseResultSet::supportsService( const OUString& 
_rServiceName )
diff --git a/connectivity/source/drivers/file/FDriver.cxx 
b/connectivity/source/drivers/file/FDriver.cxx
index 584a0a08b95f..25ccc578f959 100644
--- a/connectivity/source/drivers/file/FDriver.cxx
+++ b/connectivity/source/drivers/file/FDriver.cxx
@@ -67,10 +67,7 @@ OUString OFileDriver::getImplementationName_Static(  )
 
 Sequence< OUString > OFileDriver::getSupportedServiceNames_Static(  )
 {
-Sequence< OUString > aSNS( 2 );
-aSNS[0] = "com.sun.star.sd

[Libreoffice-commits] core.git: download.lst external/libvisio solenv/flatpak-manifest.in

2019-08-17 Thread David Tardon (via logerrit)
 download.lst   |4 +-
 external/libvisio/0001-fix-debug-build.patch.1 |   40 -
 external/libvisio/UnpackedTarball_libvisio.mk  |1 
 external/libvisio/ubsan.patch  |4 +-
 solenv/flatpak-manifest.in |6 +--
 5 files changed, 7 insertions(+), 48 deletions(-)

New commits:
commit d83472ab6fde650772307f7f93a0a4b96e7ea6a8
Author: David Tardon 
AuthorDate: Sat Aug 17 17:06:07 2019 +0200
Commit: David Tardon 
CommitDate: Sat Aug 17 18:36:51 2019 +0200

upload libvisio 0.1.7

Change-Id: I4eb115c7c085b325370e9cd8f80e1b03f16f5033
Reviewed-on: https://gerrit.libreoffice.org/77640
Tested-by: Jenkins
Reviewed-by: David Tardon 

diff --git a/download.lst b/download.lst
index 2491472e574a..4539a35a9b3c 100644
--- a/download.lst
+++ b/download.lst
@@ -238,8 +238,8 @@ export TWAIN_DSM_SHA256SUM := 
82c818be771f242388457aa8c807e4b52aa84dc22b21c6c561
 export TWAIN_DSM_TARBALL := twaindsm_2.4.1.orig.tar.gz
 export UCPP_SHA256SUM := 
983941d31ee8d366085cadf28db75eb1f5cb03ba1e5853b98f12f7f51c63b776
 export UCPP_TARBALL := 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
-export VISIO_SHA256SUM := 
fe1002d3671d53c09bc65e47ec948ec7b67e6fb112ed1cd10966e211a8bb50f9
-export VISIO_TARBALL := libvisio-0.1.6.tar.xz
+export VISIO_SHA256SUM := 
8faf8df870cb27b09a787a1959d6c646faa44d0d8ab151883df408b7166bea4c
+export VISIO_TARBALL := libvisio-0.1.7.tar.xz
 export WPD_SHA256SUM := 
2465b0b662fdc5d4e3bebcdc9a79027713fb629ca2bff04a3c9251fdec42dd09
 export WPD_VERSION_MICRO := 3
 export WPD_TARBALL := libwpd-0.10.$(WPD_VERSION_MICRO).tar.xz
diff --git a/external/libvisio/0001-fix-debug-build.patch.1 
b/external/libvisio/0001-fix-debug-build.patch.1
deleted file mode 100644
index 4146e6e8bfe7..
--- a/external/libvisio/0001-fix-debug-build.patch.1
+++ /dev/null
@@ -1,40 +0,0 @@
-From 15f3774513d0181ad90da382297c175cc3424462 Mon Sep 17 00:00:00 2001
-From: David Tardon 
-Date: Sun, 22 Oct 2017 21:24:43 +0200
-Subject: [PATCH] fix debug build
-
-Change-Id: I860b6034e5d833900652aec8c3647eeae185e538

- src/lib/VDXParser.cpp  | 2 +-
- src/lib/VSDXParser.cpp | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/lib/VDXParser.cpp b/src/lib/VDXParser.cpp
-index f2f3154..0f07efd 100644
 a/src/lib/VDXParser.cpp
-+++ b/src/lib/VDXParser.cpp
-@@ -916,7 +916,7 @@ xmlChar 
*libvisio::VDXParser::readStringData(xmlTextReaderPtr reader)
- ret = xmlTextReaderRead(reader);
- if (1 == ret && stringValue)
- {
--  VSD_DEBUG_MSG(("VDXParser::readStringData stringValue %s\n", (const 
char *)stringValue));
-+  VSD_DEBUG_MSG(("VDXParser::readStringData stringValue %s\n", (const 
char *)stringValue.get()));
-   return stringValue.release();
- }
-   }
-diff --git a/src/lib/VSDXParser.cpp b/src/lib/VSDXParser.cpp
-index 488be3a..efd46b9 100644
 a/src/lib/VSDXParser.cpp
-+++ b/src/lib/VSDXParser.cpp
-@@ -555,7 +555,7 @@ xmlChar 
*libvisio::VSDXParser::readStringData(xmlTextReaderPtr reader)
-   std::unique_ptr 
stringValue(xmlTextReaderGetAttribute(reader, BAD_CAST("V")), xmlFree);
-   if (stringValue)
-   {
--VSD_DEBUG_MSG(("VSDXParser::readStringData stringValue %s\n", (const char 
*)stringValue));
-+VSD_DEBUG_MSG(("VSDXParser::readStringData stringValue %s\n", (const char 
*)stringValue.get()));
- return stringValue.release();
-   }
-   return nullptr;
--- 
-2.14.1
-
diff --git a/external/libvisio/UnpackedTarball_libvisio.mk 
b/external/libvisio/UnpackedTarball_libvisio.mk
index 0ff189261f42..9462075ec293 100644
--- a/external/libvisio/UnpackedTarball_libvisio.mk
+++ b/external/libvisio/UnpackedTarball_libvisio.mk
@@ -17,7 +17,6 @@ $(eval $(call 
gb_UnpackedTarball_update_autoconf_configs,libvisio))
 
 $(eval $(call gb_UnpackedTarball_add_patches,libvisio, \
 external/libvisio/ubsan.patch \
-external/libvisio/0001-fix-debug-build.patch.1 \
 ))
 
 ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
diff --git a/external/libvisio/ubsan.patch b/external/libvisio/ubsan.patch
index 7bba63fda7a1..c9ffbd98f4b6 100644
--- a/external/libvisio/ubsan.patch
+++ b/external/libvisio/ubsan.patch
@@ -4,8 +4,8 @@
  }
  if (U_SUCCESS(status) && conv)
  {
--  const char *src = (const char *)&characters[0];
-+  const char *src = (const char *)characters.data();
+-  const auto *src = (const char *)&characters[0];
++  const auto *src = (const char *)characters.data();
const char *srcLimit = (const char *)src + characters.size();
while (src < srcLimit)
{
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index c4a36fc0d8dc..e8849d22807c 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -299,10 +299,10 @@
 "dest-filename": "external/tarballs/ltm-1.0.zip"
 },
 {
-"url": 
"https://dev-www.libreoffi

[Libreoffice-commits] core.git: download.lst external/libabw solenv/flatpak-manifest.in

2019-08-17 Thread David Tardon (via logerrit)
 download.lst  |4 +-
 external/libabw/UnpackedTarball_libabw.mk |4 --
 external/libabw/libabw-msvc.patch.1   |   46 --
 solenv/flatpak-manifest.in|6 +--
 4 files changed, 5 insertions(+), 55 deletions(-)

New commits:
commit 2a733f30cc994ead8cc3d1e64947bba6e8fe3924
Author: David Tardon 
AuthorDate: Sat Aug 17 16:46:47 2019 +0200
Commit: David Tardon 
CommitDate: Sat Aug 17 18:28:21 2019 +0200

upload libabw 0.1.3

Change-Id: Ibb45a473f49a9ba8f9cf53593dead375ac8a1951
Reviewed-on: https://gerrit.libreoffice.org/77639
Tested-by: Jenkins
Reviewed-by: David Tardon 

diff --git a/download.lst b/download.lst
index 046b440cd379..2491472e574a 100644
--- a/download.lst
+++ b/download.lst
@@ -1,5 +1,5 @@
-export ABW_SHA256SUM := 
0b72944d5af81dda0a5c5803ee84cbac4b81441a4d767aa57029adc6744c2485
-export ABW_TARBALL := libabw-0.1.2.tar.xz
+export ABW_SHA256SUM := 
e763a9dc21c3d2667402d66e202e3f8ef4db51b34b79ef41f56cacb86dcd6eed
+export ABW_TARBALL := libabw-0.1.3.tar.xz
 export APACHE_COMMONS_LOGGING_SHA256SUM := 
49665da5a60d033e6dff40fe0a7f9173e886ae859ce6096c1afe34c48b677c81
 export APACHE_COMMONS_LOGGING_TARBALL := commons-logging-1.2-src.tar.gz
 export APR_SHA256SUM := 
1af06e1720a58851d90694a984af18355b65bb0d047be03ec7d659c746d6dbdb
diff --git a/external/libabw/UnpackedTarball_libabw.mk 
b/external/libabw/UnpackedTarball_libabw.mk
index 212abfbc4674..bb7e1fb4ae8c 100644
--- a/external/libabw/UnpackedTarball_libabw.mk
+++ b/external/libabw/UnpackedTarball_libabw.mk
@@ -15,10 +15,6 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libabw,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libabw))
 
-$(eval $(call gb_UnpackedTarball_add_patches,libabw, \
-external/libabw/libabw-msvc.patch.1 \
-))
-
 ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libabw, \
 external/libabw/ubsan-visibility.patch \
diff --git a/external/libabw/libabw-msvc.patch.1 
b/external/libabw/libabw-msvc.patch.1
deleted file mode 100644
index d14b122f9575..
--- a/external/libabw/libabw-msvc.patch.1
+++ /dev/null
@@ -1,46 +0,0 @@
-From 49f6461d4751d3b16e32ab8f9c93a3856b33be49 Mon Sep 17 00:00:00 2001
-From: Miklos Vajna 
-Date: Wed, 2 Aug 2017 14:53:36 +0200
-Subject: [PATCH] m4: MSVC defines __cplusplus as 199711L still
-
-See e.g.
-,
-on MSVC we can't depend on the value of __cplusplus, since that one is a
-too low value, even if everything else works fine.

- m4/ax_cxx_compile_stdcxx.m4 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff -Naur a/configure b/configure
 a/configure2017-08-02 14:50:09.0 +0200
-+++ b/configure2017-08-02 14:50:57.0 +0200
-@@ -16001,7 +16001,7 @@
- 
- #error "This is not a C++ compiler"
- 
--#elif __cplusplus < 201103L
-+#elif __cplusplus < 201103L && !(defined _MSC_VER)
- 
- #error "This is not a C++11 compiler"
- 
-@@ -16314,7 +16314,7 @@
- 
- #error "This is not a C++ compiler"
- 
--#elif __cplusplus < 201103L
-+#elif __cplusplus < 201103L && !(defined _MSC_VER)
- 
- #error "This is not a C++11 compiler"
- 
-@@ -16636,7 +16636,7 @@
- 
- #error "This is not a C++ compiler"
- 
--#elif __cplusplus < 201103L
-+#elif __cplusplus < 201103L && !(defined _MSC_VER)
- 
- #error "This is not a C++11 compiler"
- 
--- 
-2.12.3
-
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index ba51f89fb7af..c4a36fc0d8dc 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -203,10 +203,10 @@
 "dest-filename": 
"external/tarballs/libgpg-error-1.27.tar.bz2"
 },
 {
-"url": 
"https://dev-www.libreoffice.org/src/libabw-0.1.2.tar.xz";,
-"sha256": 
"0b72944d5af81dda0a5c5803ee84cbac4b81441a4d767aa57029adc6744c2485",
+"url": 
"https://dev-www.libreoffice.org/src/libabw-0.1.3.tar.xz";,
+"sha256": 
"e763a9dc21c3d2667402d66e202e3f8ef4db51b34b79ef41f56cacb86dcd6eed",
 "type": "file",
-"dest-filename": "external/tarballs/libabw-0.1.2.tar.xz"
+"dest-filename": "external/tarballs/libabw-0.1.3.tar.xz"
 },
 {
 "url": 
"https://dev-www.libreoffice.org/src/libcdr-0.1.5.tar.xz";,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sfx2/inc sfx2/source

2019-08-17 Thread Muhammet Kara (via logerrit)
 sfx2/inc/SfxRedactionHelper.hxx|   12 
 sfx2/inc/autoredactdialog.hxx  |   86 +++--
 sfx2/source/doc/SfxRedactionHelper.cxx |   15 +
 sfx2/source/doc/autoredactdialog.cxx   |   60 +--
 sfx2/source/doc/objserv.cxx|   16 --
 5 files changed, 90 insertions(+), 99 deletions(-)

New commits:
commit c02978727b3827547dde9b4d7d5c1d08341f4034
Author: Muhammet Kara 
AuthorDate: Thu Aug 8 19:15:13 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Aug 17 18:08:28 2019 +0200

Make AutoRedactDialog buildable again

Change-Id: I3161df87dc35fb6677d9886f45b50ae98d6994a0
Reviewed-on: https://gerrit.libreoffice.org/77171
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/sfx2/inc/SfxRedactionHelper.hxx b/sfx2/inc/SfxRedactionHelper.hxx
index ae72c39f4886..61578438ae35 100644
--- a/sfx2/inc/SfxRedactionHelper.hxx
+++ b/sfx2/inc/SfxRedactionHelper.hxx
@@ -122,18 +122,6 @@ public:
   const RedactionTarget* pTarget);
 
 private:
-static constexpr OUStringLiteral m_aPredefinedTargets[6] = {
-"\\b(?:\\d[ -]*?){13,16}\\b", //Credit card numbers
-"\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}\\b", //Email addresses
-
"\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
-
"\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
-"\\b", //IP addresses
-"([12]\\d{3}[./-](0[1-9]|1[0-2])[./"
-
"-](0[1-9]|[12]\\d|3[01]))|((0[1-9]|[12]\\d|3[01])[./-](0[1-9]|1[0-2])[./"
-"-][12]\\d{3})", //Dates (numerical)
-"\\s*[a-zA-Z]{2}(?:\\s*\\d\\s*){6}[a-zA-Z]?\\s*", //National Insurance 
Number (UK)
-"([1-9])(?!\\1{2}-\\1{2}-\\1{4})[1-9]{2}-[1-9]{2}-[1-9]{4}" //Social 
Security Number (US)
-};
 };
 
 #endif // INCLUDED_CUI_SOURCE_INC_SFXREDACTIONHELPER_HXX
diff --git a/sfx2/inc/autoredactdialog.hxx b/sfx2/inc/autoredactdialog.hxx
index 92010071b185..7c9f35c11cf1 100644
--- a/sfx2/inc/autoredactdialog.hxx
+++ b/sfx2/inc/autoredactdialog.hxx
@@ -19,26 +19,7 @@
 #include 
 #include 
 
-namespace weld
-{
-class Button;
-}
-namespace weld
-{
-class ComboBox;
-}
-namespace weld
-{
-class Label;
-}
-namespace weld
-{
-class Window;
-}
-namespace weld
-{
-class TreeView;
-}
+#include 
 
 enum RedactionTargetType
 {
@@ -60,34 +41,23 @@ struct RedactionTarget
 };
 
 /// Used to display the targets list
-class TargetsTable
+/*class TargetsTable : public SvSimpleTable
 {
-std::unique_ptr m_xControl;
-int GetRowByTargetName(const OUString& sName);
+SvTreeListEntry* GetRowByTargetName(const OUString& sName);
 
 public:
-TargetsTable(std::unique_ptr xControl);
+TargetsTable(SvSimpleTableContainer& rParent);
 void InsertTarget(RedactionTarget* pTarget);
 void SelectByName(const OUString& sName);
 RedactionTarget* GetTargetByName(const OUString& sName);
 OUString GetNameProposal();
 
-void unselect_all() { m_xControl->unselect_all(); }
-bool has_focus() const { return m_xControl->has_focus(); }
-int n_children() const { return m_xControl->n_children(); }
-int get_selected_index() const { return m_xControl->get_selected_index(); }
-std::vector get_selected_rows() const { return 
m_xControl->get_selected_rows(); }
-void clear() { m_xControl->clear(); }
-void remove(int nRow) { m_xControl->remove(nRow); }
-void select(int nRow) { m_xControl->select(nRow); }
-OUString get_id(int nRow) const { return m_xControl->get_id(nRow); }
-
 // Sync data on the targets box with the data on the target
-void setRowData(const int& nRowIndex, const RedactionTarget* pTarget);
+void setRowData(SvTreeListEntry* pRow, const RedactionTarget* pTarget);
 
 //void connect_changed(const Link& rLink) { 
m_xControl->connect_changed(rLink); }
 //void connect_row_activated(const Link& rLink) { 
m_xControl->connect_row_activated(rLink); }
-};
+};*/
 
 namespace sfx2
 {
@@ -100,7 +70,7 @@ enum class StartFileDialogType
 SaveAs
 };
 
-class SFX2_DLLPUBLIC SfxAutoRedactDialog : public SfxDialogController
+class SFX2_DLLPUBLIC SfxAutoRedactDialog : public SfxModalDialog
 {
 SfxObjectShellLock m_xDocShell;
 std::vector> m_aTableTargets;
@@ -108,19 +78,20 @@ class SFX2_DLLPUBLIC SfxAutoRedactDialog : public 
SfxDialogController
 bool m_bIsValidState;
 bool m_bTargetsCopied;
 
-std::unique_ptr m_xRedactionTargetsLabel;
-std::unique_ptr m_xTargetsBox;
-std::unique_ptr m_xLoadBtn;
-std::unique_ptr m_xSaveBtn;
-std::unique_ptr m_xAddBtn;
-std::unique_ptr m_xEditBtn;
-std::unique_ptr m_xDeleteBtn;
-
-DECL_LINK(Load, weld::Button&, void);
-DECL_LINK(Save, weld::Button&, void);
-DECL_LINK(AddHdl, weld::Button&, void);
-DECL_LINK(EditHdl, weld::Button&, void);
-DECL_LINK(DeleteHdl, weld::Button&, void);
+//VclPtr  m_pTargetsContai

[Libreoffice-commits] core.git: sc/source sd/inc

2019-08-17 Thread Andrea Gelmini (via logerrit)
 sc/source/ui/vba/vbapane.cxx |4 ++--
 sd/inc/drawdoc.hxx   |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d68682625ad0bd4ed121f01721eb0b962fefd1dc
Author: Andrea Gelmini 
AuthorDate: Sat Aug 17 12:52:01 2019 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 17 17:07:06 2019 +0200

Fix typos

Change-Id: I1a77a08fb565e61ca2e277cdc4d78daf52e5fae9
Reviewed-on: https://gerrit.libreoffice.org/77632
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx
index 88f523bfbde5..1f7f0b540565 100644
--- a/sc/source/ui/vba/vbapane.cxx
+++ b/sc/source/ui/vba/vbapane.cxx
@@ -50,7 +50,7 @@ ScVbaPane::setScrollColumn( sal_Int32 _scrollcolumn )
 {
 if( _scrollcolumn < 1 )
 {
-throw uno::RuntimeException("Column number should not less than 1" );
+throw uno::RuntimeException("Column number should not be less than 1" 
);
 }
 m_xViewPane->setFirstVisibleColumn( _scrollcolumn - 1 );
 }
@@ -66,7 +66,7 @@ ScVbaPane::setScrollRow( sal_Int32 _scrollrow )
 {
 if( _scrollrow < 1 )
 {
-throw uno::RuntimeException("Row number should not less than 1" );
+throw uno::RuntimeException("Row number should not be less than 1" );
 }
 m_xViewPane->setFirstVisibleRow( _scrollrow - 1 );
 }
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index f824c3cc74a3..52e31ce2b91b 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -331,7 +331,7 @@ public:
 A list of strings, denoting the names of the pages to be renamed
 
 @param bLink
-Whether the inserted pages should be links to the bookmark document
+Whether the inserted pages should be linked to the bookmark document
 
 @param bReplace
 Whether the pages should not be inserted, but replace the pages in
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: filter/source framework/inc framework/source

2019-08-17 Thread Andrea Gelmini (via logerrit)
 filter/source/config/cache/cacheitem.hxx  |2 +-
 filter/source/config/cache/typedetection.cxx  |2 +-
 filter/source/config/cache/typedetection.hxx  |2 +-
 framework/inc/helper/statusindicator.hxx  |6 +++---
 framework/source/dispatch/closedispatcher.cxx |4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 902f09e49fa5c5f016f5ea82e184a34d85ba2dea
Author: Andrea Gelmini 
AuthorDate: Sat Aug 17 12:51:58 2019 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 17 17:05:34 2019 +0200

Fix typos

Change-Id: I3f7feca68e10e53ac1a6bce2b3920fa0a142a5ef
Reviewed-on: https://gerrit.libreoffice.org/77628
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/filter/source/config/cache/cacheitem.hxx 
b/filter/source/config/cache/cacheitem.hxx
index ab8815fb6be0..aedd899b64d0 100644
--- a/filter/source/config/cache/cacheitem.hxx
+++ b/filter/source/config/cache/cacheitem.hxx
@@ -102,7 +102,7 @@ class CacheItem : public ::comphelper::SequenceAsHashMap
 are checked. Additional existing items are ignored.
 
 @param  lProps
-contains all properties, which should not exists at this 
item.
+contains all properties, which should not exist at this 
item.
 
 @return sal_False if at least on property exists at this item(!);
 sal_True otherwise.
diff --git a/filter/source/config/cache/typedetection.cxx 
b/filter/source/config/cache/typedetection.cxx
index 1495f945fce9..d3bf230b115f 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -1070,7 +1070,7 @@ OUString 
TypeDetection::impl_askUserForTypeAndFilterIfAllowed(utl::MediaDescript
 css::uno::Reference< css::io::XInputStream >());
 
 // Don't disturb the user for "non existing files - means empty URLs" or
-// if we was forced to detect a stream.
+// if we were forced to detect a stream.
 // Reason behind: we must be sure to ask user for "unknown contents" 
only...
 // and not for "missing files". Especially if detection is done by a 
stream only
 // we can't check if the stream points to an "existing content"!
diff --git a/filter/source/config/cache/typedetection.hxx 
b/filter/source/config/cache/typedetection.hxx
index e0340187b5af..24e76a4ed2fa 100644
--- a/filter/source/config/cache/typedetection.hxx
+++ b/filter/source/config/cache/typedetection.hxx
@@ -161,7 +161,7 @@ private:
 
 @attention  The results (means type and corresponding filter)
 are already part of the in/out parameter pDescriptor.
-(in case they was valid).
+(in case they were valid).
 
 @param  sDetectService
 uno service name of the detect service.
diff --git a/framework/inc/helper/statusindicator.hxx 
b/framework/inc/helper/statusindicator.hxx
index b5a9744c0743..baff80c4ab28 100644
--- a/framework/inc/helper/statusindicator.hxx
+++ b/framework/inc/helper/statusindicator.hxx
@@ -35,14 +35,14 @@ namespace framework{
 /**
 @short  implement a status indicator object
 
-@descr  With this indicator you can show a message and a progress 
...
+@descr  With this indicator you can show a message and a 
progress...
 but you share the output device with other indicator 
objects,
 if this instances was created by the same factory.
 Then the last created object has full access to device.
 All others change her internal data structure only.
 
-All objects of this StatusIndicator class calls a c++ 
interface
-on the StatusIndicatorFactory (where they was created).
+All objects of this StatusIndicator class calls a C++ 
interface
+on the StatusIndicatorFactory (where they were created).
 The factory holds all data structures and paints the 
progress.
 
 @devstatus  ready to use
diff --git a/framework/source/dispatch/closedispatcher.cxx 
b/framework/source/dispatch/closedispatcher.cxx
index 46ed7d59ebd2..843a4b1b57d9 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -136,10 +136,10 @@ void SAL_CALL 
CloseDispatcher::dispatchWithNotification(const css::util::URL&
 // SAFE -> --
 SolarMutexClearableGuard aWriteLock;
 
-// This reference indicates, that we was already called before and
+// This reference indicates, that we were already called before and
 // our asynchronous process was not finished yet.
 // We have to reject double calls. Otherwise we risk,
-// that we try to close an already closed resource ...
+// that we try to close an already closed resource...
 // And it is no problem to do nothin

[Libreoffice-commits] core.git: 2 commits - cppuhelper/source desktop/source desktop/test drawinglayer/source embeddedobj/source extensions/source forms/source fpicker/source

2019-08-17 Thread Julien Nabet (via logerrit)
 cppuhelper/source/servicemanager.cxx |5 ---
 desktop/source/app/officeipcthread.cxx   |3 -
 desktop/source/lib/lokinteractionhandler.cxx |   12 +++
 desktop/test/deployment/active/active_native.cxx |3 -
 desktop/test/deployment/passive/passive_native.cxx   |3 -
 drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx |2 -
 embeddedobj/source/commonembedding/xfactory.cxx  |5 ---
 extensions/source/bibliography/bibload.cxx   |7 
 forms/source/component/FormComponent.cxx |5 ---
 forms/source/component/FormsCollection.cxx   |7 
 forms/source/component/scrollbar.cxx |4 --
 forms/source/component/spinbutton.cxx|4 --
 forms/source/richtext/richtextmodel.cxx  |   18 +--
 fpicker/source/aqua/SalAquaFilePicker.mm |8 +---
 fpicker/source/aqua/SalAquaFolderPicker.mm   |5 ---
 fpicker/source/win32/VistaFilePicker.cxx |9 ++---
 16 files changed, 33 insertions(+), 67 deletions(-)

New commits:
commit 2674cf29a87c8f56ccf9f491c496e36ce4e8e367
Author: Julien Nabet 
AuthorDate: Sat Aug 17 16:08:25 2019 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 17 17:03:14 2019 +0200

tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor

in forms and fpicker

Change-Id: Ifa931bed6de434a2ee183c78e8e1be852ca06a56
Reviewed-on: https://gerrit.libreoffice.org/77637
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/forms/source/component/FormComponent.cxx 
b/forms/source/component/FormComponent.cxx
index e0c7b3e04bd6..e8c8efca5c6c 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -682,10 +682,7 @@ Sequence SAL_CALL 
OControlModel::getSupportedServiceNames()
 
 Sequence< OUString > OControlModel::getSupportedServiceNames_Static()
 {
-Sequence< OUString > aServiceNames( 2 );
-aServiceNames[ 0 ] = FRM_SUN_FORMCOMPONENT;
-aServiceNames[ 1 ] = "com.sun.star.form.FormControlModel";
-return aServiceNames;
+return { FRM_SUN_FORMCOMPONENT, "com.sun.star.form.FormControlModel" };
 }
 
 // XEventListener
diff --git a/forms/source/component/FormsCollection.cxx 
b/forms/source/component/FormsCollection.cxx
index 753deca90143..2b2b52c2545d 100644
--- a/forms/source/component/FormsCollection.cxx
+++ b/forms/source/component/FormsCollection.cxx
@@ -95,12 +95,7 @@ sal_Bool SAL_CALL OFormsCollection::supportsService( const 
OUString& _rServiceNa
 
 css::uno::Sequence SAL_CALL 
OFormsCollection::getSupportedServiceNames()
 {
-css::uno::Sequence aReturn(2);
-
-aReturn[0] = "com.sun.star.form.Forms";
-aReturn[1] = "com.sun.star.form.FormComponents";
-
-return aReturn;
+return { "com.sun.star.form.Forms", "com.sun.star.form.FormComponents" };
 }
 
 // XCloneable
diff --git a/forms/source/component/scrollbar.cxx 
b/forms/source/component/scrollbar.cxx
index 2e153c3d71f3..b478a58c69e2 100644
--- a/forms/source/component/scrollbar.cxx
+++ b/forms/source/component/scrollbar.cxx
@@ -118,9 +118,7 @@ namespace frm
 // to benefit from the functionality for binding to spreadsheet cells
 Sequence< OUString > SAL_CALL OScrollBarModel::getSupportedServiceNames()
 {
-Sequence< OUString > aOwnNames( 2 );
-aOwnNames[ 0 ] = FRM_SUN_COMPONENT_SCROLLBAR;
-aOwnNames[ 1 ] = BINDABLE_INTEGER_VALUE_RANGE;
+Sequence< OUString > aOwnNames { FRM_SUN_COMPONENT_SCROLLBAR, 
BINDABLE_INTEGER_VALUE_RANGE };
 
 return ::comphelper::combineSequences(
 getAggregateServiceNames(),
diff --git a/forms/source/component/spinbutton.cxx 
b/forms/source/component/spinbutton.cxx
index 9d6b618c3506..d9504a55b616 100644
--- a/forms/source/component/spinbutton.cxx
+++ b/forms/source/component/spinbutton.cxx
@@ -71,9 +71,7 @@ namespace frm
 // to benefit from the functionality for binding to spreadsheet cells
 Sequence< OUString > SAL_CALL OSpinButtonModel::getSupportedServiceNames()
 {
-Sequence< OUString > aOwnNames( 2 );
-aOwnNames[ 0 ] = FRM_SUN_COMPONENT_SPINBUTTON;
-aOwnNames[ 1 ] = BINDABLE_INTEGER_VALUE_RANGE;
+Sequence< OUString > aOwnNames { FRM_SUN_COMPONENT_SPINBUTTON, 
BINDABLE_INTEGER_VALUE_RANGE };
 
 return ::comphelper::combineSequences(
 getAggregateServiceNames(),
diff --git a/forms/source/richtext/richtextmodel.cxx 
b/forms/source/richtext/richtextmodel.cxx
index 3d1e7a75e834..9ec22b913924 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -233,15 +233,15 @@ namespace frm
 
 Sequence< OUString > SAL_CALL ORichTextModel::getSupportedServiceNames()
 {
-Sequence< OUString > aOwnNames( 8 );

[Libreoffice-commits] core.git: wizards/source

2019-08-17 Thread Jean-Pierre Ledure (via logerrit)
 wizards/source/access2base/access2base.py |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 86e8c23988294003fc1972258de9d2e4a588adbc
Author: Jean-Pierre Ledure 
AuthorDate: Sat Aug 17 16:48:49 2019 +0200
Commit: Jean-Pierre Ledure 
CommitDate: Sat Aug 17 16:51:15 2019 +0200

Access2Base - access2base.py fix DebugPrint

Display basic objects

Change-Id: I45c5718d364c09d71bb6cd47171d0621fb4a00e7

diff --git a/wizards/source/access2base/access2base.py 
b/wizards/source/access2base/access2base.py
index b831fcd4efca..e58f1cce9f14 100644
--- a/wizards/source/access2base/access2base.py
+++ b/wizards/source/access2base/access2base.py
@@ -1444,7 +1444,8 @@ Set of directly callable error handling methods
 def DebugPrint(*args):
 dargs = ()
 for arg in args:
-if isinstance(arg, _BasicObject): arg = '[' + arg.objecttype + ']'
+if isinstance(arg, _BasicObject):
+arg = ('[' + arg.objecttype + '] ' + arg.name).rstrip()
 dargs = dargs + (arg,)
 return _A2B.invokeMethod('DebugPrint', _WRAPPERMODULE, *dargs)
 def TraceConsole(): return _A2B.invokeMethod('TraceConsole', 'Trace')
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sfx2/qa sfx2/uiconfig

2019-08-17 Thread Muhammet Kara (via logerrit)
 sfx2/qa/unit/data/sfx2-dialogs-test.txt |1 +
 sfx2/uiconfig/ui/autoredactdialog.ui|2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 068b16da7589c5b61c2147c18e022599ee7e764c
Author: Muhammet Kara 
AuthorDate: Wed Jun 19 20:57:20 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Aug 17 16:42:09 2019 +0200

Small fixes on autoredactdialog.ui

Change-Id: I14d8883d8a0bcba02327395a17bc56978649de4b
Reviewed-on: https://gerrit.libreoffice.org/74374
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/77169
Tested-by: Muhammet Kara 

diff --git a/sfx2/qa/unit/data/sfx2-dialogs-test.txt 
b/sfx2/qa/unit/data/sfx2-dialogs-test.txt
index 08f07a6cb574..cf2ad970278e 100644
--- a/sfx2/qa/unit/data/sfx2-dialogs-test.txt
+++ b/sfx2/qa/unit/data/sfx2-dialogs-test.txt
@@ -69,3 +69,4 @@ sfx/ui/floatingrecord.ui
 sfx/ui/helpcontrol.ui
 sfx/ui/startcenter.ui
 sfx/ui/cmisline.ui
+sfx/ui/autoredactdialog.ui
diff --git a/sfx2/uiconfig/ui/autoredactdialog.ui 
b/sfx2/uiconfig/ui/autoredactdialog.ui
index 113002775125..ce64d392fb9d 100644
--- a/sfx2/uiconfig/ui/autoredactdialog.ui
+++ b/sfx2/uiconfig/ui/autoredactdialog.ui
@@ -21,7 +21,7 @@
   
 False
 6
-Automatic Redaction
+Automatic Redaction
 True
 dialog
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sfx2/source

2019-08-17 Thread Muhammet Kara (via logerrit)
 sfx2/source/doc/autoredactdialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5e54ef764894fa16e0cd2bea3bc7677ec7ada367
Author: Muhammet Kara 
AuthorDate: Sun Jul 14 23:51:44 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Aug 17 16:42:31 2019 +0200

Fix error in JSONtoRedactionTarget

Change-Id: I6e82f86adfc6e1ebff2d9377dd011d0d97648848
Reviewed-on: https://gerrit.libreoffice.org/75602
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/77170
Tested-by: Muhammet Kara 

diff --git a/sfx2/source/doc/autoredactdialog.cxx 
b/sfx2/source/doc/autoredactdialog.cxx
index 692bce0080b9..49f6812861c9 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -384,7 +384,7 @@ RedactionTarget* JSONtoRedactionTarget(const 
boost::property_tree::ptree::value_
 {
 OUString sName = 
OUString::fromUtf8(rValue.second.get("sName").c_str());
 RedactionTargetType eType
-= 
static_cast(atoi(rValue.second.get("sName").c_str()));
+= 
static_cast(atoi(rValue.second.get("eType").c_str()));
 OUString sContent = 
OUString::fromUtf8(rValue.second.get("sContent").c_str());
 bool bCaseSensitive
 = 
OUString::fromUtf8(rValue.second.get("bCaseSensitive").c_str()).toBoolean();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 2 commits - sfx2/inc sfx2/source

2019-08-17 Thread Muhammet Kara (via logerrit)
 sfx2/inc/autoredactdialog.hxx  |   15 ++-
 sfx2/source/doc/SfxRedactionHelper.cxx |2 ++
 sfx2/source/doc/autoredactdialog.cxx   |   25 -
 sfx2/source/doc/objserv.cxx|2 +-
 4 files changed, 17 insertions(+), 27 deletions(-)

New commits:
commit 372676e1bb5cc951240b8801b7e9791899b8202a
Author: Muhammet Kara 
AuthorDate: Fri Jun 28 20:18:50 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Aug 17 16:41:50 2019 +0200

Fix undefined reference to static constexpr for pre-C++17

Change-Id: I451dba37688441f26aa48e62b1baa3aa24678073
Reviewed-on: https://gerrit.libreoffice.org/77168
Reviewed-by: Muhammet Kara 
Tested-by: Muhammet Kara 

diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx 
b/sfx2/source/doc/SfxRedactionHelper.cxx
index 6fff84c6b5da..fb3181db898b 100644
--- a/sfx2/source/doc/SfxRedactionHelper.cxx
+++ b/sfx2/source/doc/SfxRedactionHelper.cxx
@@ -60,6 +60,8 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::uno;
 
+constexpr OUStringLiteral SfxRedactionHelper::m_aPredefinedTargets[6];
+
 bool SfxRedactionHelper::isRedactMode(const SfxRequest& rReq)
 {
 const SfxItemSet* pArgs = rReq.GetArgs();
commit 35913ab8151eb084c00d099aefc3112eb2c146e5
Author: Muhammet Kara 
AuthorDate: Tue Jun 18 21:04:26 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Aug 17 16:41:30 2019 +0200

Copy targets instead of moving during redaction

To allow properly remembering the last state.

* And some clean-up.

Change-Id: Id0b0f4251e3578b8baced1e6e6b1161f46e324dc
Reviewed-on: https://gerrit.libreoffice.org/74302
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/77167
Tested-by: Muhammet Kara 

diff --git a/sfx2/inc/autoredactdialog.hxx b/sfx2/inc/autoredactdialog.hxx
index 2cec20cc64c8..92010071b185 100644
--- a/sfx2/inc/autoredactdialog.hxx
+++ b/sfx2/inc/autoredactdialog.hxx
@@ -106,6 +106,7 @@ class SFX2_DLLPUBLIC SfxAutoRedactDialog : public 
SfxDialogController
 std::vector> m_aTableTargets;
 std::unique_ptr m_pFileDlg;
 bool m_bIsValidState;
+bool m_bTargetsCopied;
 
 std::unique_ptr m_xRedactionTargetsLabel;
 std::unique_ptr m_xTargetsBox;
@@ -138,16 +139,12 @@ public:
 bool hasTargets() const;
 /// Check if the dialog is in a valid state.
 bool isValidState() const { return m_bIsValidState; }
-/** Literally moves targets into the given vector.
- *  At the end of the operation, m_aTableTargets vector becomes empty.
- *  The contents of the given vector will be erased before being filled in.
- *  Returns true if successfull.
- */
-bool moveTargets(std::vector>& 
r_aTargets);
 
-// TODO: Some method(s) to check emptiness/validity
-// TODO: Some method(s) to get the search params/objects
-// TODO: Some method(s) to load/save redaction target sets
+/** Copies targets vector
+ *  Does a shallow copy.
+ *  Returns true if successful.
+ */
+bool getTargets(std::vector>& 
r_aTargets);
 };
 
 class SfxAddTargetDialog : public weld::GenericDialogController
diff --git a/sfx2/source/doc/autoredactdialog.cxx 
b/sfx2/source/doc/autoredactdialog.cxx
index 90ceb3941962..692bce0080b9 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -545,6 +545,7 @@ void SfxAutoRedactDialog::clearTargets()
 SfxAutoRedactDialog::SfxAutoRedactDialog(weld::Window* pParent)
 : SfxDialogController(pParent, "sfx/ui/autoredactdialog.ui", 
"AutoRedactDialog")
 , m_bIsValidState(true)
+, m_bTargetsCopied(false)
 , m_xRedactionTargetsLabel(m_xBuilder->weld_label("labelRedactionTargets"))
 , m_xTargetsBox(new TargetsTable(m_xBuilder->weld_tree_view("targets")))
 , m_xLoadBtn(m_xBuilder->weld_button("btnLoadTargets"))
@@ -636,7 +637,8 @@ SfxAutoRedactDialog::~SfxAutoRedactDialog()
OStringToOUString(m_xDialog->get_help_id(), 
RTL_TEXTENCODING_UTF8));
 aDlgOpt.SetUserItem("UserItem", css::uno::makeAny(sUserDataStr));
 
-clearTargets();
+if (!m_bTargetsCopied)
+clearTargets();
 }
 catch (css::uno::Exception& e)
 {
@@ -656,24 +658,13 @@ bool SfxAutoRedactDialog::hasTargets() const
 return true;
 }
 
-bool SfxAutoRedactDialog::moveTargets(
-std::vector>& r_aTargets)
+bool SfxAutoRedactDialog::getTargets(std::vector>& r_aTargets)
 {
-try
-{
-r_aTargets.clear();
-r_aTargets.insert(r_aTargets.end(), 
std::make_move_iterator(m_aTableTargets.begin()),
-  std::make_move_iterator(m_aTableTargets.end()));
-m_aTableTargets.clear();
-m_bIsValidState = false;
-}
-catch (const css::uno::Exception& e)
-{
-SAL_WARN("sfx.doc", "Exception caught while moving redaction targets: 
" << e.Message);
-   

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sfx2/source

2019-08-17 Thread Muhammet Kara (via logerrit)
 sfx2/source/doc/autoredactdialog.cxx |   73 ---
 1 file changed, 67 insertions(+), 6 deletions(-)

New commits:
commit a573ce29478406aeea457405687aeb11341dddf5
Author: Muhammet Kara 
AuthorDate: Mon Jun 17 15:33:37 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Aug 17 16:41:10 2019 +0200

Let autoredact dialog remember last state

* By storing the JSON string as SvtViewOptions

Change-Id: I08e323005612cb0181d2176af659eb54267fbb3f
Reviewed-on: https://gerrit.libreoffice.org/74169
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/77166
Tested-by: Muhammet Kara 

diff --git a/sfx2/source/doc/autoredactdialog.cxx 
b/sfx2/source/doc/autoredactdialog.cxx
index 798ab965d831..90ceb3941962 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -557,6 +557,7 @@ SfxAutoRedactDialog::SfxAutoRedactDialog(weld::Window* 
pParent)
 OUString sExtraData;
 SvtViewOptions aDlgOpt(EViewType::Dialog,
OStringToOUString(m_xDialog->get_help_id(), 
RTL_TEXTENCODING_UTF8));
+
 if (aDlgOpt.Exists())
 {
 css::uno::Any aUserItem = aDlgOpt.GetUserItem("UserItem");
@@ -564,12 +565,34 @@ SfxAutoRedactDialog::SfxAutoRedactDialog(weld::Window* 
pParent)
 }
 
 // update the targets configuration if necessary
+if (!sExtraData.isEmpty())
 {
 weld::WaitObject aWaitCursor(m_xDialog.get());
-//m_aTargets.Update();
-}
 
-// TODO: fill the targets box
+try
+{
+// Create path string, and read JSON from file
+boost::property_tree::ptree aTargetsJSON;
+std::stringstream aStream(std::string(sExtraData.toUtf8()));
+
+boost::property_tree::read_json(aStream, aTargetsJSON);
+
+// Recreate & add the targets to the dialog
+for (const boost::property_tree::ptree::value_type& rValue :
+ aTargetsJSON.get_child("RedactionTargets"))
+{
+RedactionTarget* pTarget = JSONtoRedactionTarget(rValue);
+addTarget(pTarget);
+}
+}
+catch (css::uno::Exception& e)
+{
+SAL_WARN("sfx.doc",
+ "Exception caught while trying to load the last dialog 
state: " << e.Message);
+return;
+//TODO: Warn the user with a message box
+}
+}
 
 // Handler connections
 m_xLoadBtn->connect_clicked(LINK(this, SfxAutoRedactDialog, Load));
@@ -581,9 +604,47 @@ SfxAutoRedactDialog::SfxAutoRedactDialog(weld::Window* 
pParent)
 
 SfxAutoRedactDialog::~SfxAutoRedactDialog()
 {
-// Store the view options
-/*SvtViewOptions aDlgOpt(EViewType::Dialog, 
OStringToOUString(m_xDialog->get_help_id(), RTL_TEXTENCODING_UTF8));
-aDlgOpt.SetUserItem("UserItem", 
css::uno::makeAny(m_xMoreBt->get_expanded() ? OUString("Y") : OUString("N")));*/
+if (m_aTableTargets.empty())
+{
+// Clear the dialog data
+SvtViewOptions aDlgOpt(EViewType::Dialog,
+   OStringToOUString(m_xDialog->get_help_id(), 
RTL_TEXTENCODING_UTF8));
+aDlgOpt.Delete();
+return;
+}
+
+try
+{
+// Put the targets into a JSON array
+boost::property_tree::ptree aTargetsArray;
+for (const auto& targetPair : m_aTableTargets)
+{
+aTargetsArray.push_back(std::make_pair("", 
redactionTargetToJSON(targetPair.first)));
+}
+
+// Build the JSON tree
+boost::property_tree::ptree aTargetsTree;
+aTargetsTree.add_child("RedactionTargets", aTargetsArray);
+std::stringstream aStream;
+
+boost::property_tree::write_json(aStream, aTargetsTree, false);
+
+OUString sUserDataStr(OUString::fromUtf8(aStream.str().c_str()));
+
+// Store the dialog data
+SvtViewOptions aDlgOpt(EViewType::Dialog,
+   OStringToOUString(m_xDialog->get_help_id(), 
RTL_TEXTENCODING_UTF8));
+aDlgOpt.SetUserItem("UserItem", css::uno::makeAny(sUserDataStr));
+
+clearTargets();
+}
+catch (css::uno::Exception& e)
+{
+SAL_WARN("sfx.doc",
+ "Exception caught while trying to store the dialog state: " 
<< e.Message);
+return;
+//TODO: Warn the user with a message box
+}
 }
 
 bool SfxAutoRedactDialog::hasTargets() const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sfx2/inc sfx2/source sfx2/uiconfig

2019-08-17 Thread Muhammet Kara (via logerrit)
 sfx2/inc/SfxRedactionHelper.hxx|   14 +
 sfx2/inc/autoredactdialog.hxx  |7 ++
 sfx2/source/doc/SfxRedactionHelper.cxx |   17 +-
 sfx2/source/doc/autoredactdialog.cxx   |   89 +++--
 sfx2/uiconfig/ui/addtargetdialog.ui|   52 +--
 5 files changed, 167 insertions(+), 12 deletions(-)

New commits:
commit 9ef2b684647472f6774243df79493fee59f78095
Author: Muhammet Kara 
AuthorDate: Sat Jun 15 12:08:35 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Aug 17 16:40:38 2019 +0200

Add predefined targets to auto redaction

Change-Id: Ib8cf8b50944667d6a87a5cafb6995ad195699358
Reviewed-on: https://gerrit.libreoffice.org/74092
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/77165
Tested-by: Muhammet Kara 

diff --git a/sfx2/inc/SfxRedactionHelper.hxx b/sfx2/inc/SfxRedactionHelper.hxx
index 2f470386d2dc..ae72c39f4886 100644
--- a/sfx2/inc/SfxRedactionHelper.hxx
+++ b/sfx2/inc/SfxRedactionHelper.hxx
@@ -120,6 +120,20 @@ public:
 /// Fill the search options based on the given redaction target
 static void fillSearchOptions(i18nutil::SearchOptions2& rSearchOpt,
   const RedactionTarget* pTarget);
+
+private:
+static constexpr OUStringLiteral m_aPredefinedTargets[6] = {
+"\\b(?:\\d[ -]*?){13,16}\\b", //Credit card numbers
+"\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}\\b", //Email addresses
+
"\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
+
"\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
+"\\b", //IP addresses
+"([12]\\d{3}[./-](0[1-9]|1[0-2])[./"
+
"-](0[1-9]|[12]\\d|3[01]))|((0[1-9]|[12]\\d|3[01])[./-](0[1-9]|1[0-2])[./"
+"-][12]\\d{3})", //Dates (numerical)
+"\\s*[a-zA-Z]{2}(?:\\s*\\d\\s*){6}[a-zA-Z]?\\s*", //National Insurance 
Number (UK)
+"([1-9])(?!\\1{2}-\\1{2}-\\1{4})[1-9]{2}-[1-9]{2}-[1-9]{4}" //Social 
Security Number (US)
+};
 };
 
 #endif // INCLUDED_CUI_SOURCE_INC_SFXREDACTIONHELPER_HXX
diff --git a/sfx2/inc/autoredactdialog.hxx b/sfx2/inc/autoredactdialog.hxx
index bab00cf536a3..2cec20cc64c8 100644
--- a/sfx2/inc/autoredactdialog.hxx
+++ b/sfx2/inc/autoredactdialog.hxx
@@ -155,10 +155,15 @@ class SfxAddTargetDialog : public 
weld::GenericDialogController
 private:
 std::unique_ptr m_xName;
 std::unique_ptr m_xType;
+std::unique_ptr m_xLabelContent;
 std::unique_ptr m_xContent;
+std::unique_ptr m_xLabelPredefContent;
+std::unique_ptr m_xPredefContent;
 std::unique_ptr m_xCaseSensitive;
 std::unique_ptr m_xWholeWords;
 
+DECL_LINK(SelectTypeHdl, weld::ComboBox&, void);
+
 public:
 SfxAddTargetDialog(weld::Window* pWindow, const OUString& rName);
 SfxAddTargetDialog(weld::Window* pWindow, const OUString& sName,
@@ -167,7 +172,7 @@ public:
 
 OUString getName() const { return m_xName->get_text(); }
 RedactionTargetType getType() const;
-OUString getContent() const { return m_xContent->get_text(); }
+OUString getContent() const;
 bool isCaseSensitive() const
 {
 return m_xCaseSensitive->get_state() == TriState::TRISTATE_TRUE;
diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx 
b/sfx2/source/doc/SfxRedactionHelper.cxx
index 1ce83b25e295..6fff84c6b5da 100644
--- a/sfx2/source/doc/SfxRedactionHelper.cxx
+++ b/sfx2/source/doc/SfxRedactionHelper.cxx
@@ -531,7 +531,8 @@ void 
SfxRedactionHelper::fillSearchOptions(i18nutil::SearchOptions2& rSearchOpt,
 return;
 }
 
-if (pTarget->sType == RedactionTargetType::REDACTION_TARGET_REGEX)
+if (pTarget->sType == RedactionTargetType::REDACTION_TARGET_REGEX
+|| pTarget->sType == RedactionTargetType::REDACTION_TARGET_PREDEFINED)
 {
 rSearchOpt.algorithmType = util::SearchAlgorithms_REGEXP;
 rSearchOpt.AlgorithmType2 = util::SearchAlgorithms2::REGEXP;
@@ -543,10 +544,20 @@ void 
SfxRedactionHelper::fillSearchOptions(i18nutil::SearchOptions2& rSearchOpt,
 }
 
 rSearchOpt.Locale = GetAppLanguageTag().getLocale();
-rSearchOpt.searchString = pTarget->sContent;
+if (pTarget->sType == RedactionTargetType::REDACTION_TARGET_PREDEFINED)
+{
+sal_Int32 nPredefIndex = pTarget->sContent.getToken(0, ';').toInt32();
+//sal_Int32 nPredefIndex = sContent.toInt32();
+
+rSearchOpt.searchString = m_aPredefinedTargets[nPredefIndex];
+}
+else
+rSearchOpt.searchString = pTarget->sContent;
+
 rSearchOpt.replaceString.clear();
 
-if (!pTarget->bCaseSensitive && pTarget->sType != 
RedactionTargetType::REDACTION_TARGET_REGEX)
+if (!pTarget->bCaseSensitive && pTarget->sType != 
RedactionTargetType::REDACTION_TARGET_REGEX
+&& pTarget->sType != RedactionTargetType::REDACTION_TARGET_PREDEFINED)
 rSearchOpt.transliterateFlags |= TransliterationFlags::IG

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sfx2/inc sfx2/source

2019-08-17 Thread Muhammet Kara (via logerrit)
 sfx2/inc/SfxRedactionHelper.hxx|   11 +++
 sfx2/source/doc/SfxRedactionHelper.cxx |   92 ++---
 2 files changed, 85 insertions(+), 18 deletions(-)

New commits:
commit 122ee5952f80816817d9485f3b8f6b07ca189cc3
Author: Muhammet Kara 
AuthorDate: Thu Jun 13 18:32:27 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Aug 17 16:40:11 2019 +0200

Use utl::TextSearch in the auto redaction process

* Add support for:
  * Case sensitive and insensitive text search
  * Regex search (always case sensitive) regarless of the choice
  * Multiple occurences of the same target on a single TEXTARRAY

Change-Id: I580059f77286e8c4226cafdd1eb9472f8e1a9a9d
Reviewed-on: https://gerrit.libreoffice.org/74049
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/77164
Tested-by: Muhammet Kara 

diff --git a/sfx2/inc/SfxRedactionHelper.hxx b/sfx2/inc/SfxRedactionHelper.hxx
index 9be54ca8ac22..2f470386d2dc 100644
--- a/sfx2/inc/SfxRedactionHelper.hxx
+++ b/sfx2/inc/SfxRedactionHelper.hxx
@@ -33,6 +33,11 @@ class DocumentToGraphicRenderer;
 class SfxViewFrame;
 struct RedactionTarget;
 
+namespace i18nutil
+{
+struct SearchOptions2;
+}
+
 struct PageMargins
 {
 // Page margins in mm100th
@@ -92,7 +97,7 @@ public:
  * */
 static PageMargins 
getPageMarginsForCalc(css::uno::Reference& xModel);
 
-static void searchInMetaFile(const OUString& sSearchTerm, const 
GDIMetaFile& rMtf,
+static void searchInMetaFile(const RedactionTarget* pRedactionTarget, 
const GDIMetaFile& rMtf,
  std::vector& 
aRedactionRectangles,
  uno::Reference& xComponent);
 
@@ -111,6 +116,10 @@ public:
const GDIMetaFile& rGDIMetaFile,
uno::Reference& xPage,
uno::Reference& xComponent);
+
+/// Fill the search options based on the given redaction target
+static void fillSearchOptions(i18nutil::SearchOptions2& rSearchOpt,
+  const RedactionTarget* pTarget);
 };
 
 #endif // INCLUDED_CUI_SOURCE_INC_SFXREDACTIONHELPER_HXX
diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx 
b/sfx2/source/doc/SfxRedactionHelper.cxx
index b9049c2b6d7b..1ce83b25e295 100644
--- a/sfx2/source/doc/SfxRedactionHelper.cxx
+++ b/sfx2/source/doc/SfxRedactionHelper.cxx
@@ -24,6 +24,18 @@
 #include 
 #include 
 
+// Search util
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
 #include 
 #include 
 #include 
@@ -114,7 +126,7 @@ void setPageMargins(uno::Reference& 
xPageProperySet,
 
 // #i10613# Extracted from ImplCheckRect::ImplCreate
 tools::Rectangle ImplCalcActionBounds(const MetaAction& rAct, const 
OutputDevice& rOut,
-  const OUString& sSubString, const 
sal_Int32& nStrPos)
+  const sal_Int32& nStrStartPos, const 
sal_Int32& nStrEndPos)
 {
 tools::Rectangle aActionBounds;
 
@@ -129,17 +141,16 @@ tools::Rectangle ImplCalcActionBounds(const MetaAction& 
rAct, const OutputDevice
 {
 // #105987# ImplLayout takes everything in logical coordinates
 std::unique_ptr pSalLayout1 = rOut.ImplLayout(
-aString, 0, nStrPos, rTextAct.GetPoint(), 0, 
rTextAct.GetDXArray());
-std::unique_ptr pSalLayout2
-= rOut.ImplLayout(aString, 0, nStrPos + 
sSubString.getLength(),
-  rTextAct.GetPoint(), 0, 
rTextAct.GetDXArray());
+aString, 0, nStrStartPos, rTextAct.GetPoint(), 0, 
rTextAct.GetDXArray());
+std::unique_ptr pSalLayout2 = rOut.ImplLayout(
+aString, 0, nStrEndPos, rTextAct.GetPoint(), 0, 
rTextAct.GetDXArray());
 if (pSalLayout2)
 {
 tools::Rectangle aBoundRect2(
 
const_cast(rOut).ImplGetTextBoundRect(*pSalLayout2));
 aActionBounds = rOut.PixelToLogic(aBoundRect2);
 }
-if (pSalLayout1 && nStrPos > 0)
+if (pSalLayout1 && nStrStartPos > 0)
 {
 tools::Rectangle aBoundRect1(
 
const_cast(rOut).ImplGetTextBoundRect(*pSalLayout1));
@@ -407,10 +418,17 @@ 
SfxRedactionHelper::getPageMarginsForCalc(css::uno::Reference& 
aRedactionRectangles,
   uno::Reference& 
xComponent)
 {
+// Initialize search
+i18nutil::SearchOptions2 aSearchOptions;
+fillSearchOptions(aSearchOptions, pRedactionTarget);
+
+utl::TextSearch textSearch(aSearchOptions);
+
 MetaAction* pCurrAct;
 
 // Watch for TEXTARRAY actions.
@@ -422,22 +440,28 @@ void SfxRedactionHelper::searchInMetaFile(const 
rtl::OUString& s

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sfx2/inc sfx2/source

2019-08-17 Thread Muhammet Kara (via logerrit)
 sfx2/inc/autoredactdialog.hxx|   21 -
 sfx2/source/doc/autoredactdialog.cxx |  142 +--
 2 files changed, 138 insertions(+), 25 deletions(-)

New commits:
commit 53bfc6452528e87a68c0ca1bfda601053cdfec03
Author: Muhammet Kara 
AuthorDate: Sat Jun 8 23:27:56 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Aug 17 16:38:53 2019 +0200

Auto redaction dialog 4th iteration

* Add the Save & SaveHdl handlers
* Add stubs for Load & LoadHdl handlers

Change-Id: I5f58213c86e99f8bfc9075e04eedbb5cb546d9ad
Reviewed-on: https://gerrit.libreoffice.org/73724
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/77161
Tested-by: Muhammet Kara 

diff --git a/sfx2/inc/autoredactdialog.hxx b/sfx2/inc/autoredactdialog.hxx
index 267427c90b21..99c956246d69 100644
--- a/sfx2/inc/autoredactdialog.hxx
+++ b/sfx2/inc/autoredactdialog.hxx
@@ -89,10 +89,22 @@ public:
 //void connect_row_activated(const Link& rLink) { 
m_xControl->connect_row_activated(rLink); }
 };
 
+namespace sfx2
+{
+class FileDialogHelper;
+}
+
+enum class StartFileDialogType
+{
+Open,
+SaveAs
+};
+
 class SFX2_DLLPUBLIC SfxAutoRedactDialog : public SfxDialogController
 {
 SfxObjectShellLock m_xDocShell;
 std::vector> m_aTableTargets;
+std::unique_ptr m_pFileDlg;
 
 std::unique_ptr m_xRedactionTargetsLabel;
 std::unique_ptr m_xTargetsBox;
@@ -102,12 +114,17 @@ class SFX2_DLLPUBLIC SfxAutoRedactDialog : public 
SfxDialogController
 std::unique_ptr m_xEditBtn;
 std::unique_ptr m_xDeleteBtn;
 
-/*DECL_LINK(LoadHdl, weld::Button&, void);
-DECL_LINK(SaveHdl, weld::Button&, void);*/
+DECL_LINK(Load, weld::Button&, void);
+DECL_LINK(Save, weld::Button&, void);
 DECL_LINK(AddHdl, weld::Button&, void);
 DECL_LINK(EditHdl, weld::Button&, void);
 DECL_LINK(DeleteHdl, weld::Button&, void);
 
+DECL_LINK(LoadHdl, sfx2::FileDialogHelper*, void);
+DECL_LINK(SaveHdl, sfx2::FileDialogHelper*, void);
+
+void StartFileDialog(StartFileDialogType nType, const OUString& rTitle);
+
 public:
 SfxAutoRedactDialog(weld::Window* pParent);
 virtual ~SfxAutoRedactDialog() override;
diff --git a/sfx2/source/doc/autoredactdialog.cxx 
b/sfx2/source/doc/autoredactdialog.cxx
index 266859a129ec..7c414cfc3189 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -7,31 +7,34 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include 
 #include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 
-#include 
-#include 
+#include 
 #include 
+#include 
+#include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
-#include 
+#include 
+
+#include 
 
 int TargetsTable::GetRowByTargetName(const OUString& sName)
 {
@@ -180,17 +183,20 @@ void TargetsTable::setRowData(const int& nRowIndex, const 
RedactionTarget* pTarg
 m_xControl->set_text(nRowIndex, pTarget->bWholeWords ? OUString("Yes") : 
OUString("No"), 4);
 }
 
-/*IMPL_LINK_NOARG(SfxAutoRedactDialog, LoadHdl, weld::Button&, void)
+IMPL_LINK_NOARG(SfxAutoRedactDialog, Load, weld::Button&, void)
 {
 //TODO: Implement
-//Load a targets list from a previously saved file (a json file in the 
user profile dir?)
+//Load a targets list from a previously saved file (a json file?)
+// ask for filename, where we should load the new config data from
+StartFileDialog(StartFileDialogType::Open, "Load Targets");
 }
 
-IMPL_LINK_NOARG(SfxAutoRedactDialog, SaveHdl, weld::Button&, void)
+IMPL_LINK_NOARG(SfxAutoRedactDialog, Save, weld::Button&, void)
 {
 //TODO: Implement
 //Allow saving the targets into a file
-}*/
+StartFileDialog(StartFileDialogType::SaveAs, "Save Targets");
+}
 
 IMPL_LINK_NOARG(SfxAutoRedactDialog, AddHdl, weld::Button&, void)
 {
@@ -345,6 +351,96 @@ IMPL_LINK_NOARG(SfxAutoRedactDialog, DeleteHdl, 
weld::Button&, void)
 }
 }
 
+namespace
+{
+boost::property_tree::ptree redactionTargetToJSON(RedactionTarget* pTarget)
+{
+boost::property_tree::ptree aNode;
+aNode.put("sName", pTarget->sName.toUtf8().getStr());
+aNode.put("eType", pTarget->sType);
+aNode.put("sContent", pTarget->sContent.toUtf8().getStr());
+aNode.put("bWholeWords", pTarget->bWholeWords);
+aNode.put("bCaseSensitive", pTarget->bCaseSensitive);
+aNode.put("nID", pTarget->nID);
+
+return aNode;
+}
+}
+
+IMPL_LINK_NOARG(SfxAutoRedactDialog, LoadHdl, sfx2::FileDialogHelper*, void)
+{
+//TODO: Implement
+bool bDummy = hasTargets();
+
+if (bDummy)
+void();
+}
+
+IMPL_LINK_NOARG(SfxAutoRedactDialog, SaveHdl, sfx2::FileDialogHelper*, void)
+{
+assert(m_pFileDlg);
+
+OUString sTargetsFile

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sfx2/inc sfx2/source

2019-08-17 Thread Muhammet Kara (via logerrit)
 sfx2/inc/SfxRedactionHelper.hxx|   14 +-
 sfx2/inc/autoredactdialog.hxx  |   13 ++---
 sfx2/source/doc/SfxRedactionHelper.cxx |   29 +
 sfx2/source/doc/autoredactdialog.cxx   |   22 ++
 sfx2/source/doc/objserv.cxx|   12 
 5 files changed, 70 insertions(+), 20 deletions(-)

New commits:
commit ad06753daebbfb69fded5ae3e5631502d16581bb
Author: Muhammet Kara 
AuthorDate: Wed Jun 12 21:21:26 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Aug 17 16:39:49 2019 +0200

Auto redaction dialog 6th iteration

* Binds everything together.
* The auto redaction process works end to end now.
* Only for case sensitive text content (no regex support yet)

Change-Id: I6edd67472d376e2c0d91ac4b1ff90d98c49b13ac
Reviewed-on: https://gerrit.libreoffice.org/73908
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/77163
Tested-by: Muhammet Kara 

diff --git a/sfx2/inc/SfxRedactionHelper.hxx b/sfx2/inc/SfxRedactionHelper.hxx
index 44a78ab9b877..9be54ca8ac22 100644
--- a/sfx2/inc/SfxRedactionHelper.hxx
+++ b/sfx2/inc/SfxRedactionHelper.hxx
@@ -31,6 +31,7 @@ class SfxStringItem;
 class GDIMetaFile;
 class DocumentToGraphicRenderer;
 class SfxViewFrame;
+struct RedactionTarget;
 
 struct PageMargins
 {
@@ -66,10 +67,12 @@ public:
  * Creates one shape and one draw page for each gdimetafile,
  * and inserts the shapes into the newly created draw pages.
  * */
-static void addPagesToDraw(uno::Reference& xComponent, const 
sal_Int32& nPages,
-   const std::vector& aMetaFiles,
-   const std::vector<::Size>& aPageSizes,
-   const PageMargins& aPageMargins);
+static void
+addPagesToDraw(uno::Reference& xComponent, const sal_Int32& 
nPages,
+   const std::vector& aMetaFiles,
+   const std::vector<::Size>& aPageSizes, const PageMargins& 
aPageMargins,
+   const std::vector>& 
r_aTableTargets,
+   const bool& bIsAutoRedact);
 /*
  * Makes the Redaction toolbar visible to the user.
  * Meant to be called after converting a document to a Draw doc
@@ -104,7 +107,8 @@ public:
  * Search for the given term through the gdimetafile, which has the whole 
content of a draw page,
  * and draw redaction rectangles to the appropriate positions with 
suitable sizes.
  * */
-static void autoRedactPage(const OUString& sRedactionTerm, const 
GDIMetaFile& rGDIMetaFile,
+static void autoRedactPage(const RedactionTarget* pRedactionTarget,
+   const GDIMetaFile& rGDIMetaFile,
uno::Reference& xPage,
uno::Reference& xComponent);
 };
diff --git a/sfx2/inc/autoredactdialog.hxx b/sfx2/inc/autoredactdialog.hxx
index 2336d66c4063..bab00cf536a3 100644
--- a/sfx2/inc/autoredactdialog.hxx
+++ b/sfx2/inc/autoredactdialog.hxx
@@ -105,6 +105,7 @@ class SFX2_DLLPUBLIC SfxAutoRedactDialog : public 
SfxDialogController
 SfxObjectShellLock m_xDocShell;
 std::vector> m_aTableTargets;
 std::unique_ptr m_pFileDlg;
+bool m_bIsValidState;
 
 std::unique_ptr m_xRedactionTargetsLabel;
 std::unique_ptr m_xTargetsBox;
@@ -133,10 +134,16 @@ public:
 SfxAutoRedactDialog(weld::Window* pParent);
 virtual ~SfxAutoRedactDialog() override;
 
-/*
- * Check if the dialog has any valid redaction targets.
- */
+/// Check if the dialog has any valid redaction targets.
 bool hasTargets() const;
+/// Check if the dialog is in a valid state.
+bool isValidState() const { return m_bIsValidState; }
+/** Literally moves targets into the given vector.
+ *  At the end of the operation, m_aTableTargets vector becomes empty.
+ *  The contents of the given vector will be erased before being filled in.
+ *  Returns true if successfull.
+ */
+bool moveTargets(std::vector>& 
r_aTargets);
 
 // TODO: Some method(s) to check emptiness/validity
 // TODO: Some method(s) to get the search params/objects
diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx 
b/sfx2/source/doc/SfxRedactionHelper.cxx
index a5ee9ae588d9..b9049c2b6d7b 100644
--- a/sfx2/source/doc/SfxRedactionHelper.cxx
+++ b/sfx2/source/doc/SfxRedactionHelper.cxx
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 
 #include 
 #include 
@@ -204,11 +205,12 @@ void 
SfxRedactionHelper::getPageMetaFilesFromDoc(std::vector& aMeta
 }
 }
 
-void SfxRedactionHelper::addPagesToDraw(uno::Reference& xComponent,
-const sal_Int32& nPages,
-const std::vector& 
aMetaFiles,
-const std::vector<::Size>& aPageSizes,
-const PageMargins& aPag

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sfx2/inc sfx2/source

2019-08-17 Thread Muhammet Kara (via logerrit)
 sfx2/inc/autoredactdialog.hxx|4 +
 sfx2/source/doc/autoredactdialog.cxx |   97 ---
 2 files changed, 95 insertions(+), 6 deletions(-)

New commits:
commit 4722f7c87f8a20409876f753c0e680b1eeb815e3
Author: Muhammet Kara 
AuthorDate: Tue Jun 11 15:20:55 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Aug 17 16:39:19 2019 +0200

Auto redaction dialog 5th iteration

* Add the Load handler, and the related bits

* The dialog can be considered fully functional now,
  as all buttons are working.

* Next is to handle its output in the redaction phase.

Change-Id: Idd558e13b50f82a95f5f6e226bc855257837b351
Reviewed-on: https://gerrit.libreoffice.org/73822
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/77162
Tested-by: Muhammet Kara 

diff --git a/sfx2/inc/autoredactdialog.hxx b/sfx2/inc/autoredactdialog.hxx
index 99c956246d69..2336d66c4063 100644
--- a/sfx2/inc/autoredactdialog.hxx
+++ b/sfx2/inc/autoredactdialog.hxx
@@ -124,6 +124,10 @@ class SFX2_DLLPUBLIC SfxAutoRedactDialog : public 
SfxDialogController
 DECL_LINK(SaveHdl, sfx2::FileDialogHelper*, void);
 
 void StartFileDialog(StartFileDialogType nType, const OUString& rTitle);
+/// Carry out proper addition both to the targets box, and to the 
tabletargets vector.
+void addTarget(RedactionTarget* pTarget);
+/// Clear all targets both visually and from the targets vector
+void clearTargets();
 
 public:
 SfxAutoRedactDialog(weld::Window* pParent);
diff --git a/sfx2/source/doc/autoredactdialog.cxx 
b/sfx2/source/doc/autoredactdialog.cxx
index 7c414cfc3189..7025baa81576 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -185,7 +185,6 @@ void TargetsTable::setRowData(const int& nRowIndex, const 
RedactionTarget* pTarg
 
 IMPL_LINK_NOARG(SfxAutoRedactDialog, Load, weld::Button&, void)
 {
-//TODO: Implement
 //Load a targets list from a previously saved file (a json file?)
 // ask for filename, where we should load the new config data from
 StartFileDialog(StartFileDialogType::Open, "Load Targets");
@@ -193,7 +192,6 @@ IMPL_LINK_NOARG(SfxAutoRedactDialog, Load, weld::Button&, 
void)
 
 IMPL_LINK_NOARG(SfxAutoRedactDialog, Save, weld::Button&, void)
 {
-//TODO: Implement
 //Allow saving the targets into a file
 StartFileDialog(StartFileDialogType::SaveAs, "Save Targets");
 }
@@ -365,15 +363,70 @@ boost::property_tree::ptree 
redactionTargetToJSON(RedactionTarget* pTarget)
 
 return aNode;
 }
+
+RedactionTarget* JSONtoRedactionTarget(const 
boost::property_tree::ptree::value_type& rValue)
+{
+OUString sName = 
OUString::fromUtf8(rValue.second.get("sName").c_str());
+RedactionTargetType eType
+= 
static_cast(atoi(rValue.second.get("sName").c_str()));
+OUString sContent = 
OUString::fromUtf8(rValue.second.get("sContent").c_str());
+bool bCaseSensitive
+= 
OUString::fromUtf8(rValue.second.get("bCaseSensitive").c_str()).toBoolean();
+bool bWholeWords
+= 
OUString::fromUtf8(rValue.second.get("bWholeWords").c_str()).toBoolean();
+sal_uInt32 nID = atoi(rValue.second.get("nID").c_str());
+
+RedactionTarget* pTarget
+= new RedactionTarget({ sName, eType, sContent, bCaseSensitive, 
bWholeWords, nID });
+
+return pTarget;
+}
 }
 
 IMPL_LINK_NOARG(SfxAutoRedactDialog, LoadHdl, sfx2::FileDialogHelper*, void)
 {
-//TODO: Implement
-bool bDummy = hasTargets();
+assert(m_pFileDlg);
+
+OUString sTargetsFile;
+if (ERRCODE_NONE == m_pFileDlg->GetError())
+sTargetsFile = m_pFileDlg->GetPath();
+
+if (sTargetsFile.isEmpty())
+return;
+
+OUString sSysPath;
+osl::File::getSystemPathFromFileURL(sTargetsFile, sSysPath);
+sTargetsFile = sSysPath;
+
+weld::WaitObject aWaitObject(getDialog());
+
+try
+{
+// Create path string, and read JSON from file
+std::string sPathStr(OUStringToOString(sTargetsFile, 
RTL_TEXTENCODING_UTF8).getStr());
+
+boost::property_tree::ptree aTargetsJSON;
+
+boost::property_tree::read_json(sPathStr, aTargetsJSON);
+
+// Clear the dialog
+clearTargets();
 
-if (bDummy)
-void();
+// Recreate & add the targets to the dialog
+for (const boost::property_tree::ptree::value_type& rValue :
+ aTargetsJSON.get_child("RedactionTargets"))
+{
+RedactionTarget* pTarget = JSONtoRedactionTarget(rValue);
+addTarget(pTarget);
+}
+}
+catch (css::uno::Exception& e)
+{
+SAL_WARN("sfx.doc",
+ "Exception caught while trying to load the targets JSON from 
file: " << e.Message);
+return;
+//TODO: Warn the user with a message box
+}
 }
 
 IMPL_LINK_NOARG(SfxAutoRedactDialog, SaveHdl, sfx2::FileDialogHelper*, void)
@@ -441,6 +494,3

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sfx2/inc sfx2/source

2019-08-17 Thread Muhammet Kara (via logerrit)
 sfx2/inc/autoredactdialog.hxx|8 +-
 sfx2/source/doc/autoredactdialog.cxx |  131 +--
 2 files changed, 133 insertions(+), 6 deletions(-)

New commits:
commit ec442c00bc1236bbd27010bdcf7b114c796712d8
Author: Muhammet Kara 
AuthorDate: Sat Jun 8 16:37:04 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Aug 17 16:38:26 2019 +0200

Auto redaction dialog 3rd iteration

* Add the Edit handler

Change-Id: Id900d2aab6fa6795455012aaf2bcaf755ccca139
Reviewed-on: https://gerrit.libreoffice.org/73705
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/77160
Tested-by: Muhammet Kara 

diff --git a/sfx2/inc/autoredactdialog.hxx b/sfx2/inc/autoredactdialog.hxx
index 26b29bf10cf5..267427c90b21 100644
--- a/sfx2/inc/autoredactdialog.hxx
+++ b/sfx2/inc/autoredactdialog.hxx
@@ -82,6 +82,9 @@ public:
 void select(int nRow) { m_xControl->select(nRow); }
 OUString get_id(int nRow) const { return m_xControl->get_id(nRow); }
 
+// Sync data on the targets box with the data on the target
+void setRowData(const int& nRowIndex, const RedactionTarget* pTarget);
+
 //void connect_changed(const Link& rLink) { 
m_xControl->connect_changed(rLink); }
 //void connect_row_activated(const Link& rLink) { 
m_xControl->connect_row_activated(rLink); }
 };
@@ -102,7 +105,7 @@ class SFX2_DLLPUBLIC SfxAutoRedactDialog : public 
SfxDialogController
 /*DECL_LINK(LoadHdl, weld::Button&, void);
 DECL_LINK(SaveHdl, weld::Button&, void);*/
 DECL_LINK(AddHdl, weld::Button&, void);
-//DECL_LINK(EditHdl, weld::Button&, void);
+DECL_LINK(EditHdl, weld::Button&, void);
 DECL_LINK(DeleteHdl, weld::Button&, void);
 
 public:
@@ -130,6 +133,9 @@ private:
 
 public:
 SfxAddTargetDialog(weld::Window* pWindow, const OUString& rName);
+SfxAddTargetDialog(weld::Window* pWindow, const OUString& sName,
+   const RedactionTargetType& eTargetType, const OUString& 
sContent,
+   const bool& bCaseSensitive, const bool& bWholeWords);
 
 OUString getName() const { return m_xName->get_text(); }
 RedactionTargetType getType() const;
diff --git a/sfx2/source/doc/autoredactdialog.cxx 
b/sfx2/source/doc/autoredactdialog.cxx
index 5d94906e9ba8..266859a129ec 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -85,6 +85,30 @@ OUString getTypeName(RedactionTargetType nType)
 
 return sTypeName;
 }
+
+/// Returns TypeID to be used in the add/edit target dialog
+OUString getTypeID(RedactionTargetType nType)
+{
+OUString sTypeID("unknown");
+
+switch (nType)
+{
+case RedactionTargetType::REDACTION_TARGET_TEXT:
+sTypeID = "text";
+break;
+case RedactionTargetType::REDACTION_TARGET_REGEX:
+sTypeID = "regex";
+break;
+case RedactionTargetType::REDACTION_TARGET_PREDEFINED:
+sTypeID = "predefined";
+break;
+case RedactionTargetType::REDACTION_TARGET_UNKNOWN:
+sTypeID = "unknown";
+break;
+}
+
+return sTypeID;
+}
 }
 
 void TargetsTable::InsertTarget(RedactionTarget* pTarget)
@@ -147,6 +171,15 @@ OUString TargetsTable::GetNameProposal()
 return sDefaultTargetName + " " + OUString::number(nHighestTargetId + 1);
 }
 
+void TargetsTable::setRowData(const int& nRowIndex, const RedactionTarget* 
pTarget)
+{
+m_xControl->set_text(nRowIndex, pTarget->sName, 0);
+m_xControl->set_text(nRowIndex, getTypeName(pTarget->sType), 1);
+m_xControl->set_text(nRowIndex, pTarget->sContent, 2);
+m_xControl->set_text(nRowIndex, pTarget->bCaseSensitive ? OUString("Yes") 
: OUString("No"), 3);
+m_xControl->set_text(nRowIndex, pTarget->bWholeWords ? OUString("Yes") : 
OUString("No"), 4);
+}
+
 /*IMPL_LINK_NOARG(SfxAutoRedactDialog, LoadHdl, weld::Button&, void)
 {
 //TODO: Implement
@@ -214,11 +247,75 @@ IMPL_LINK_NOARG(SfxAutoRedactDialog, AddHdl, 
weld::Button&, void)
 }
 }
 
-/*IMPL_LINK_NOARG(SfxAutoRedactDialog, EditHdl, weld::Button&, void)
+IMPL_LINK_NOARG(SfxAutoRedactDialog, EditHdl, weld::Button&, void)
 {
-//TODO: Implement
-//Reuse the Add Target dialog
-}*/
+sal_Int32 nSelectedRow = m_xTargetsBox->get_selected_index();
+
+// No selection, nothing to edit
+if (nSelectedRow < 0)
+return;
+
+// Only one entry should be selected for editing
+if (m_xTargetsBox->get_selected_rows().size() > 1)
+{
+OUString sMsg(
+"You have selected multiple targets, but only one target can be 
edited at once.");
+//Warn the user about multiple selections
+std::unique_ptr 
xBox(Application::CreateMessageDialog(
+getDialog(), VclMessageType::Error, VclButtonsType::Ok, sMsg));
+xBox->run();
+return;
+}
+
+// Get the redaction target to be edited
+RedactionTarge

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - include/sfx2 sfx2/inc sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk

2019-08-17 Thread Muhammet Kara (via logerrit)
 sfx2/UIConfig_sfx.mk |1 
 sfx2/inc/autoredactdialog.hxx|   54 +++-
 sfx2/source/doc/autoredactdialog.cxx |  190 +---
 sfx2/source/doc/objserv.cxx  |2 
 sfx2/uiconfig/ui/addtargetdialog.ui  |  235 +++
 sfx2/uiconfig/ui/autoredactdialog.ui |   10 -
 6 files changed, 459 insertions(+), 33 deletions(-)

New commits:
commit 775475650fb5342ad0fce161e6eff6e84118a530
Author: Muhammet Kara 
AuthorDate: Fri May 31 18:02:58 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Aug 17 16:36:44 2019 +0200

Auto redaction dialog second iteration

* Add the Add handler
* Add SfxAddTargetDialog dialog
* Add the Delete handler

Change-Id: I9c466754f6b593ffe3c8a1cc8034bbe47674f591
Reviewed-on: https://gerrit.libreoffice.org/73285
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/77159
Tested-by: Muhammet Kara 

diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk
index 29e493e9f46f..5318f2228d98 100644
--- a/sfx2/UIConfig_sfx.mk
+++ b/sfx2/UIConfig_sfx.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_UIConfig_UIConfig,sfx))
 
 $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/alienwarndialog \
+   sfx2/uiconfig/ui/addtargetdialog \
sfx2/uiconfig/ui/autoredactdialog \
sfx2/uiconfig/ui/bookmarkdialog \
sfx2/uiconfig/ui/bookmarkmenu \
diff --git a/include/sfx2/autoredactdialog.hxx b/sfx2/inc/autoredactdialog.hxx
similarity index 65%
rename from include/sfx2/autoredactdialog.hxx
rename to sfx2/inc/autoredactdialog.hxx
index 8de264871154..26b29bf10cf5 100644
--- a/include/sfx2/autoredactdialog.hxx
+++ b/sfx2/inc/autoredactdialog.hxx
@@ -7,8 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_SFX2_AUTOREDACTDIALOG_HXX
-#define INCLUDED_SFX2_AUTOREDACTDIALOG_HXX
+#ifndef INCLUDED_SFX2_INC_AUTOREDACTDIALOG_HXX
+#define INCLUDED_SFX2_INC_AUTOREDACTDIALOG_HXX
 
 #include 
 #include 
@@ -25,6 +25,10 @@ class Button;
 }
 namespace weld
 {
+class ComboBox;
+}
+namespace weld
+{
 class Label;
 }
 namespace weld
@@ -36,16 +40,26 @@ namespace weld
 class TreeView;
 }
 
+enum RedactionTargetType
+{
+REDACTION_TARGET_TEXT,
+REDACTION_TARGET_REGEX,
+REDACTION_TARGET_PREDEFINED,
+REDACTION_TARGET_UNKNOWN
+};
+
+/// Keeps information for a single redaction target
 struct RedactionTarget
 {
-sal_uInt32 nID;
 OUString sName;
-OUString sType;
+RedactionTargetType sType;
+OUString sContent;
 bool bCaseSensitive;
 bool bWholeWords;
-OUString sDescription;
+sal_uInt32 nID;
 };
 
+/// Used to display the targets list
 class TargetsTable
 {
 std::unique_ptr m_xControl;
@@ -75,7 +89,7 @@ public:
 class SFX2_DLLPUBLIC SfxAutoRedactDialog : public SfxDialogController
 {
 SfxObjectShellLock m_xDocShell;
-std::vector> m_aTableTargets;
+std::vector> m_aTableTargets;
 
 std::unique_ptr m_xRedactionTargetsLabel;
 std::unique_ptr m_xTargetsBox;
@@ -85,6 +99,12 @@ class SFX2_DLLPUBLIC SfxAutoRedactDialog : public 
SfxDialogController
 std::unique_ptr m_xEditBtn;
 std::unique_ptr m_xDeleteBtn;
 
+/*DECL_LINK(LoadHdl, weld::Button&, void);
+DECL_LINK(SaveHdl, weld::Button&, void);*/
+DECL_LINK(AddHdl, weld::Button&, void);
+//DECL_LINK(EditHdl, weld::Button&, void);
+DECL_LINK(DeleteHdl, weld::Button&, void);
+
 public:
 SfxAutoRedactDialog(weld::Window* pParent);
 virtual ~SfxAutoRedactDialog() override;
@@ -99,6 +119,28 @@ public:
 // TODO: Some method(s) to load/save redaction target sets
 };
 
+class SfxAddTargetDialog : public weld::GenericDialogController
+{
+private:
+std::unique_ptr m_xName;
+std::unique_ptr m_xType;
+std::unique_ptr m_xContent;
+std::unique_ptr m_xCaseSensitive;
+std::unique_ptr m_xWholeWords;
+
+public:
+SfxAddTargetDialog(weld::Window* pWindow, const OUString& rName);
+
+OUString getName() const { return m_xName->get_text(); }
+RedactionTargetType getType() const;
+OUString getContent() const { return m_xContent->get_text(); }
+bool isCaseSensitive() const
+{
+return m_xCaseSensitive->get_state() == TriState::TRISTATE_TRUE;
+}
+bool isWholeWords() const { return m_xWholeWords->get_state() == 
TriState::TRISTATE_TRUE; }
+};
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sfx2/source/doc/autoredactdialog.cxx 
b/sfx2/source/doc/autoredactdialog.cxx
index 0974a4f03b27..5d94906e9ba8 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -8,7 +8,7 @@
  */
 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -50,17 +50,43 @@ int TargetsTable::GetRowByTargetName(const OUString& sName)
 TargetsTable::TargetsTable(std::unique_ptr xControl)
 : m_xControl(std::move(xControl))

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - include/sfx2 officecfg/registry sfx2/Library_sfx.mk sfx2/sdi sfx2/source sfx2/uiconfig sfx2/UIConfig_sfx.mk

2019-08-17 Thread Muhammet Kara (via logerrit)
 include/sfx2/autoredactdialog.hxx|  104 +++
 include/sfx2/sfxsids.hrc |3 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |   14 
 sfx2/Library_sfx.mk  |1 
 sfx2/UIConfig_sfx.mk |1 
 sfx2/sdi/docslots.sdi|5 
 sfx2/sdi/sfx.sdi |   17 
 sfx2/source/appl/appuno.cxx  |5 
 sfx2/source/doc/autoredactdialog.cxx |  181 
+
 sfx2/source/doc/objserv.cxx  |   19 
 sfx2/uiconfig/ui/autoredactdialog.ui |  339 
++
 11 files changed, 686 insertions(+), 3 deletions(-)

New commits:
commit 2a97d38fbf89ef6f17452fa9d93c2d6fb062f233
Author: Muhammet Kara 
AuthorDate: Mon May 27 17:44:10 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Aug 17 16:36:20 2019 +0200

Auto redaction dialog first iteration

* Add the uno command .uno:AutoRedact with the name 'Auto-Redact'
* Add the dialog SfxAutoRedactDialog
* Implement the basic functionality to show up when clicked on the
  menu/toolbar item.
* Add the class TargetsTable to control the weld::TreeView
  which is used to list the targets
* Add the struct RedactionTarget to keep info for individual targets

Change-Id: Ic02dfb009590c0928a2ea7b0f8b19b4febca221a
Reviewed-on: https://gerrit.libreoffice.org/72254
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/77158
Tested-by: Muhammet Kara 

diff --git a/include/sfx2/autoredactdialog.hxx 
b/include/sfx2/autoredactdialog.hxx
new file mode 100644
index ..8de264871154
--- /dev/null
+++ b/include/sfx2/autoredactdialog.hxx
@@ -0,0 +1,104 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#ifndef INCLUDED_SFX2_AUTOREDACTDIALOG_HXX
+#define INCLUDED_SFX2_AUTOREDACTDIALOG_HXX
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+namespace weld
+{
+class Button;
+}
+namespace weld
+{
+class Label;
+}
+namespace weld
+{
+class Window;
+}
+namespace weld
+{
+class TreeView;
+}
+
+struct RedactionTarget
+{
+sal_uInt32 nID;
+OUString sName;
+OUString sType;
+bool bCaseSensitive;
+bool bWholeWords;
+OUString sDescription;
+};
+
+class TargetsTable
+{
+std::unique_ptr m_xControl;
+int GetRowByTargetName(const OUString& sName);
+
+public:
+TargetsTable(std::unique_ptr xControl);
+void InsertTarget(RedactionTarget* pTarget);
+void SelectByName(const OUString& sName);
+RedactionTarget* GetTargetByName(const OUString& sName);
+OUString GetNameProposal();
+
+void unselect_all() { m_xControl->unselect_all(); }
+bool has_focus() const { return m_xControl->has_focus(); }
+int n_children() const { return m_xControl->n_children(); }
+int get_selected_index() const { return m_xControl->get_selected_index(); }
+std::vector get_selected_rows() const { return 
m_xControl->get_selected_rows(); }
+void clear() { m_xControl->clear(); }
+void remove(int nRow) { m_xControl->remove(nRow); }
+void select(int nRow) { m_xControl->select(nRow); }
+OUString get_id(int nRow) const { return m_xControl->get_id(nRow); }
+
+//void connect_changed(const Link& rLink) { 
m_xControl->connect_changed(rLink); }
+//void connect_row_activated(const Link& rLink) { 
m_xControl->connect_row_activated(rLink); }
+};
+
+class SFX2_DLLPUBLIC SfxAutoRedactDialog : public SfxDialogController
+{
+SfxObjectShellLock m_xDocShell;
+std::vector> m_aTableTargets;
+
+std::unique_ptr m_xRedactionTargetsLabel;
+std::unique_ptr m_xTargetsBox;
+std::unique_ptr m_xLoadBtn;
+std::unique_ptr m_xSaveBtn;
+std::unique_ptr m_xAddBtn;
+std::unique_ptr m_xEditBtn;
+std::unique_ptr m_xDeleteBtn;
+
+public:
+SfxAutoRedactDialog(weld::Window* pParent);
+virtual ~SfxAutoRedactDialog() override;
+
+/*
+ * Check if the dialog has any valid redaction targets.
+ */
+bool hasTargets() const;
+
+// TODO: Some method(s) to check emptiness/validity
+// TODO: Some method(s) to get the search params/objects
+// TODO: Some method(s) to load/save redaction target sets
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsi

[Libreoffice-commits] core.git: chart2/source dbaccess/source extensions/source include/svtools include/vcl solenv/clang-format svtools/Library_svt.mk svtools/source sw/source vcl/inc vcl/Library_vcl.

2019-08-17 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/dialogs/dlg_CreationWizard.cxx |4 
 chart2/source/controller/inc/dlg_CreationWizard.hxx |4 
 dbaccess/source/ext/macromigration/macromigrationdialog.hxx |4 
 dbaccess/source/ext/macromigration/macromigrationpages.cxx  |8 -
 dbaccess/source/ext/macromigration/macromigrationpages.hxx  |   10 +-
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx   |2 
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx   |2 
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx |2 
 dbaccess/source/ui/dlg/TextConnectionHelper.hxx |2 
 dbaccess/source/ui/dlg/dbwizsetup.cxx   |   14 +-
 dbaccess/source/ui/inc/dbwizsetup.hxx   |6 -
 extensions/source/abpilot/abspilot.hxx  |4 
 include/svtools/strings.hrc |2 
 include/vcl/roadmapwizard.hxx   |   19 +--
 solenv/clang-format/blacklist   |4 
 svtools/Library_svt.mk  |1 
 svtools/source/uno/wizard/wizardshell.hxx   |4 
 sw/source/ui/dbui/mailmergewizard.cxx   |2 
 sw/source/uibase/inc/mailmergewizard.hxx|8 -
 vcl/Library_vcl.mk  |1 
 vcl/inc/strings.hrc |1 
 vcl/source/control/roadmapwizard.cxx|   59 +---
 22 files changed, 80 insertions(+), 83 deletions(-)

New commits:
commit 07083030e3f6f6b1ab1b91bdb1f8a0ea72361396
Author: Caolán McNamara 
AuthorDate: Sat Aug 3 20:31:00 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sat Aug 17 16:31:30 2019 +0200

move RoadmapWizard to vcl

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

diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx 
b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index a0a352f0d6bd..db54937be38c 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -47,7 +47,7 @@ namespace chart
 
 CreationWizard::CreationWizard(vcl::Window* pParent, const 
uno::Reference& xChartModel,
const uno::Reference& 
xContext)
-: svt::RoadmapWizard(pParent)
+: vcl::RoadmapWizard(pParent)
 , m_xChartModel(xChartModel,uno::UNO_QUERY)
 , m_xComponentContext(xContext)
 , m_pTemplateProvider(nullptr)
@@ -153,7 +153,7 @@ void CreationWizard::enterState(WizardState nState)
 enableButtons( WizardButtonFlags::PREVIOUS, nState > STATE_FIRST );
 enableButtons( WizardButtonFlags::NEXT, nState < STATE_LAST );
 if( isStateEnabled( nState ))
-svt::RoadmapWizard::enterState(nState);
+vcl::RoadmapWizard::enterState(nState);
 }
 
 void CreationWizard::setInvalidPage( TabPage * /* pTabPage */ )
diff --git a/chart2/source/controller/inc/dlg_CreationWizard.hxx 
b/chart2/source/controller/inc/dlg_CreationWizard.hxx
index b9ddfef66896..0f05f6243f14 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard.hxx
@@ -23,7 +23,7 @@
 #include "TimerTriggeredControllerLock.hxx"
 #include "TabPageNotifiable.hxx"
 
-#include 
+#include 
 
 #include 
 
@@ -36,7 +36,7 @@ namespace chart
 class DialogModel;
 class ChartTypeTemplateProvider;
 
-class CreationWizard : public svt::RoadmapWizard, public TabPageNotifiable
+class CreationWizard : public vcl::RoadmapWizard, public TabPageNotifiable
 {
 public:
 CreationWizard(vcl::Window* pParent,
diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx 
b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx
index f86e6d320e6f..60d04bad4c1e 100644
--- a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx
+++ b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx
@@ -23,7 +23,7 @@
 #include 
 #include 
 
-#include 
+#include 
 
 #include 
 
@@ -32,7 +32,7 @@ namespace dbmm
 
 // MacroMigrationDialog
 struct MacroMigrationDialog_Data;
-typedef ::svt::RoadmapWizardMacroMigrationDialog_Base;
+typedef ::vcl::RoadmapWizardMacroMigrationDialog_Base;
 class MacroMigrationDialog : public MacroMigrationDialog_Base
 {
 public:
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx 
b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
index 7c17ac5f19f8..3820a688ba1e 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
@@ -69,7 +69,7 @@ namespace dbmm
 m_pCloseDocError->Show( _bShow );
 }
 
-VclPtr

[Libreoffice-commits] core.git: connectivity/source dbaccess/source extensions/source forms/source include/connectivity reportdesign/source svx/source

2019-08-17 Thread Caolán McNamara (via logerrit)
 connectivity/source/commontools/dbtools.cxx   |   54 +-
 connectivity/source/commontools/parameters.cxx|4 -
 dbaccess/source/core/api/RowSet.cxx   |2 
 dbaccess/source/core/dataaccess/datasource.cxx|   42 --
 dbaccess/source/core/dataaccess/datasource.hxx|6 +-
 dbaccess/source/core/inc/ModelImpl.hxx|4 +
 dbaccess/source/ui/browser/sbagrid.cxx|2 
 dbaccess/source/ui/uno/composerdialogs.cxx|2 
 extensions/source/dbpilots/controlwizard.cxx  |2 
 extensions/source/propctrlr/formcomponenthandler.cxx  |4 -
 extensions/source/propctrlr/formlinkdialog.cxx|4 -
 forms/source/component/DatabaseForm.cxx   |   23 +++
 include/connectivity/dbtools.hxx  |   12 ++--
 reportdesign/source/ui/inspection/GeometryHandler.cxx |2 
 svx/source/fmcomp/fmgridcl.cxx|2 
 svx/source/form/fmvwimp.cxx   |3 -
 svx/source/form/tabwin.cxx|2 
 17 files changed, 118 insertions(+), 52 deletions(-)

New commits:
commit d30ab819b80e67119e17d3e4243cab88c508ebae
Author: Caolán McNamara 
AuthorDate: Fri Aug 16 20:23:50 2019 +0100
Commit: Caolán McNamara 
CommitDate: Sat Aug 17 16:31:11 2019 +0200

tdf#125340 transport preferred dialog parent down the migration dialog

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

diff --git a/connectivity/source/commontools/dbtools.cxx 
b/connectivity/source/commontools/dbtools.cxx
index d760a16a7fc6..75df94ec8ea1 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -22,12 +22,14 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -265,12 +267,25 @@ static Reference< XConnection > 
getConnection_allowException(
 const OUString& _rsTitleOrPath,
 const OUString& _rsUser,
 const OUString& _rsPwd,
-const Reference< XComponentContext>& _rxContext)
+const Reference< XComponentContext>& _rxContext,
+const Reference< XWindow >& _rxParent)
 {
 Reference< XDataSource> xDataSource( 
getDataSource_allowException(_rsTitleOrPath, _rxContext) );
 Reference xConnection;
 if (xDataSource.is())
 {
+
+//set ParentWindow for dialog, but just for the duration of this
+//call, undo at end of scope
+Reference xIni(xDataSource, UNO_QUERY);
+if (xIni.is())
+{
+Sequence< Any > aArgs(1);
+NamedValue aParam( "ParentWindow", makeAny(_rxParent) );
+aArgs[0] <<= aParam;
+xIni->initialize(aArgs);
+}
+
 // do it with interaction handler
 if(_rsUser.isEmpty() || _rsPwd.isEmpty())
 {
@@ -293,7 +308,7 @@ static Reference< XConnection > 
getConnection_allowException(
 if (xConnectionCompletion.is())
 {   // instantiate the default SDB interaction handler
 Reference< XInteractionHandler > xHandler =
-InteractionHandler::createWithParent(_rxContext, 
nullptr);
+InteractionHandler::createWithParent(_rxContext, 
_rxParent);
 xConnection = 
xConnectionCompletion->connectWithCompletion(xHandler);
 }
 }
@@ -302,17 +317,27 @@ static Reference< XConnection > 
getConnection_allowException(
 }
 if(!xConnection.is()) // try to get one if not already have one, just 
to make sure
 xConnection = xDataSource->getConnection(_rsUser, _rsPwd);
+
+if (xIni.is())
+{
+Sequence< Any > aArgs(1);
+NamedValue aParam( "ParentWindow", makeAny(Reference()) );
+aArgs[0] <<= aParam;
+xIni->initialize(aArgs);
+}
+
 }
 return xConnection;
 }
 
 Reference< XConnection> getConnection_withFeedback(const OUString& 
_rDataSourceName,
-const OUString& _rUser, const OUString& _rPwd, const Reference< 
XComponentContext>& _rxContext)
+const OUString& _rUser, const OUString& _rPwd, const Reference< 
XComponentContext>& _rxContext,
+const Reference< XWindow >& _rxParent)
 {
 Reference< XConnection > xReturn;
 try
 {
-xReturn = getConnection_allowException(_rDataSourceName, _rUser, 
_rPwd, _rxContext);
+xReturn = getConnection_allowException(_rDataSourceName, _rUser, 
_rPwd, _rxContext, _rxParent);
 }
 catch(SQLException&)
 {
@@ -339,7 +364,7 @@ Reference< XConnection> getConnection(const Reference< 
XRowSet>& _rxRowSet)
 // if connectRowset (which is deprecate

[Libreoffice-commits] core.git: wizards/source

2019-08-17 Thread Jean-Pierre Ledure (via logerrit)
 wizards/source/access2base/access2base.py |   21 +++--
 1 file changed, 15 insertions(+), 6 deletions(-)

New commits:
commit cd963fe2f8607dc829a529adfe3a8a7464835070
Author: Jean-Pierre Ledure 
AuthorDate: Sat Aug 17 16:15:00 2019 +0200
Commit: Jean-Pierre Ledure 
CommitDate: Sat Aug 17 16:15:00 2019 +0200

Access2Base - access2base.py fix module class

Properties changed to methods when having arguments
Methods Find and ProcOfLine not supported
because they require passing arguments by reference
(not available in Python)

Change-Id: I92044e8ea4a07e2093b23699bf28b9d1ac0fe695

diff --git a/wizards/source/access2base/access2base.py 
b/wizards/source/access2base/access2base.py
index c3f20a479dda..b831fcd4efca 100644
--- a/wizards/source/access2base/access2base.py
+++ b/wizards/source/access2base/access2base.py
@@ -1322,15 +1322,24 @@ class _Form(_BasicObject):
 
 
 class _Module(_BasicObject):
-classProperties = dict(CountOfDeclarationLines = False, CountOfLines = 
False, Lines = False
-, ProcBodyLine = False, ProcCountLines = False, 
ProcOfLine = False, ProcStartLine = False
-, Type = False
+classProperties = dict(CountOfDeclarationLines = False, CountOfLines = 
False
+, ProcStartLine = False, Type = False
 )
 
-def Find(self, target, startline, startcolumn, endline, endcolumn, 
wholeword = False
+""" def Find(self, target, startline, startcolumn, endline, endcolumn, 
wholeword = False
 , matchcase = False, patternsearch = False):
 return self.W(_vbMethod, self.objectreference, 'Find', target, 
startline, startcolumn, endline
-  , endcolumn, wholeword, matchcase, patternsearch)
+  , endcolumn, wholeword, matchcase, patternsearch) """
+def Lines(self, line, numlines):
+return self.W(_vbMethod, self.objectreference, 'Lines', line, numlines)
+def ProcBodyLine(self, procname, prockind):
+return self.W(_vbMethod, self.objectreference, 'ProcBodyLine', 
procname, prockind)
+def ProcCountLines(self, procname, prockind):
+return self.W(_vbMethod, self.objectreference, 'ProcCountLines', 
procname, prockind)
+""" def ProcOfLine(self, line, prockind):
+return self.W(_vbMethod, self.objectreference, 'ProcOfLine', line, 
prockind) """
+def ProcStartLine(self, procname, prockind):
+return self.W(_vbMethod, self.objectreference, 'ProcStartLine', 
procname, prockind)
 
 
 class _OptionGroup(_BasicObject):
@@ -1435,7 +1444,7 @@ Set of directly callable error handling methods
 def DebugPrint(*args):
 dargs = ()
 for arg in args:
-if isinstance(arg, _BasicObject): arg = '[OBJECT]'
+if isinstance(arg, _BasicObject): arg = '[' + arg.objecttype + ']'
 dargs = dargs + (arg,)
 return _A2B.invokeMethod('DebugPrint', _WRAPPERMODULE, *dargs)
 def TraceConsole(): return _A2B.invokeMethod('TraceConsole', 'Trace')
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[ANN] libabw 0.1.3 has been released

2019-08-17 Thread David Tardon
libabw is a library for import of Abiword documents.

List of changes:

- Fix a memory access error found by oss-fuzz.
- Configure with --disable-werror by default.
- Disable expanding entities by XML parser as a vulnerability
  prevention measure. Abiword-saved documents do not contain entities,
  so there is no difference in behavior.

Home page: https://wiki.documentfoundation.org/DLP/Libraries/libabw
Download from: http://dev-www.libreoffice.org/src/libabw/

Note: As an experiment, only xz-compressed tarball has been uploaded.
If there is anyone who still needs gzip- or bzip2-compressed tarballs,
please let me know and I will upload them too.

D.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[ANN] libvisio 0.1.7 has been released

2019-08-17 Thread David Tardon
libvisio is a library for import of MS Visio documents.

List of changes:

- Fix a few memory leaks found by oss-fuzz.
- Fix date and time conversion to string. (tdf#98291)
- Fix number conversion to string. (tdf#76829)
- Fix unit conversion. (tdf#126292)
- Handle more arrow styles. (tdf#126402)
- Fix some issues found by Coverity.
- Disable expanding entities by XML parser as a vulnerability 
  prevention measure. Applications writing VSDX/VDX documents do not use
  entities, so there is no difference in behavior.

Home page: https://wiki.documentfoundation.org/DLP/Libraries/libvisio
Download from: http://dev-www.libreoffice.org/src/libvisio/

Note: As an experiment, only xz-compressed tarball has been uploaded.
If there is anyone who still needs gzip- or bzip2-compressed tarballs,
please let me know and I will upload them too.

D.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Libreoffice-commits] libvisio.git: Changes to 'refs/tags/libvisio-0.1.7'

2019-08-17 Thread Libreoffice Gerrit user
Tag 'libvisio-0.1.7' created by David Tardon  at 2019-08-17 
13:29 +

New contributor and new features!

Changes since libvisio-0.1.6-62:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] libvisio.git: 4 commits - configure.ac NEWS src/test

2019-08-17 Thread Libreoffice Gerrit user
 NEWS |   12 
 configure.ac |2 +-
 src/test/Makefile.am |   13 ++---
 3 files changed, 23 insertions(+), 4 deletions(-)

New commits:
commit 55d69d625abb0506160e1e5aedb902e550604ab0
Author: David Tardon 
AuthorDate: Sat Aug 17 15:31:21 2019 +0200
Commit: David Tardon 
CommitDate: Sat Aug 17 15:31:21 2019 +0200

bump release

Change-Id: I1656c0a2bb5bbc44e434d89eeb7b40c89b5e3e0b

diff --git a/configure.ac b/configure.ac
index f5e476c..0dc29d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,7 +7,7 @@ AC_PREREQ([2.65])
 # 
 m4_define([libvisio_version_major],[0])
 m4_define([libvisio_version_minor],[1])
-m4_define([libvisio_version_micro],[7])
+m4_define([libvisio_version_micro],[8])
 
m4_define([libvisio_version],[libvisio_version_major.libvisio_version_minor.libvisio_version_micro])
 
 # =
commit 0dd9d58e8f69061db4f073933f5f96ed32939a71
Author: David Tardon 
AuthorDate: Sat Aug 17 15:29:46 2019 +0200
Commit: David Tardon 
CommitDate: Sat Aug 17 15:29:46 2019 +0200

distribute new test files

Change-Id: I87e0b4e921605a462b116c2820b2a7d55bbb5448

diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index 47092ce..a546396 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -47,6 +47,11 @@ unittest_SOURCES = \
VSDInternalStreamTest.cpp
 
 EXTRA_DIST = \
+   data/Visio11FormatLine.vsd \
+   data/Visio11TextFieldsWithCurrency.vsd \
+   data/Visio11TextFieldsWithUnits.vsd \
+   data/Visio5TextFieldsWithUnits.vsd \
+   data/Visio6TextFieldsWithUnits.vsd \
data/bgcolor.vsdx \
data/bitmaps.vsd \
data/bitmaps2.vsd \
@@ -56,7 +61,9 @@ EXTRA_DIST = \
data/fdo86664.vsdx \
data/fdo86729-ms1252.vsd \
data/fdo86729-utf8.vsd \
-   data/no-bgcolor.vsd
+   data/no-bgcolor.vsd \
+   data/tdf76829-datetime-format.vsd \
+   data/tdf76829-numeric-format.vsd
 
 # ImportTest::testVsdMetadataTitleUtf8 checks formatted date string
 AM_TESTS_ENVIRONMENT = TZ=UTC; export TZ;
commit fc10bd1c08ce8185865268cbedebdae0b0dc5d61
Author: David Tardon 
AuthorDate: Sat Aug 17 15:29:14 2019 +0200
Commit: David Tardon 
CommitDate: Sat Aug 17 15:29:14 2019 +0200

keep the file list sorted

Change-Id: I072ae492e3ecc538d78ac071793042c77321b708

diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index 6015f4e..47092ce 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -51,11 +51,11 @@ EXTRA_DIST = \
data/bitmaps.vsd \
data/bitmaps2.vsd \
data/color-boxes.vsdx \
+   data/dwg.vsd \
+   data/dwg.vsdx \
data/fdo86664.vsdx \
data/fdo86729-ms1252.vsd \
data/fdo86729-utf8.vsd \
-   data/dwg.vsd \
-   data/dwg.vsdx \
data/no-bgcolor.vsd
 
 # ImportTest::testVsdMetadataTitleUtf8 checks formatted date string
commit e22c55d8ead89bf4ba2f37629c021f9f9ff74fa7
Author: David Tardon 
AuthorDate: Sat Aug 17 15:10:12 2019 +0200
Commit: David Tardon 
CommitDate: Sat Aug 17 15:22:00 2019 +0200

prepare for a release

Change-Id: I660d3ccee41ef7fedf24819831cd56460cacba64

diff --git a/NEWS b/NEWS
index 27bbb03..f8bde52 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,15 @@
+libvisio 0.1.7
+
+- Fix a few memory leaks found by oss-fuzz.
+- Fix date and time conversion to string. (tdf#98291)
+- Fix number conversion to string. (tdf#76829)
+- Fix unit conversion. (tdf#126292)
+- Handle more arrow styles. (tdf#126402)
+- Fix some issues found by Coverity.
+- Disable expanding entities by XML parser as a vulnerability
+  prevention measure. Applications writing VSDX/VDX documents do not use
+  entities, so there is no difference in behavior.
+
 libvisio 0.1.6
 
 - Consider stencil txtxform in binary formats (tdf#67914).
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: comphelper/source

2019-08-17 Thread Julien Nabet (via logerrit)
 comphelper/source/compare/AnyCompareFactory.cxx|4 +---
 comphelper/source/container/IndexedPropertyValuesContainer.cxx |4 +---
 comphelper/source/container/NamedPropertyValuesContainer.cxx   |4 +---
 comphelper/source/misc/instancelocker.cxx  |3 +--
 4 files changed, 4 insertions(+), 11 deletions(-)

New commits:
commit e01949e9c56c1605a4eccbae285f85d1b3085e15
Author: Julien Nabet 
AuthorDate: Sat Aug 17 12:18:30 2019 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 17 15:26:15 2019 +0200

tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor

in comphelper

Change-Id: I4d9b9e13801ebf7671ff651b931a6c4144860985
Reviewed-on: https://gerrit.libreoffice.org/77626
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/comphelper/source/compare/AnyCompareFactory.cxx 
b/comphelper/source/compare/AnyCompareFactory.cxx
index a912bb62e156..e4cec19feeed 100644
--- a/comphelper/source/compare/AnyCompareFactory.cxx
+++ b/comphelper/source/compare/AnyCompareFactory.cxx
@@ -118,9 +118,7 @@ sal_Bool SAL_CALL AnyCompareFactory::supportsService( const 
OUString& ServiceNam
 
 Sequence< OUString > SAL_CALL AnyCompareFactory::getSupportedServiceNames(  )
 {
-const OUString aServiceName( "com.sun.star.ucb.AnyCompareFactory" );
-const Sequence< OUString > aSeq( &aServiceName, 1 );
-return aSeq;
+return { "com.sun.star.ucb.AnyCompareFactory" };
 }
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
diff --git a/comphelper/source/container/IndexedPropertyValuesContainer.cxx 
b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
index 7455831214ca..0053cc8e4374 100644
--- a/comphelper/source/container/IndexedPropertyValuesContainer.cxx
+++ b/comphelper/source/container/IndexedPropertyValuesContainer.cxx
@@ -143,9 +143,7 @@ sal_Bool SAL_CALL 
IndexedPropertyValuesContainer::supportsService( const OUStrin
 
 css::uno::Sequence< OUString > SAL_CALL 
IndexedPropertyValuesContainer::getSupportedServiceNames(  )
 {
-const OUString aServiceName( "com.sun.star.document.IndexedPropertyValues" 
);
-const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
-return aSeq;
+return { "com.sun.star.document.IndexedPropertyValues" };
 }
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
diff --git a/comphelper/source/container/NamedPropertyValuesContainer.cxx 
b/comphelper/source/container/NamedPropertyValuesContainer.cxx
index 5cc30b1cf954..13b8f855866f 100644
--- a/comphelper/source/container/NamedPropertyValuesContainer.cxx
+++ b/comphelper/source/container/NamedPropertyValuesContainer.cxx
@@ -151,9 +151,7 @@ sal_Bool SAL_CALL 
NamedPropertyValuesContainer::supportsService( const OUString&
 
 css::uno::Sequence< OUString > SAL_CALL 
NamedPropertyValuesContainer::getSupportedServiceNames(  )
 {
-const OUString aServiceName( "com.sun.star.document.NamedPropertyValues" );
-const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
-return aSeq;
+return { "com.sun.star.document.NamedPropertyValues" };
 }
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
diff --git a/comphelper/source/misc/instancelocker.cxx 
b/comphelper/source/misc/instancelocker.cxx
index 31e55c20a6e0..ad581840d01d 100644
--- a/comphelper/source/misc/instancelocker.cxx
+++ b/comphelper/source/misc/instancelocker.cxx
@@ -186,8 +186,7 @@ sal_Bool SAL_CALL OInstanceLocker::supportsService( const 
OUString& ServiceName
 
 uno::Sequence< OUString > SAL_CALL OInstanceLocker::getSupportedServiceNames()
 {
-const OUString aServiceName( "com.sun.star.embed.InstanceLocker" );
-return uno::Sequence< OUString >( &aServiceName, 1 );
+return { "com.sun.star.embed.InstanceLocker" };
 }
 
 // OLockListener
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: helpcontent2

2019-08-17 Thread LibreOfficiant (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 33e275dca79862cd22c4fafea6701ba9b1641786
Author: LibreOfficiant 
AuthorDate: Fri Aug 16 17:02:35 2019 +0200
Commit: Gerrit Code Review 
CommitDate: Sat Aug 17 15:00:43 2019 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  - Python console examples work better this way

Change-Id: I0c325b7fed727f398c11eea41d7c46a061c3a837
Reviewed-on: https://gerrit.libreoffice.org/77598
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index f8fc25c07207..1e20b35158b2 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit f8fc25c072077221556b06ac8f60c4b679dd35f2
+Subproject commit 1e20b35158b23e9737ea3688531c8780ae481ee3
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] help.git: source/text

2019-08-17 Thread LibreOfficiant (via logerrit)
 source/text/sbasic/python/python_screen.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1e20b35158b23e9737ea3688531c8780ae481ee3
Author: LibreOfficiant 
AuthorDate: Fri Aug 16 17:02:35 2019 +0200
Commit: Olivier Hallot 
CommitDate: Sat Aug 17 15:00:43 2019 +0200

Python console examples work better this way

Change-Id: I0c325b7fed727f398c11eea41d7c46a061c3a837
Reviewed-on: https://gerrit.libreoffice.org/77598
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/sbasic/python/python_screen.xhp 
b/source/text/sbasic/python/python_screen.xhp
index ed5591711..b88fa923a 100644
--- a/source/text/sbasic/python/python_screen.xhp
+++ b/source/text/sbasic/python/python_screen.xhp
@@ -32,7 +32,7 @@
 Print(txt)
 Examples:
 >>> import screen_io as ui
->>> reply = ui.InputBox('Please enter a 
phrase', title='Dear user', 
default="here..")
+>>> reply = ui.InputBox('Please enter a 
phrase', title='Dear user', 
defaultValue="here..")
 >>> rc = ui.MsgBox(reply, title="Confirmation 
of phrase")
 >>> age = ui.InputBox('How old are 
you?', title="Hi")
 >>> ui.Print(age)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/clang desktop/source include/svtools

2019-08-17 Thread Noel Grandin (via logerrit)
 compilerplugins/clang/unnecessaryvirtual-dead.results |   16 +--
 compilerplugins/clang/unnecessaryvirtual.results  |   84 +-
 desktop/source/deployment/gui/dp_gui_extlistbox.hxx   |4 
 include/svtools/simptabl.hxx  |2 
 4 files changed, 56 insertions(+), 50 deletions(-)

New commits:
commit 0e0fb5eaae14d7077c1bdce5bf45e50ed07bcd11
Author: Noel Grandin 
AuthorDate: Sat Aug 17 08:48:51 2019 +0200
Commit: Noel Grandin 
CommitDate: Sat Aug 17 14:18:13 2019 +0200

loplugin:unnecessaryvirtual

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

diff --git a/compilerplugins/clang/unnecessaryvirtual-dead.results 
b/compilerplugins/clang/unnecessaryvirtual-dead.results
index 29f7436169ff..7551aaea3325 100644
--- a/compilerplugins/clang/unnecessaryvirtual-dead.results
+++ b/compilerplugins/clang/unnecessaryvirtual-dead.results
@@ -4,25 +4,23 @@ include/basegfx/utils/unopolypolygon.hxx:97
 void basegfx::unotools::UnoPolyPolygon::modifying()const
 include/canvas/base/bufferedgraphicdevicebase.hxx:108
 void canvas::BufferedGraphicDeviceBase::destroyBuffers()
-include/canvas/base/graphicdevicebase.hxx:300
+include/canvas/base/graphicdevicebase.hxx:306
 void canvas::GraphicDeviceBase::removePropertyChangeListener(const class 
rtl::OUString &,const class com::sun::star::uno::Reference &,)
-include/canvas/base/graphicdevicebase.hxx:313
+include/canvas/base/graphicdevicebase.hxx:319
 void canvas::GraphicDeviceBase::removeVetoableChangeListener(const class 
rtl::OUString &,const class com::sun::star::uno::Reference &,)
-sc/source/core/opencl/formulagroupcl.cxx:1061
+sc/source/core/opencl/formulagroupcl.cxx:1059
 void 
sc::opencl::DynamicKernelSlidingArgument::GenSlidingWindowFunction(class 
std::__cxx11::basic_stringstream &,)
 slideshow/source/engine/animationfactory.cxx:443
 void slideshow::internal::(anonymous 
namespace)::GenericAnimation::prefetch(const class std::shared_ptr &,const class std::shared_ptr &,)
-vcl/inc/salframe.hxx:144
+vcl/inc/salframe.hxx:145
 void SalFrame::SetRepresentedURL(const class rtl::OUString &,)
-vcl/inc/salmenu.hxx:71
-void SalMenu::SetItemBits(unsigned int,enum MenuItemBits,)
 vcl/inc/salmenu.hxx:81
 void SalMenu::RemoveMenuBarButton(unsigned short,)
-vcl/inc/salobj.hxx:48
+vcl/inc/salobj.hxx:49
 void SalObject::Enable(_Bool,)
-vcl/inc/unx/saldata.hxx:68
+vcl/inc/unx/saldata.hxx:54
 void X11SalData::initNWF()
-vcl/inc/unx/saldata.hxx:69
+vcl/inc/unx/saldata.hxx:55
 void X11SalData::deInitNWF()
 writerfilter/source/ooxml/OOXMLFactory.hxx:72
 void writerfilter::ooxml::OOXMLFactory_ns::startAction(class 
writerfilter::ooxml::OOXMLFastContextHandler *,)
diff --git a/compilerplugins/clang/unnecessaryvirtual.results 
b/compilerplugins/clang/unnecessaryvirtual.results
index 054f950a361b..cde0a75285f8 100644
--- a/compilerplugins/clang/unnecessaryvirtual.results
+++ b/compilerplugins/clang/unnecessaryvirtual.results
@@ -20,6 +20,10 @@ basic/source/comp/codegen.cxx:526
 _Bool BufferTransformer::processParams()
 chart2/source/inc/WeakListenerAdapter.hxx:57
 void chart::WeakListenerAdapter::disposing(const struct 
com::sun::star::lang::EventObject &,)
+desktop/source/deployment/gui/dp_gui_extlistbox.hxx:200
+int dp_gui::ExtensionBox_Impl::getItemCount()const
+desktop/source/deployment/gui/dp_gui_extlistbox.hxx:208
+int dp_gui::ExtensionBox_Impl::getSelIndex()const
 extensions/source/dbpilots/unoautopilot.hxx:99
 class cppu::IPropertyArrayHelper * 
dbp::OUnoAutoPilot::createArrayHelper()const
 extensions/source/propctrlr/commoncontrol.hxx:127
@@ -72,8 +76,6 @@ include/comphelper/unique_disposing_ptr.hxx:169
 void 
comphelper::unique_disposing_solar_mutex_reset_ptr::reset(type-parameter-0-0 *,)
 include/comphelper/weakeventlistener.hxx:119
 void comphelper::OWeakListenerAdapter::disposing(const struct 
com::sun::star::lang::EventObject &,)
-include/sfx2/basedlgs.hxx:91
-void SfxModelessDialog::FillInfo(struct SfxChildWinInfo &,)const
 include/svl/svdde.hxx:237
 class DdeData * DdeTopic::Get(enum SotClipboardFormatId,)
 include/svl/svdde.hxx:238
@@ -86,8 +88,8 @@ include/svl/svdde.hxx:244
 _Bool DdeTopic::StartAdviseLoop()
 include/svl/svdde.hxx:300
 void DdeService::~DdeService()
-include/svtools/simptabl.hxx:88
-int SvSimpleTable::ColCompare(class SvTreeListEntry *,class 
SvTreeListEntry *,)
+include/svtools/simptabl.hxx:79
+void SvSimpleTable::HBarClick()
 include/toolkit/controls/geometrycontrolmodel.hxx:184
 void OGeometryControlModel::fillProperties(class 
com::sun::star::uno::Sequence &,class 
com::sun::star::uno::Sequence &,)const
 include/vbahelper/vbacollectionimpl.hxx:290
@@ -114,24 +116,20 @@ include/vbahelper/vbareturntypes.hxx:41
 type-parameter-0-0 ooo::vba::DefaultReturnHelper::getValue()
 include/v

[Libreoffice-commits] core.git: postprocess/CppunitTest_services.mk postprocess/qa pyuno/source reportdesign/source sax/source

2019-08-17 Thread Arkadiy Illarionov (via logerrit)
 postprocess/CppunitTest_services.mk |1 
 postprocess/qa/services.cxx |   54 
 pyuno/source/module/pyuno_adapter.cxx   |   38 ++--
 reportdesign/source/core/api/ReportDefinition.cxx   |   21 +---
 reportdesign/source/core/sdr/RptObject.cxx  |   11 +-
 reportdesign/source/filter/xml/xmlExport.cxx|7 -
 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx |   12 +-
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx |9 --
 reportdesign/source/filter/xml/xmlfilter.cxx|   28 ++
 reportdesign/source/ui/dlg/AddField.cxx |   18 +---
 reportdesign/source/ui/dlg/DateTime.cxx |6 -
 reportdesign/source/ui/dlg/GroupsSorting.cxx|   18 +---
 reportdesign/source/ui/dlg/Navigator.cxx|6 -
 reportdesign/source/ui/inspection/GeometryHandler.cxx   |8 -
 reportdesign/source/ui/misc/RptUndo.cxx |   10 --
 reportdesign/source/ui/report/ReportController.cxx  |   27 ++
 reportdesign/source/ui/report/ReportSection.cxx |   17 +--
 reportdesign/source/ui/report/ViewsWindow.cxx   |   14 +--
 sax/source/expatwrap/xml2utf.cxx|   11 --
 sax/source/fastparser/fastparser.cxx|7 -
 sax/source/fastparser/legacyfastparser.cxx  |   18 +---
 sax/source/tools/fastserializer.cxx |4 
 22 files changed, 132 insertions(+), 213 deletions(-)

New commits:
commit edcdfe5477559ca6c62897f0cad47d4d6149d77a
Author: Arkadiy Illarionov 
AuthorDate: Sat Aug 10 19:07:30 2019 +0300
Commit: Arkadiy Illarionov 
CommitDate: Sat Aug 17 14:08:33 2019 +0200

Simplify Sequence iterations in postprocess..sax

Use range-based loops, STL and comphelper functions

Change-Id: If738d8f4e792c4686870183b0c0fdfbb61fd3351
Reviewed-on: https://gerrit.libreoffice.org/77245
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov 

diff --git a/postprocess/CppunitTest_services.mk 
b/postprocess/CppunitTest_services.mk
index d886cb4961d8..9371443b5d6a 100644
--- a/postprocess/CppunitTest_services.mk
+++ b/postprocess/CppunitTest_services.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_CppunitTest_use_externals,services, \
 ))
 
 $(eval $(call gb_CppunitTest_use_libraries,services, \
+   comphelper \
cppu \
cppuhelper \
sal \
diff --git a/postprocess/qa/services.cxx b/postprocess/qa/services.cxx
index a807a037e80e..3c0fa8f7c6cf 100644
--- a/postprocess/qa/services.cxx
+++ b/postprocess/qa/services.cxx
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -77,12 +78,7 @@ bool unique(css::uno::Sequence const & strings) {
 bool contains(
 css::uno::Sequence const & strings, OUString const & string)
 {
-for (sal_Int32 i = 0; i != strings.getLength(); ++i) {
-if (string == strings[i]) {
-return true;
-}
-}
-return false;
+return comphelper::findValue(strings, string) != -1;
 }
 
 bool contains(
@@ -90,12 +86,8 @@ bool contains(
 css::uno::Sequence const & strings2)
 {
 // Assumes small sequences for which quadratic algorithm is acceptable:
-for (sal_Int32 i = 0; i != strings2.getLength(); ++i) {
-if (!contains(strings1, strings2[i])) {
-return false;
-}
-}
-return true;
+return std::all_of(strings2.begin(), strings2.end(),
+[&strings1](const OUString& rStr) { return contains(strings1, rStr); 
});
 }
 
 void addService(
@@ -157,7 +149,7 @@ void Test::test() {
 m_xContext->getValueByName(
 "/singletons/com.sun.star.reflection.theTypeDescriptionManager"),
 css::uno::UNO_QUERY_THROW);
-css::uno::Sequence serviceNames(
+const css::uno::Sequence serviceNames(
 m_xContext->getServiceManager()->getAvailableServiceNames());
 struct Constructor {
 Constructor(
@@ -181,9 +173,9 @@ void Test::test() {
 bool accumulationBased;
 };
 std::map impls;
-for (sal_Int32 i = 0; i != serviceNames.getLength(); ++i) {
+for (const auto& rServiceName : serviceNames) {
 css::uno::Reference serviceImpls1(
-enumAcc->createContentEnumeration(serviceNames[i]),
+enumAcc->createContentEnumeration(rServiceName),
 css::uno::UNO_SET_THROW);
 std::vector> 
serviceImpls2;
 while (serviceImpls1->hasMoreElements()) {
@@ -191,9 +183,9 @@ void Test::test() {
 serviceImpls1->nextElement(), css::uno::UNO_QUERY_THROW);
 }
 css::uno::Reference desc;
-if (typeMgr->hasByHierarchicalName(serviceNames[i])) {
+if (typeMgr->hasByHierarchicalName(rServiceName)) {
 desc.set(
-typeMgr->getByHierarchicalName(

[Libreoffice-commits] core.git: 2 commits - testtools/source toolkit/source ucb/source xmlhelp/source

2019-08-17 Thread Julien Nabet (via logerrit)
 testtools/source/bridgetest/bridgetest.cxx  |3 +--
 testtools/source/bridgetest/constructors.cxx|6 ++
 testtools/source/bridgetest/cppobj.cxx  |3 +--
 testtools/source/performance/ubobject.cxx   |3 +--
 testtools/source/performance/ubtest.cxx |3 +--
 toolkit/source/controls/animatedimages.cxx  |5 +
 toolkit/source/controls/grid/defaultgridcolumnmodel.cxx |4 +---
 toolkit/source/controls/grid/gridcolumn.cxx |4 +---
 toolkit/source/controls/spinningprogress.cxx|8 +++-
 ucb/source/ucp/ext/ucpext_content.cxx   |5 +
 ucb/source/ucp/ext/ucpext_provider.cxx  |5 +
 ucb/source/ucp/file/filtask.cxx |4 +---
 ucb/source/ucp/hierarchy/hierarchydatasource.cxx|5 +
 ucb/source/ucp/package/pkgcontent.cxx   |8 +---
 xmlhelp/source/cxxhelp/provider/provider.cxx|6 +-
 xmlhelp/source/treeview/tvfactory.cxx   |3 +--
 16 files changed, 19 insertions(+), 56 deletions(-)

New commits:
commit 5ad254ed246cf8d11b55e50ed0ccba5736d0cdbb
Author: Julien Nabet 
AuthorDate: Sat Aug 17 12:15:01 2019 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 17 13:30:19 2019 +0200

tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor

in testtools and toolkit

Change-Id: I14b53c27906eb615e68482cbc3918be8da464212
Reviewed-on: https://gerrit.libreoffice.org/77624
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/testtools/source/bridgetest/bridgetest.cxx 
b/testtools/source/bridgetest/bridgetest.cxx
index 66be97682ddf..535d8e1fa73c 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -76,8 +76,7 @@ static Sequence cloneSequence(const Sequence& val);
 
 static Sequence< OUString > getSupportedServiceNames()
 {
-OUString aName( SERVICENAME );
-return Sequence< OUString >( &aName, 1 );
+return { SERVICENAME };
 }
 
 static bool check( bool b , char const * message )
diff --git a/testtools/source/bridgetest/constructors.cxx 
b/testtools/source/bridgetest/constructors.cxx
index 050c2dd6683c..d551e9fdcaa3 100644
--- a/testtools/source/bridgetest/constructors.cxx
+++ b/testtools/source/bridgetest/constructors.cxx
@@ -430,13 +430,11 @@ css::uno::Reference< css::uno::XInterface > create2(
 }
 
 OUString getImplementationName2() {
-return
-"comp.test.testtools.bridgetest.Constructors2";
+return "comp.test.testtools.bridgetest.Constructors2";
 }
 
 css::uno::Sequence< OUString > getSupportedServiceNames2() {
-css::uno::Sequence< OUString > s { 
"test.testtools.bridgetest.Constructors2" };
-return s;
+return { "test.testtools.bridgetest.Constructors2" };
 }
 
 ::cppu::ImplementationEntry const entries[] = {
diff --git a/testtools/source/bridgetest/cppobj.cxx 
b/testtools/source/bridgetest/cppobj.cxx
index 1eb3e9903753..2a5a58be34bb 100644
--- a/testtools/source/bridgetest/cppobj.cxx
+++ b/testtools/source/bridgetest/cppobj.cxx
@@ -69,8 +69,7 @@ namespace bridge_object
 
 static Sequence< OUString > getSupportedServiceNames()
 {
-OUString aName( SERVICENAME );
-return Sequence< OUString >( &aName, 1 );
+return { SERVICENAME };
 }
 
 
diff --git a/testtools/source/performance/ubobject.cxx 
b/testtools/source/performance/ubobject.cxx
index ca0582e24e4b..8aff1663ed9c 100644
--- a/testtools/source/performance/ubobject.cxx
+++ b/testtools/source/performance/ubobject.cxx
@@ -47,8 +47,7 @@ namespace benchmark_object
 
 inline static Sequence< OUString > getSupportedServiceNames()
 {
-OUString aName( SERVICENAME);
-return Sequence< OUString >( &aName, 1 );
+return { SERVICENAME };
 }
 
 
diff --git a/testtools/source/performance/ubtest.cxx 
b/testtools/source/performance/ubtest.cxx
index 283e73d699c9..a45792a07a4b 100644
--- a/testtools/source/performance/ubtest.cxx
+++ b/testtools/source/performance/ubtest.cxx
@@ -388,8 +388,7 @@ static void createInstance( Reference< T > & rxOut,
 
 inline static Sequence< OUString > getSupportedServiceNames()
 {
-OUString aName( SERVICENAME );
-return Sequence< OUString >( &aName, 1 );
+return { SERVICENAME };
 }
 
 
diff --git a/toolkit/source/controls/animatedimages.cxx 
b/toolkit/source/controls/animatedimages.cxx
index bcc0e0628130..efa48cec0b1f 100644
--- a/toolkit/source/controls/animatedimages.cxx
+++ b/toolkit/source/controls/animatedimages.cxx
@@ -292,10 +292,7 @@ namespace toolkit {
 
 Sequence< OUString > SAL_CALL 
AnimatedImagesControlModel::getSupportedServiceNames()
 {
-Sequence< OUString > aServiceNames(2);
-aServiceNames[0] = "com.sun.star.awt.AnimatedImagesControlModel";
-aServiceNames[1] = "com.sun.star.awt.UnoControlModel";
-return aServiceNames;
+return { "com.sun.star

[Libreoffice-commits] core.git: 2 commits - embeddedobj/source filter/source xmloff/source

2019-08-17 Thread Julien Nabet (via logerrit)
 embeddedobj/source/commonembedding/xfactory.cxx |5 +
 filter/source/odfflatxml/OdfFlatXml.cxx |5 +
 filter/source/storagefilterdetect/filterdetect.cxx  |6 +-
 filter/source/t602/t602filter.cxx   |9 ++---
 filter/source/textfilterdetect/filterdetect.cxx |6 +-
 filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx |6 +-
 xmloff/source/core/unoatrcn.cxx |4 +---
 xmloff/source/core/xmlexp.cxx   |5 +
 xmloff/source/core/xmlimp.cxx   |5 +
 xmloff/source/transform/OOo2Oasis.cxx   |   11 +++
 xmloff/source/transform/Oasis2OOo.cxx   |7 ++-
 11 files changed, 15 insertions(+), 54 deletions(-)

New commits:
commit b4092c738321cd9f9e2cba18a49519abcbd4451a
Author: Julien Nabet 
AuthorDate: Sat Aug 17 12:25:34 2019 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 17 13:29:54 2019 +0200

tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor

in embeddedobj and filter

Change-Id: I2da3fa1df8782e449852358d1c86f5e4bc79ea1a
Reviewed-on: https://gerrit.libreoffice.org/77627
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/embeddedobj/source/commonembedding/xfactory.cxx 
b/embeddedobj/source/commonembedding/xfactory.cxx
index 50e926fd7867..1c0209460774 100644
--- a/embeddedobj/source/commonembedding/xfactory.cxx
+++ b/embeddedobj/source/commonembedding/xfactory.cxx
@@ -39,10 +39,7 @@ using namespace ::com::sun::star;
 
 uno::Sequence< OUString > 
OOoEmbeddedObjectFactory::impl_staticGetSupportedServiceNames()
 {
-uno::Sequence< OUString > aRet(2);
-aRet[0] = "com.sun.star.embed.OOoEmbeddedObjectFactory";
-aRet[1] = "com.sun.star.comp.embed.OOoEmbeddedObjectFactory";
-return aRet;
+return { "com.sun.star.embed.OOoEmbeddedObjectFactory", 
"com.sun.star.comp.embed.OOoEmbeddedObjectFactory" };
 }
 
 OUString OOoEmbeddedObjectFactory::impl_staticGetImplementationName()
diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx 
b/filter/source/odfflatxml/OdfFlatXml.cxx
index 29882d0d4029..8e0a4beb076e 100644
--- a/filter/source/odfflatxml/OdfFlatXml.cxx
+++ b/filter/source/odfflatxml/OdfFlatXml.cxx
@@ -208,10 +208,7 @@ OUString OdfFlatXml::impl_getImplementationName()
 
 Sequence< OUString > OdfFlatXml::impl_getSupportedServiceNames()
 {
-Sequence< OUString > lServiceNames(2);
-lServiceNames[0] = "com.sun.star.document.ImportFilter";
-lServiceNames[1] = "com.sun.star.document.ExportFilter";
-return lServiceNames;
+return { "com.sun.star.document.ImportFilter", 
"com.sun.star.document.ExportFilter" };
 }
 
 Reference< XInterface > SAL_CALL OdfFlatXml::impl_createInstance(const 
Reference< XMultiServiceFactory >& fact)
diff --git a/filter/source/storagefilterdetect/filterdetect.cxx 
b/filter/source/storagefilterdetect/filterdetect.cxx
index 45bfa1f6cdbf..02ed875c6699 100644
--- a/filter/source/storagefilterdetect/filterdetect.cxx
+++ b/filter/source/storagefilterdetect/filterdetect.cxx
@@ -172,11 +172,7 @@ OUString StorageFilterDetect_getImplementationName()
 
 uno::Sequence StorageFilterDetect_getSupportedServiceNames()
 {
-uno::Sequence aRet(2);
-OUString* pArray = aRet.getArray();
-pArray[0] = "com.sun.star.document.ExtendedTypeDetection";
-pArray[1] = "com.sun.star.comp.filters.StorageFilterDetect";
-return aRet;
+return { "com.sun.star.document.ExtendedTypeDetection", 
"com.sun.star.comp.filters.StorageFilterDetect" };
 }
 
 uno::Reference StorageFilterDetect_createInstance(
diff --git a/filter/source/t602/t602filter.cxx 
b/filter/source/t602/t602filter.cxx
index 1f8fe00c91e4..124ec86b0a0d 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -870,11 +870,7 @@ OUString T602ImportFilter_getImplementationName ()
 
 Sequence< OUString > T602ImportFilter_getSupportedServiceNames(  )
 {
-Sequence < OUString > aRet(2);
-OUString* pArray = aRet.getArray();
-pArray[0] =  "com.sun.star.document.ImportFilter";
-pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-return aRet;
+return { "com.sun.star.document.ImportFilter", 
"com.sun.star.document.ExtendedTypeDetection" };
 }
 
 Reference< XInterface > T602ImportFilter_createInstance( const Reference< 
XMultiServiceFactory > & rSMgr)
@@ -1140,8 +1136,7 @@ OUString T602ImportFilterDialog_getImplementationName ()
 
 Sequence< OUString > T602ImportFilterDialog_getSupportedServiceNames(  )
 {
-Sequence aRet { "com.sun.star.ui.dialogs.FilterOptionsDialog" };
-return aRet;
+return { "com.sun.star.ui.dialogs.FilterOptionsDialog" };
 }
 
 Reference< XInterface > T602ImportFilterDialog_createInstance( const 
Reference< XMultiServiceFactory > & )
diff --git a/filter/source/textfilterdetect/filterdetect.cxx 
b/filter/source/textfilterdetect/filterdetect.cxx
index 0551f275eecb..b4959639c574 100644
--

[Libreoffice-commits] core.git: dbaccess/source editeng/source i18npool/source svtools/source writerperfect/source

2019-08-17 Thread Julien Nabet (via logerrit)
 dbaccess/source/core/api/RowSet.cxx |6 
+++---
 dbaccess/source/core/api/callablestatement.cxx  |2 
+-
 dbaccess/source/core/api/datacolumn.cxx |3 
+--
 dbaccess/source/core/api/definitioncolumn.cxx   |6 
+++---
 dbaccess/source/core/api/preparedstatement.cxx  |2 
+-
 dbaccess/source/core/api/querydescriptor.cxx|2 
+-
 dbaccess/source/core/api/resultcolumn.cxx   |2 
+-
 dbaccess/source/core/api/resultset.cxx  |2 
+-
 dbaccess/source/core/dataaccess/definitioncontainer.cxx |2 
+-
 dbaccess/source/core/dataaccess/documentcontainer.cxx   |2 
+-
 dbaccess/source/core/misc/DatabaseDataProvider.cxx  |2 
+-
 dbaccess/source/ui/browser/dbloader.cxx |2 
+-
 dbaccess/source/ui/browser/sbagrid.cxx  |2 
+-
 editeng/source/accessibility/AccessibleImageBullet.cxx  |2 
+-
 editeng/source/uno/unonrule.cxx |2 
+-
 editeng/source/uno/unotext.cxx  |6 
+++---
 i18npool/source/breakiterator/breakiteratorImpl.cxx |2 
+-
 i18npool/source/calendar/calendarImpl.cxx   |3 
+--
 i18npool/source/characterclassification/cclass_unicode.cxx  |2 
+-
 i18npool/source/characterclassification/characterclassificationImpl.cxx |2 
+-
 i18npool/source/characterclassification/unoscripttypedetector.cxx   |2 
+-
 i18npool/source/collator/collatorImpl.cxx   |2 
+-
 i18npool/source/nativenumber/nativenumbersupplier.cxx   |2 
+-
 i18npool/source/numberformatcode/numberformatcode.cxx   |2 
+-
 i18npool/source/textconversion/textconversionImpl.cxx   |2 
+-
 i18npool/source/transliteration/transliterationImpl.cxx |2 
+-
 i18npool/source/transliteration/transliteration_commonclass.cxx |2 
+-
 svtools/source/graphic/renderer.cxx |2 
+-
 svtools/source/hatchwindow/documentcloser.cxx   |2 
+-
 svtools/source/hatchwindow/hatchwindowfactory.cxx   |5 
+
 writerperfect/source/calc/MSWorksCalcImportFilter.cxx   |3 
+--
 writerperfect/source/calc/MWAWCalcImportFilter.cxx  |3 
+--
 writerperfect/source/calc/NumbersImportFilter.cxx   |3 
+--
 writerperfect/source/draw/CDRImportFilter.cxx   |3 
+--
 writerperfect/source/draw/CMXImportFilter.cxx   |3 
+--
 writerperfect/source/draw/FreehandImportFilter.cxx  |3 
+--
 writerperfect/source/draw/MSPUBImportFilter.cxx |3 
+--
 writerperfect/source/draw/MWAWDrawImportFilter.cxx  |3 
+--
 writerperfect/source/draw/PageMakerImportFilter.cxx |3 
+--
 writerperfect/source/draw/VisioImportFilter.cxx |3 
+--
 writerperfect/source/draw/WPGImportFilter.cxx   |3 
+--
 writerperfect/source/impress/KeynoteImportFilter.cxx|3 
+--
 writerperfect/source/impress/MWAWPresentationImportFilter.cxx   |3 
+--
 writerperfect/source/writer/AbiWordImportFilter.cxx |3 
+--
 writerperfect/source/writer/EBookImportFilter.cxx   |3 
+--
 writerperfect/source/writer/MSWorksImportFilter.cxx |3 
+--
 writerperfect/source/writer/MWAWImportFilter.cxx|3 
+--
 writerperfect/source/writer/PagesImportFilter.cxx   |3 
+--
 writerperfect/source/writer/WordPerfectImportFilter.cxx |3 
+--
 49 files changed, 55 insertions(+), 79 deletions(-)

New commits:
commit 3d24130986e6a0e1baa2cff61309f0f42cf0c339
Author: Julien Nabet 
AuthorDate: Sat Aug 17 11:39:47 2019 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 17 12:26:15 2019 +0200

Use simplified syntax for Sequence

Change-Id: I92ac60fafcc404439c101d1950ed214fce140c91
Reviewed-on: https://gerrit.libreoffice.org/77621
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/dbaccess/source/core/api/RowSet.cxx 
b/dbaccess/source/core/api/RowSet.cxx
index 1485d77dcdec..48597c9b2c00 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -478,8 +478,8 @@ sal_Bool SAL_CALL ORowSet::supportsService( const OUString& 
_rServiceName )
 
 Sequence< OUString > SAL_CALL ORowSet::getSupportedServiceNames()
 {
- 

[Libreoffice-commits] core.git: sc/source

2019-08-17 Thread Eike Rathke (via logerrit)
 sc/source/ui/docshell/externalrefmgr.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1d08f0f215dcf5fec9390bd9c84357bc96a9338a
Author: Eike Rathke 
AuthorDate: Fri Aug 16 22:18:57 2019 +0200
Commit: Eike Rathke 
CommitDate: Sat Aug 17 12:13:20 2019 +0200

Call isLinkUpdateAllowedInDoc() early in loadSrcDocument()

... so getExternalFileData() and isFileLoadable() aren't called
over and over again just to be discarded. Which happens for every
formula expression trying to access the document.

Change-Id: Id303f9a960d14398ab5c4967346328a8128b60dc
Reviewed-on: https://gerrit.libreoffice.org/77614
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/sc/source/ui/docshell/externalrefmgr.cxx 
b/sc/source/ui/docshell/externalrefmgr.cxx
index dc1148536414..fc85ad791e4f 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2437,6 +2437,10 @@ ScDocument* 
ScExternalRefManager::getSrcDocument(sal_uInt16 nFileId)
 
 SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, 
OUString& rFilter)
 {
+// Do not load document until it was allowed.
+if (!isLinkUpdateAllowedInDoc(*mpDoc))
+return nullptr;
+
 const SrcFileData* pFileData = getExternalFileData(nFileId);
 if (!pFileData)
 return nullptr;
@@ -2453,10 +2457,6 @@ SfxObjectShellRef 
ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
 if (!isFileLoadable(aFile))
 return nullptr;
 
-// Do not load document until it was allowed.
-if (!isLinkUpdateAllowedInDoc(*mpDoc))
-return nullptr;
-
 OUString aOptions = pFileData->maFilterOptions;
 if ( !pFileData->maFilterName.isEmpty() )
 rFilter = pFileData->maFilterName;  // don't overwrite stored 
filter with guessed filter
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sw/source

2019-08-17 Thread Mike Kaganski (via logerrit)
 sw/source/uibase/utlui/uitool.cxx |   52 ++
 1 file changed, 42 insertions(+), 10 deletions(-)

New commits:
commit 202c9a7d826c95fc05db912a8d19c598a240f1cd
Author: Mike Kaganski 
AuthorDate: Sat Aug 17 10:52:14 2019 +0300
Commit: Mike Kaganski 
CommitDate: Sat Aug 17 11:26:47 2019 +0200

tdf#126787: extend/restore item set ranges to hold RES_PARATR_GRABBAG

The original item set did not include that in its ranges list, so it
ignored attempts to set its value.

Change-Id: I5f928206f0614f0cfd54652e77d7dc6b9833fb26
Reviewed-on: https://gerrit.libreoffice.org/77617
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sw/source/uibase/utlui/uitool.cxx 
b/sw/source/uibase/utlui/uitool.cxx
index c3581e6df888..0ed3fe8b24a5 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -148,10 +148,21 @@ void ConvertAttrCharToGen(SfxItemSet& rSet)
 std::unique_ptr pGrabBag;
 const SfxPoolItem *pTmpItem;
 if (SfxItemState::SET == rSet.GetItemState(RES_PARATR_GRABBAG, false, 
&pTmpItem))
+{
+SAL_WARN("sw.ui", "Unexpected: non-empty paragraph grab bag in 
character item set!");
 pGrabBag.reset(static_cast(pTmpItem->Clone()));
+}
 else
 pGrabBag.reset(new SfxGrabBagItem(RES_PARATR_GRABBAG));
 pGrabBag->GetGrabBag()["DialogUseCharAttr"] <<= true;
+// Store initial ranges to allow restoring later
+const sal_uInt16* pRanges = rSet.GetRanges();
+const sal_uInt16* pEnd = pRanges;
+while (*pEnd)
+++pEnd;
+const uno::Sequence aOrigRanges(pRanges, pEnd - pRanges + 1);
+pGrabBag->GetGrabBag()["OrigItemSetRanges"] <<= aOrigRanges;
+rSet.MergeRange(RES_PARATR_GRABBAG, RES_PARATR_GRABBAG);
 rSet.Put(std::move(pGrabBag));
 }
 
@@ -177,19 +188,40 @@ void ConvertAttrGenToChar(SfxItemSet& rSet, const 
SfxItemSet& rOrigSet)
 }
 rSet.Put( aGrabBag );
 }
-if (SfxItemState::SET == rOrigSet.GetItemState(RES_PARATR_GRABBAG, 
false, &pTmpItem))
+}
+rSet.ClearItem( RES_BACKGROUND );
+
+if (SfxItemState::SET == rOrigSet.GetItemState(RES_PARATR_GRABBAG, false, 
&pTmpItem))
+{
+SfxGrabBagItem aGrabBag(*static_cast(pTmpItem));
+std::map& rMap = aGrabBag.GetGrabBag();
+auto aIterator = rMap.find("OrigItemSetRanges");
+if (aIterator != rMap.end())
 {
-SfxGrabBagItem aGrabBag(*static_cast(pTmpItem));
-std::map& rMap = aGrabBag.GetGrabBag();
-// Remove temporary GrabBag entry
-rMap.erase("DialogUseCharAttr");
-if (rMap.empty())
-rSet.ClearItem(RES_PARATR_GRABBAG);
-else
-rSet.Put(aGrabBag);
+if (uno::Sequence aOrigRanges; (aIterator->second >>= 
aOrigRanges)
+   && 
aOrigRanges.getLength() % 2 == 1
+   && 
*(std::cend(aOrigRanges) - 1) == 0)
+rSet.SetRanges(aOrigRanges.getConstArray());
+}
+}
+if (SfxItemState::SET == rSet.GetItemState(RES_PARATR_GRABBAG, false, 
&pTmpItem))
+{
+// In fact, we should not reach here: it shouldn't have been there; 
and even if it was, it
+// should have been erased on the previous step when restoring 
original ranges
+SAL_WARN("sw.ui", "Unexpected: paragraph grab bag in character item 
set!");
+SfxGrabBagItem aGrabBag(*static_cast(pTmpItem));
+std::map& rMap = aGrabBag.GetGrabBag();
+// Remove temporary GrabBag entries
+rMap.erase("DialogUseCharAttr");
+rMap.erase("OrigItemSetRanges");
+if (rMap.empty())
+rSet.ClearItem(RES_PARATR_GRABBAG);
+else
+{
+SAL_WARN("sw.ui", "Unexpected: non-empty paragraph grab bag in 
character item set!");
+rSet.Put(aGrabBag);
 }
 }
-rSet.ClearItem( RES_BACKGROUND );
 }
 
 void ApplyCharBackground(const Color& rBackgroundColor, SwWrtShell& rShell)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits