Re: [Libreoffice-commits] core.git: sysui/CustomTarget_share.mk

2019-08-02 Thread Rene Engelhard
On Sat, Aug 03, 2019 at 08:02:56AM +0200, Rene Engelhard wrote:
> Hi,
> 
> On Sat, Aug 03, 2019 at 07:39:09AM +0200, Rene Engelhard wrote:
> > On Thu, Aug 01, 2019 at 07:13:58AM +, Stephan Bergmann (via logerrit) 
> > wrote:
> > >  sysui/CustomTarget_share.mk |4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > New commits:
> > > commit 4b4c7e76e6c2ea0d47a42a5107352d3ad7341fbf
> > > Author: Stephan Bergmann 
> > > AuthorDate: Wed Jul 31 21:56:18 2019 +0200
> > > Commit: Noel Grandin 
> > > CommitDate: Thu Aug 1 09:13:22 2019 +0200
> > > 
> > > Only build LOKDocView-0.1.gir when necessary
> > > 
> > > Prior to 634844354ee6ed884128086a80c3ee32c889d8c9 "sysui: fix rpm 
> > > errors in
> > > freedesktop-menus (4.14.1)" it had been build as part of
> > > sysui/desktop/share/create_tree.sh, which is presumably only called 
> > > when
> > > building for deb or rpm PKGFORMAT.  Building it now in more cases 
> > > started to
> > 
> > Uhm, no
> > 
> > $ git grep create_tree.sh
> > bin/distro-install-desktop-integration:# do not overwrite 
> > $BINDIR/libreoffice symlink created by create_tree.sh
> > bin/distro-install-desktop-integration:cp -a 
> > "${SRCDIR?}"/sysui/desktop/share/create_tree.sh "$sysui_temp"
> > bin/distro-install-desktop-integration:bash ./create_tree.sh
> > 
> >
> > bin/distro-install-desktop-integration:# put the stuff installed by 
> > create_tree.sh into the right file lists
> > sysui/CustomTarget_deb.mk:$(deb_WORKDIR)/%/DEBIAN/control: 
> > $(deb_SRCDIR)/control $(call 
> > gb_CustomTarget_get_workdir,sysui/share)/%/create_tree.sh
> > sysui/CustomTarget_deb.mk:  ./create_tree.sh
> > sysui/CustomTarget_rpm.mk:  $(call 
> > gb_CustomTarget_get_workdir,sysui/share)/$(1)/create_tree.sh \
> > sysui/CustomTarget_share.mk:$(product)/create_tree.sh \
> > sysui/CustomTarget_share.mk:$(share_WORKDIR)/%/create_tree.sh: 
> > $(share_SRCDIR)/share/create_tree.sh \
> > sysui/desktop/freedesktop/freedesktop-menus.spec:./create_tree.sh
> > 
> > This means that packaging without deb/rpm PKGFORMAT and plain "make install"
> > now doesn't build it
> > 
> > Reverted it locally for me...
> 
> Sigh, and then there is
> 634844354ee6ed884128086a80c3ee32c889d8c9

OK, that thankfully is easy to adapt to for me:
https://salsa.debian.org/libreoffice-team/libreoffice/libreoffice/commit/c73d031ed1b17fa64c017d744d58133816944b12

But 4b4c7e76e6c2ea0d47a42a5107352d3ad7341fbf still effectively disables
the build of this for anyone not using PKGFORMAT deb/rpm (and why would
one use it if he needs to tear down the debs again to do proper
packaging after it). Many distros use make install and that will now
break for them (or they revert 4b4c7e76e6c2ea0d47a42a5107352d3ad7341fbf
locally as I did...)

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

Re: [Libreoffice-commits] core.git: sysui/CustomTarget_share.mk

2019-08-02 Thread Rene Engelhard
Hi,

On Sat, Aug 03, 2019 at 07:39:09AM +0200, Rene Engelhard wrote:
> On Thu, Aug 01, 2019 at 07:13:58AM +, Stephan Bergmann (via logerrit) 
> wrote:
> >  sysui/CustomTarget_share.mk |4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > New commits:
> > commit 4b4c7e76e6c2ea0d47a42a5107352d3ad7341fbf
> > Author: Stephan Bergmann 
> > AuthorDate: Wed Jul 31 21:56:18 2019 +0200
> > Commit: Noel Grandin 
> > CommitDate: Thu Aug 1 09:13:22 2019 +0200
> > 
> > Only build LOKDocView-0.1.gir when necessary
> > 
> > Prior to 634844354ee6ed884128086a80c3ee32c889d8c9 "sysui: fix rpm 
> > errors in
> > freedesktop-menus (4.14.1)" it had been build as part of
> > sysui/desktop/share/create_tree.sh, which is presumably only called when
> > building for deb or rpm PKGFORMAT.  Building it now in more cases 
> > started to
> 
> Uhm, no
> 
> $ git grep create_tree.sh
> bin/distro-install-desktop-integration:# do not overwrite 
> $BINDIR/libreoffice symlink created by create_tree.sh
> bin/distro-install-desktop-integration:cp -a 
> "${SRCDIR?}"/sysui/desktop/share/create_tree.sh "$sysui_temp"
> bin/distro-install-desktop-integration:bash ./create_tree.sh
>   
>  
> bin/distro-install-desktop-integration:# put the stuff installed by 
> create_tree.sh into the right file lists
> sysui/CustomTarget_deb.mk:$(deb_WORKDIR)/%/DEBIAN/control: 
> $(deb_SRCDIR)/control $(call 
> gb_CustomTarget_get_workdir,sysui/share)/%/create_tree.sh
> sysui/CustomTarget_deb.mk:  ./create_tree.sh
> sysui/CustomTarget_rpm.mk:  $(call 
> gb_CustomTarget_get_workdir,sysui/share)/$(1)/create_tree.sh \
> sysui/CustomTarget_share.mk:$(product)/create_tree.sh \
> sysui/CustomTarget_share.mk:$(share_WORKDIR)/%/create_tree.sh: 
> $(share_SRCDIR)/share/create_tree.sh \
> sysui/desktop/freedesktop/freedesktop-menus.spec:./create_tree.sh
> 
> This means that packaging without deb/rpm PKGFORMAT and plain "make install"
> now doesn't build it
> 
> Reverted it locally for me...

Sigh, and then there is
634844354ee6ed884128086a80c3ee32c889d8c9

:-(

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

Re: [Libreoffice-commits] core.git: sysui/CustomTarget_share.mk

2019-08-02 Thread Rene Engelhard
Hi,

On Thu, Aug 01, 2019 at 07:13:58AM +, Stephan Bergmann (via logerrit) wrote:
>  sysui/CustomTarget_share.mk |4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> New commits:
> commit 4b4c7e76e6c2ea0d47a42a5107352d3ad7341fbf
> Author: Stephan Bergmann 
> AuthorDate: Wed Jul 31 21:56:18 2019 +0200
> Commit: Noel Grandin 
> CommitDate: Thu Aug 1 09:13:22 2019 +0200
> 
> Only build LOKDocView-0.1.gir when necessary
> 
> Prior to 634844354ee6ed884128086a80c3ee32c889d8c9 "sysui: fix rpm errors 
> in
> freedesktop-menus (4.14.1)" it had been build as part of
> sysui/desktop/share/create_tree.sh, which is presumably only called when
> building for deb or rpm PKGFORMAT.  Building it now in more cases started 
> to

Uhm, no

$ git grep create_tree.sh
bin/distro-install-desktop-integration:# do not overwrite 
$BINDIR/libreoffice symlink created by create_tree.sh
bin/distro-install-desktop-integration:cp -a 
"${SRCDIR?}"/sysui/desktop/share/create_tree.sh "$sysui_temp"
bin/distro-install-desktop-integration:bash ./create_tree.sh

   
bin/distro-install-desktop-integration:# put the stuff installed by 
create_tree.sh into the right file lists
sysui/CustomTarget_deb.mk:$(deb_WORKDIR)/%/DEBIAN/control: 
$(deb_SRCDIR)/control $(call 
gb_CustomTarget_get_workdir,sysui/share)/%/create_tree.sh
sysui/CustomTarget_deb.mk:  ./create_tree.sh
sysui/CustomTarget_rpm.mk:  $(call 
gb_CustomTarget_get_workdir,sysui/share)/$(1)/create_tree.sh \
sysui/CustomTarget_share.mk:$(product)/create_tree.sh \
sysui/CustomTarget_share.mk:$(share_WORKDIR)/%/create_tree.sh: 
$(share_SRCDIR)/share/create_tree.sh \
sysui/desktop/freedesktop/freedesktop-menus.spec:./create_tree.sh

This means that packaging without deb/rpm PKGFORMAT and plain "make install"
now doesn't build it

Reverted it locally for me...

Regards,

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

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

2019-08-02 Thread Ahmed ElShreif (via logerrit)
 include/vcl/uitest/logger.hxx  |   10 +++
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |   22 +
 uitest/ui_logger_dsl/Special_commands.tx   |   14 +++---
 uitest/ui_logger_dsl/dsl_core.py   |2 +
 vcl/source/uitest/logger.cxx   |   11 
 vcl/source/uitest/uiobject.cxx |8 ++
 6 files changed, 63 insertions(+), 4 deletions(-)

New commits:
commit 20d0760cc256ab9bcd15c60d68ddc1baccdedada
Author: Ahmed ElShreif 
AuthorDate: Fri Aug 2 22:16:31 2019 -0500
Commit: Ahmed ElShreif 
CommitDate: Fri Aug 2 22:16:31 2019 -0500

Add more events to ui logger

for Impress:
add new Slide
for Draw
add new Page
Modify the UILogger System to save information about the name of the app

Change-Id: I87fd98b2a11783e3410f1c0eba633631addf389b

diff --git a/include/vcl/uitest/logger.hxx b/include/vcl/uitest/logger.hxx
index f707049040fe..6c8c5008541a 100644
--- a/include/vcl/uitest/logger.hxx
+++ b/include/vcl/uitest/logger.hxx
@@ -32,6 +32,8 @@ private:
 
 bool mbValid;
 
+OUString app_name;
+
 public:
 
 UITestLogger();
@@ -48,6 +50,14 @@ public:
 
 static UITestLogger& getInstance();
 
+void setAppName(OUString name){
+app_name=name;
+}
+
+OUString getAppName(){
+return app_name;
+}
+
 };
 
 #endif
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx 
b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 55b58e197f1c..9d16edf5a63f 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -67,6 +67,9 @@
 #include 
 #include 
 
+#include 
+#include 
+
 #include 
 #include 
 #include 
@@ -84,6 +87,7 @@
 #include 
 #include 
 
+
 #include 
 
 using namespace ::com::sun::star;
@@ -106,6 +110,23 @@ SlideExclusionState GetSlideExclusionState 
(model::PageEnumeration& rPageSet);
 
 } // end of anonymous namespace
 
+
+namespace {
+
+void collectUIInformation(const OUString& num,const OUString& action)
+{
+EventDescription aDescription;
+aDescription.aID = "impress_win_or_draw_win";
+aDescription.aParameters = {{"POS", num}};
+aDescription.aAction = action;
+aDescription.aKeyWord = "ImpressWindowUIObject";
+aDescription.aParent = "MainWindow";
+
+UITestLogger::getInstance().logEvent(aDescription);
+}
+
+}
+
 SlotManager::SlotManager (SlideSorter& rSlideSorter)
 : mrSlideSorter(rSlideSorter)
 {
@@ -1065,6 +1086,7 @@ void SlotManager::InsertSlide (SfxRequest& rRequest)
 PageSelector::UpdateLock aUpdateLock (mrSlideSorter);
 mrSlideSorter.GetController().GetPageSelector().DeselectAllPages();
 mrSlideSorter.GetController().GetPageSelector().SelectPage(pNewPage);
+
collectUIInformation(OUString::number(nInsertionIndex+2),"Insert_New_Page_or_Slide");
 }
 
 void SlotManager::DuplicateSelectedSlides (SfxRequest& rRequest)
diff --git a/uitest/ui_logger_dsl/Special_commands.tx 
b/uitest/ui_logger_dsl/Special_commands.tx
index 5fbd9972a275..1d11067424a9 100644
--- a/uitest/ui_logger_dsl/Special_commands.tx
+++ b/uitest/ui_logger_dsl/Special_commands.tx
@@ -128,17 +128,19 @@ select_options:
   This part for all the impress log statments:

 1)  Type 
-2)  Set zoom
+2)  Insert New Page
 
   then we can add whatever we need in the future
 */
 impress_command:
-impress_Type_command 
+impress_Type_command | impress_Insert_Slide 
 ;
 impress_Type_command:
 'Type on impress ' what_to_type=Type_options
 ;
-
+impress_Insert_Slide:
+'Insert New Slide at Position ' position_num=INT
+;
 //=//
 /*
   This part for all the math log statments:
@@ -163,12 +165,16 @@ math_Type_command:
   This part for all the draw log statments:

 1) Type
+2) Insert New Page
 
   then we can add whatever we need in the future
 */
 draw_command:
-draw_Type_command
+draw_Type_command | draw_Insert_Page
 ;
 draw_Type_command:
 'Type on draw ' what_to_type=Type_options
+;
+draw_Insert_Page:
+'Insert New Page at Position ' position_num=INT
 ;
\ No newline at end of file
diff --git a/uitest/ui_logger_dsl/dsl_core.py b/uitest/ui_logger_dsl/dsl_core.py
index 8d5a8a82ac0b..9a5f375b5aa9 100644
--- a/uitest/ui_logger_dsl/dsl_core.py
+++ b/uitest/ui_logger_dsl/dsl_core.py
@@ -101,6 +101,8 @@ class ul_Compiler:
 'calc_Copy_Cells':self.do_nothing,
 'calc_Merge_Cells':self.do_nothing,
 'calc_UNMerge_Cells':self.do_nothing,
+'impress_Insert_Slide':self.do_nothing,
+'draw_Insert_Page':self.do_nothing,
 })
 
 self.log_lines=self.get_log_file(self.input_address)
diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx
index bd0d91940b1e..552b09d961b3

[Libreoffice-commits] core.git: desktop/source include/svx offapi/com qadevOOo/tests sc/source svx/inc

2019-08-02 Thread Andrea Gelmini (via logerrit)
 desktop/source/lib/lokclipboard.hxx|2 +-
 include/svx/svdobj.hxx |4 ++--
 include/svx/svdoedge.hxx   |4 ++--
 include/svx/svdpagv.hxx|2 +-
 offapi/com/sun/star/drawing/FillProperties.idl |2 +-
 offapi/com/sun/star/drawing/GenericDrawPage.idl|2 +-
 offapi/com/sun/star/drawing/GraphicObjectShape.idl |2 +-
 offapi/com/sun/star/embed/XStorage2.idl|4 ++--
 offapi/com/sun/star/form/NavigationBarMode.idl |2 +-
 offapi/com/sun/star/form/binding/BindableDatabaseDateField.idl |2 +-
 offapi/com/sun/star/form/binding/BindableDatabaseTimeField.idl |2 +-
 offapi/com/sun/star/sdb/XDatabaseRegistrationsListener.idl |2 +-
 offapi/com/sun/star/sdb/XSQLQueryComposer.idl  |2 +-
 qadevOOo/tests/java/mod/_sw/SwAccessibleDocumentView.java  |2 +-
 sc/source/ui/view/tabview2.cxx |4 ++--
 svx/inc/sdr/primitive2d/sdrpathprimitive2d.hxx |2 +-
 16 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit 3b28713ef82829fd1958d1ecf8c29b7391af78f5
Author: Andrea Gelmini 
AuthorDate: Fri Aug 2 18:56:25 2019 +0200
Commit: Julien Nabet 
CommitDate: Sat Aug 3 00:01:50 2019 +0200

Fix typos

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

diff --git a/desktop/source/lib/lokclipboard.hxx 
b/desktop/source/lib/lokclipboard.hxx
index 7da5f3ef3900..fd305c9b9507 100644
--- a/desktop/source/lib/lokclipboard.hxx
+++ b/desktop/source/lib/lokclipboard.hxx
@@ -107,7 +107,7 @@ public:
 css::uno::Reference SAL_CALL
 createInstanceWithArguments(const css::uno::Sequence& /* 
rArgs */) override;
 
-/// Fetch clipboard from the gobal pool.
+/// Fetch clipboard from the global pool.
 static rtl::Reference getClipboardForCurView();
 
 /// Release a clipboard before its document dies, nViewId of -1 clears all.
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 901d6b1caed1..36f29f9d9fcf 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -470,7 +470,7 @@ public:
 // set modified-flag in the model
 virtual void SetChanged();
 
-// Tooling for painting a single object to a OutputDevice. This will be 
needed as long
+// Tooling for painting a single object to an OutputDevice. This will be 
needed as long
 // as not all painting is changed to use DrawContact objects.
 void SingleObjectPainter(OutputDevice& rOut) const;
 bool LineGeometryUsageIsNecessary() const;
@@ -627,7 +627,7 @@ public:
 // (e.g. polygons, polylines, lines)
 // The points of those objects are selected (if necessary multiselection),
 // deleted, inserted, or as a multiselection moved or rotated...
-// Only such objects can have PlusHandles (e.g. the weights of an Bezier 
curve).
+// Only such objects can have PlusHandles (e.g. the weights of a Bezier 
curve).
 virtual bool IsPolyObj() const;
 virtual sal_uInt32 GetPointCount() const;
 virtual Point GetPoint(sal_uInt32 i) const;
diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx
index c07a69adbbb2..16127d914ec8 100644
--- a/include/svx/svdoedge.hxx
+++ b/include/svx/svdoedge.hxx
@@ -88,7 +88,7 @@ public:
 longnAngle2;   // exit angle at Obj2
 sal_uInt16  nObj1Lines;// 1..3
 sal_uInt16  nObj2Lines;// 1..3
-sal_uInt16  nMiddleLine;   // 0x=none, otherwiese 
point number of the beginning of the line
+sal_uInt16  nMiddleLine;   // 0x=none, otherwise 
point number of the beginning of the line
 
 public:
 SdrEdgeInfoRec()
@@ -288,7 +288,7 @@ public:
 // for geometry access
 ::basegfx::B2DPolygon getEdgeTrack() const;
 
-// helper method for SdrDragMethod::AddConnectorOverlays. Adds a overlay 
polygon for
+// helper method for SdrDragMethod::AddConnectorOverlays. Adds an overlay 
polygon for
 // this connector to rResult.
 basegfx::B2DPolygon ImplAddConnectorOverlay(SdrDragMethod& rDragMethod, 
bool bTail1, bool bTail2, bool bDetail) const;
 };
diff --git a/include/svx/svdpagv.hxx b/include/svx/svdpagv.hxx
index 79e5bbef684a..fe5884b33809 100644
--- a/include/svx/svdpagv.hxx
+++ b/include/svx/svdpagv.hxx
@@ -147,7 +147,7 @@ public:
 css::uno::Reference< css::awt::XControlContainer >
 GetControlContainer( const OutputDevice& _rDevice ) const;
 
-/// Sets all elements in the view which support a design and a alive mode 
into the given mode
+/// Sets all elements in the view which support a design and an alive mode 
into the given mode

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

2019-08-02 Thread Michael Meeks (via logerrit)
 sc/source/ui/unoobj/docuno.cxx |   10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)

New commits:
commit 5a9bdcbb0dfd6f149d243cd69e158aa3ad70dd91
Author: Michael Meeks 
AuthorDate: Sat Jul 27 21:33:05 2019 -0400
Commit: Michael Meeks 
CommitDate: Fri Aug 2 22:36:32 2019 +0200

calc: simplify getDocumentSize calculation.

Change-Id: Iee2ebf2c6ed74651556647264f519caa9c59dad7
Reviewed-on: https://gerrit.libreoffice.org/76492
Tested-by: Jenkins
Reviewed-by: Michael Meeks 

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 9c7f24611cf5..640e35ec4c89 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -617,15 +617,7 @@ Size ScModelObj::getDocumentSize()
 };
 
 long nDocWidthPixel = 
pViewData->GetLOKWidthHelper().computePosition(nEndCol, GetColWidthPx);
-
-
-auto GetRowHeightPx = [pThisDoc, nTab](SCROW nRow) {
-const sal_uInt16 nSize = pThisDoc->GetRowHeight(nRow, nTab);
-return ScViewData::ToPixel(nSize, 1.0 / TWIPS_PER_PIXEL);
-};
-
-long nDocHeightPixel = 
pViewData->GetLOKHeightHelper().computePosition(nEndRow, GetRowHeightPx);
-
+long nDocHeightPixel = pThisDoc->GetScaledRowHeight( 0, nEndRow, nTab, 1.0 
/ TWIPS_PER_PIXEL );
 
 if (nDocWidthPixel > 0 && nDocHeightPixel > 0)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-08-02 Thread Michael Meeks (via logerrit)
 desktop/source/lib/init.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit c7a86aa54bc4357a82a7fb584cbc5e6606b9e2c0
Author: Michael Meeks 
AuthorDate: Fri Aug 2 15:11:21 2019 -0400
Commit: Michael Meeks 
CommitDate: Fri Aug 2 22:36:08 2019 +0200

clipboard: add profile zones.

Change-Id: I2c005e78884fbe35c3045f76c203a7a369e97646
Reviewed-on: https://gerrit.libreoffice.org/76885
Tested-by: Jenkins
Reviewed-by: Michael Meeks 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index f17251c70bf5..e1640836bf3c 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3611,6 +3611,8 @@ static char* doc_getTextSelection(LibreOfficeKitDocument* 
pThis, const char* pMi
 
 static int doc_getSelectionType(LibreOfficeKitDocument* pThis)
 {
+comphelper::ProfileZone aZone("doc_getSelectionType");
+
 SolarMutexGuard aGuard;
 SetLastExceptionMsg();
 
@@ -3649,6 +3651,8 @@ static int doc_getClipboard(LibreOfficeKitDocument* pThis,
 size_t **pOutSizes,
 char  ***pOutStreams)
 {
+comphelper::ProfileZone aZone("doc_getClipboard");
+
 SolarMutexGuard aGuard;
 SetLastExceptionMsg();
 
@@ -3731,7 +3735,7 @@ static int doc_setClipboard(LibreOfficeKitDocument* pThis,
 const size_t  *pInSizes,
 const char   **pInStreams)
 {
-comphelper::ProfileZone aZone("doc_paste");
+comphelper::ProfileZone aZone("doc_setClipboard");
 
 SolarMutexGuard aGuard;
 SetLastExceptionMsg();
@@ -3761,6 +3765,8 @@ static int doc_setClipboard(LibreOfficeKitDocument* pThis,
 
 static bool doc_paste(LibreOfficeKitDocument* pThis, const char* pMimeType, 
const char* pData, size_t nSize)
 {
+comphelper::ProfileZone aZone("doc_paste");
+
 SolarMutexGuard aGuard;
 
 const char *pInMimeTypes[1];
___
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.2' - 3 commits - desktop/qa desktop/source include/LibreOfficeKit include/vcl sc/source sd/source

2019-08-02 Thread Ashod Nakashian (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |4 
 desktop/source/lib/init.cxx |   38 +++
 include/LibreOfficeKit/LibreOfficeKit.h |6 +
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   15 ++
 include/vcl/ITiledRenderable.hxx|   16 ++-
 sc/source/ui/unoobj/docuno.cxx  |6 -
 sd/source/ui/inc/DrawViewShell.hxx  |8 +
 sd/source/ui/inc/unomodel.hxx   |6 +
 sd/source/ui/slidesorter/controller/SlsPageSelector.cxx |   11 +-
 sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx |   13 +-
 sd/source/ui/unoidl/unomodel.cxx|   34 ++
 sd/source/ui/view/drviews1.cxx  |   62 
 12 files changed, 212 insertions(+), 7 deletions(-)

New commits:
commit 3750186a09655a9eac2d742e2aadf290c2819a8c
Author: Ashod Nakashian 
AuthorDate: Sun Sep 16 17:25:01 2018 -0400
Commit: Michael Meeks 
CommitDate: Fri Aug 2 16:30:29 2019 -0400

LOK: getPartInfo now returns list of selected parts

For spreadsheets, selected parts are still unimplemented,
so returns false for all.
For presentations, visible parts seem to be always
return false at load time.

Change-Id: I90c79617f88deec98849bb374ca0ba177cd9c9af
Reviewed-on: https://gerrit.libreoffice.org/69611
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
Reviewed-on: https://gerrit.libreoffice.org/73494
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index 4e9a80a5378b..2fc588b5c6ef 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -363,7 +363,8 @@ public:
 }
 
 /*
- * Used for sheets in spreadsheet documents.
+ * Used for sheets in spreadsheet documents,
+ * and slides in presentation documents.
  */
 virtual OUString getPartInfo(int /*nPart*/)
 {
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 5f8d326096a5..0c91c076df28 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -551,10 +551,14 @@ OUString ScModelObj::getPartInfo( int nPart )
 {
 OUString aPartInfo;
 ScViewData* pViewData = ScDocShell::GetViewData();
-bool bIsVisible = pViewData->GetDocument()->IsVisible(nPart);
+const bool bIsVisible = pViewData->GetDocument()->IsVisible(nPart);
+//FIXME: Implement IsSelected().
+const bool bIsSelected = false; 
//pViewData->GetDocument()->IsSelected(nPart);
 
 aPartInfo += "{ \"visible\": \"";
 aPartInfo += OUString::number(static_cast(bIsVisible));
+aPartInfo += "\", \"selected\": \"";
+aPartInfo += OUString::number(static_cast(bIsSelected));
 aPartInfo += "\" }";
 return aPartInfo;
 }
diff --git a/sd/source/ui/inc/DrawViewShell.hxx 
b/sd/source/ui/inc/DrawViewShell.hxx
index 71f1ed4a397c..df118b58ef1f 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -247,7 +247,13 @@ public:
 boolSwitchPage(sal_uInt16 nPage);
 boolIsSwitchPageAllowed() const;
 
+/**
+ * Mark the desired page as selected (1), deselected (0), toggle (2).
+ * nPage refers to the page in question.
+ */
 boolSelectPage(sal_uInt16 nPage, sal_uInt16 nSelect);
+boolIsSelected(sal_uInt16 nPage);
+boolIsVisible(sal_uInt16 nPage);
 
 voidGotoBookmark(const OUString& rBookmark);
 //Realize multi-selection of objects, If object is marked, the
diff --git a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx 
b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
index 1115d05227a9..544068f151b6 100644
--- a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
@@ -216,7 +216,7 @@ void PageSelector::CheckConsistency() const
 }
 }
 
-bool PageSelector::IsPageSelected (int nPageIndex)
+bool PageSelector::IsPageSelected(int nPageIndex)
 {
 SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
 if (pDescriptor.get() != nullptr)
@@ -225,6 +225,15 @@ bool PageSelector::IsPageSelected (int nPageIndex)
 return false;
 }
 
+bool PageSelector::IsPageVisible(int nPageIndex)
+{
+SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
+if (pDescriptor.get() != nullptr)
+return pDescriptor->HasState(PageDescriptor::ST_Visible);
+else
+return false;
+}
+
 int PageSelector::GetPageCount() const
 {
 return mrModel.GetPageCount();
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx 
b/sd/source/ui/slidesorter/inc/controller/SlsPageSelector.hxx
index cc994ced28af..c53c53519aaf 100644
--- a/sd/source/ui/

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 3 commits - configmgr/source desktop/qa desktop/source include/LibreOfficeKit

2019-08-02 Thread Ashod Nakashian (via logerrit)
 configmgr/source/access.cxx |9 +
 desktop/qa/desktop_lib/test_desktop_lib.cxx |3 ++-
 desktop/source/lib/init.cxx |   24 ++--
 include/LibreOfficeKit/LibreOfficeKit.h |3 +++
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   10 +++---
 5 files changed, 43 insertions(+), 6 deletions(-)

New commits:
commit 106c4786be04e60a25740d5b2af05c367563c669
Author: Ashod Nakashian 
AuthorDate: Mon Jan 28 10:03:32 2019 -0500
Commit: Michael Meeks 
CommitDate: Fri Aug 2 16:09:14 2019 -0400

configmgr: support changing locale language

Change-Id: Ia8318ce8ca3ae9fdbd526e0d41861e2863fb9a94
Reviewed-on: https://gerrit.libreoffice.org/68262
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/73485
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 26c8e7e5c516..c7ad2c538ae8 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -71,6 +71,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -1380,6 +1382,13 @@ rtl::Reference< ChildAccess > Access::getChild(OUString 
const & name) {
 locale.isEmpty(), "configmgr",
 ("access best-matching localized property value via \"*\""
  " with empty ; falling back to defaults"));
+
+// Since the locale given to us is the one used at initialization,
+// here we override it with the actual current-user's language to
+// support per-view localization in LOK.
+if (comphelper::LibreOfficeKit::isActive())
+locale = 
comphelper::LibreOfficeKit::getLanguageTag().getLanguage();
+
 if (!locale.isEmpty()) {
 // Find best match using an adaption of RFC 4647 lookup matching
 // rules, removing "-" or "_" delimited segments from the end:
commit d52461dbb1f918fe86bcf3f04630d44163e6f108
Author: Ashod Nakashian 
AuthorDate: Thu Jan 24 06:51:46 2019 -0500
Commit: Michael Meeks 
CommitDate: Fri Aug 2 16:08:45 2019 -0400

LOK: support creating view with options

This adds a new API createViewWithOptions
that make createView similar to documentLoad,
which also has documentViewWithOptions version.
This is primarily to support setting per-view
language and similar settings.

Change-Id: I0ae5a5b2410cf9e053aee8f7c8a6204af9038a31
Reviewed-on: https://gerrit.libreoffice.org/68261
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/7
Tested-by: Jenkins
Reviewed-by: Michael Meeks 

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 2b1c6ae96af6..16e9a516fa9d 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -2455,9 +2455,10 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(45), offsetof(struct 
_LibreOfficeKitDocumentClass, getSignatureState));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(46), offsetof(struct 
_LibreOfficeKitDocumentClass, renderShapeSelection));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(47), offsetof(struct 
_LibreOfficeKitDocumentClass, postWindowGestureEvent));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(48), offsetof(struct 
_LibreOfficeKitDocumentClass, createViewWithOptions));
 // Extending is fine, update this, and add new assert for the offsetof the
 // new method
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(48), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(49), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5ad5f1b7e3bc..3f2a3e0cdf32 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -684,6 +684,7 @@ static void doc_setClientZoom(LibreOfficeKitDocument* pThis,
 static void doc_setClientVisibleArea(LibreOfficeKitDocument* pThis, int nX, 
int nY, int nWidth, int nHeight);
 static void doc_setOutlineState(LibreOfficeKitDocument* pThis, bool bColumn, 
int nLevel, int nIndex, bool bHidden);
 static int doc_createView(LibreOfficeKitDocument* pThis);
+static int doc_createViewWithOptions(LibreOfficeKitDocument* pThis, const 
char* pOptions);
 static void doc_destroyView(LibreOfficeKitDocument* pThis, int nId);
 static void doc_setView(LibreOfficeKitDocument* pThis, int nId);
 static int doc_getView(LibreOfficeKitDocument* pThis);
@@ -792,6 +793,8 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
renderShapeSelection = doc_renderShapeSelection;
 m_pDocumentClass->postWindowGestureEvent = doc_postWindowGestureEvent;
 
+m_pDocumentClass->createViewWithOptions = doc_createViewWithOp

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 4 commits - desktop/qa desktop/source include/LibreOfficeKit include/vcl vcl/inc vcl/source

2019-08-02 Thread Tor Lillqvist (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |3 -
 desktop/source/lib/init.cxx |   45 ++
 include/LibreOfficeKit/LibreOfficeKit.h |9 +++
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   16 ++
 include/vcl/GestureEvent.hxx|   42 +
 include/vcl/commandevent.hxx|   24 +
 include/vcl/svapp.hxx   |3 +
 include/vcl/vclevent.hxx|1 
 vcl/inc/salwtype.hxx|   14 +
 vcl/inc/window.h|1 
 vcl/source/app/svapp.cxx|   68 +---
 vcl/source/control/imp_listbox.cxx  |4 +
 vcl/source/window/commandevent.cxx  |9 +++
 vcl/source/window/window.cxx|1 
 vcl/source/window/window2.cxx   |   20 
 vcl/source/window/winproc.cxx   |   44 ++
 16 files changed, 296 insertions(+), 8 deletions(-)

New commits:
commit e2817afbfff5039e3c2f40c250cf2a7a02accc5c
Author: Tor Lillqvist 
AuthorDate: Tue Mar 26 17:51:37 2019 +0200
Commit: Michael Meeks 
CommitDate: Fri Aug 2 15:36:52 2019 -0400

Make contents of combobox follow the finger when scrolling with a pan 
gesture

It is the contents that we are dragging with the gesture, not the
scrollbar "thumb". The DoScroll() call takes as argument how much the
"thumb" should be moved, though.

Change-Id: Id95a4bf9d2bb4e950dd85c6bebb4d2b5f2726ee0

diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index eb631d3edc8c..74e84ba381fa 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -765,7 +765,7 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
 else if(pData->meEventType == GestureEventType::PanningUpdate)
 {
 long nOriginalPosition = 
mpWindowImpl->mpFrameData->mnTouchPanPosition;
-pVScrl->DoScroll(nOriginalPosition + (pData->mfOffset));
+pVScrl->DoScroll(nOriginalPosition + (pData->mfOffset / 
pVScrl->GetVisibleSize()));
 }
 if (pData->meEventType == GestureEventType::PanningEnd)
 {
commit 690a6924ab6173547218151d7b9094154aaeea2a
Author: Tomaž Vajngerl 
AuthorDate: Mon Mar 25 18:23:36 2019 +0900
Commit: Michael Meeks 
CommitDate: Fri Aug 2 15:36:09 2019 -0400

tdf#124146 support posting of gesture event for LOKit

Change-Id: I51845f2e41dbcbe1ae6cb0a18cf9f42d5549968b
Reviewed-on: https://gerrit.libreoffice.org/69657
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 5e71f5771835..2b1c6ae96af6 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -2454,9 +2454,10 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(44), offsetof(struct 
_LibreOfficeKitDocumentClass, addCertificate));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(45), offsetof(struct 
_LibreOfficeKitDocumentClass, getSignatureState));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(46), offsetof(struct 
_LibreOfficeKitDocumentClass, renderShapeSelection));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(47), offsetof(struct 
_LibreOfficeKitDocumentClass, postWindowGestureEvent));
 // Extending is fine, update this, and add new assert for the offsetof the
 // new method
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(47), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(48), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7dd7fe6644e1..afceb472a8e6 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -101,6 +101,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -648,6 +649,12 @@ static void doc_postWindowMouseEvent 
(LibreOfficeKitDocument* pThis,
   int nCount,
   int nButtons,
   int nModifier);
+static void doc_postWindowGestureEvent(LibreOfficeKitDocument* pThis,
+  unsigned nLOKWindowId,
+  const char* pType,
+  int nX,
+  int nY,
+  int nOffset);
 static void doc_postUnoCommand(LibreOfficeKitDocument* pThis,
const char* pCommand,
const char* pArguments,
@@ -783,6 +790,7 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
getSignatureState = doc_

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 3 commits - editeng/source sc/source sw/source

2019-08-02 Thread Michael Meeks (via logerrit)
 editeng/source/editeng/editeng.cxx |3 +++
 sc/source/ui/view/viewfun5.cxx |3 ++-
 sw/source/filter/html/htmlplug.cxx |6 ++
 3 files changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 3e27cea44ccb2a34bd96c03ed2f279324a145ea6
Author: Michael Meeks 
AuthorDate: Fri May 31 14:38:34 2019 +0100
Commit: Michael Meeks 
CommitDate: Fri Aug 2 15:33:51 2019 -0400

Avoid odd crash where OLE object can't generate an image preview.

Change-Id: Ib77eca6907aa09383a96f3c9de6f7a7c4799c3bc

diff --git a/sw/source/filter/html/htmlplug.cxx 
b/sw/source/filter/html/htmlplug.cxx
index f71e81b9a8cc..1f1e50d3e489 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -1503,6 +1503,12 @@ Writer& OutHTML_FrameFormatOLENodeGrf( Writer& rWrt, 
const SwFrameFormat& rFrame
 return rWrt;
 }
 
+if ( !pOLENd->GetGraphic() )
+{
+SAL_WARN("sw.html", "Unexpected missing OLE fallback graphic");
+return rWrt;
+}
+
 Graphic aGraphic( *pOLENd->GetGraphic() );
 
 SwDocShell* pDocSh = rHTMLWrt.m_pDoc->GetDocShell();
commit d553a16bb89e1b4860b4f1dbbb9bbad4f9137460
Author: Michael Meeks 
AuthorDate: Wed May 29 17:53:35 2019 +0100
Commit: Michael Meeks 
CommitDate: Fri Aug 2 15:33:43 2019 -0400

lok: disable calc char-set dialog for HTML when pasting.

Change-Id: I3ec9e98549d06ae3e6b4ede89215a5137d01ccab

diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index fc5d357704cf..0eca9685ad61 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -304,7 +304,8 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId 
nFormatId,
 tools::SvRef xStream;
 if ( aDataHelper.GetSotStorageStream( nFormatId, xStream ) && 
xStream.is() )
 {
-if (nFormatId == SotClipboardFormatId::HTML)
+if (nFormatId == SotClipboardFormatId::HTML &&
+!comphelper::LibreOfficeKit::isActive())
 {
 // Launch the text import options dialog.  For now, we do
 // this for html pasting only, but in the future it may
commit 8a8affe9d4b4d33b10841f16f5121bcadfda9a99
Author: Michael Meeks 
AuthorDate: Wed May 29 15:20:32 2019 +0100
Commit: Michael Meeks 
CommitDate: Fri Aug 2 15:33:34 2019 -0400

lok: don't be prejudiced against a single missing mime-type.

Change-Id: Ic5004c306cbd01071c397ed1a61ef094b439a48f

diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index b8667061e42a..d547615299d2 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2720,6 +2720,9 @@ bool EditEngine::HasValidData( const css::uno::Reference< 
css::datatransfer::XTr
 {
 bool bValidData = false;
 
+if ( comphelper::LibreOfficeKit::isActive())
+return true;
+
 if ( rTransferable.is() )
 {
 // Every application that copies rtf or any other text format also 
copies plain text into the clipboard
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-08-02 Thread Michael Meeks (via logerrit)
 desktop/source/lib/lokclipboard.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 6d1bf3d1bde72b2cbc2d867dd6ff566b3c4e1ca6
Author: Michael Meeks 
AuthorDate: Fri Aug 2 15:26:32 2019 -0400
Commit: Michael Meeks 
CommitDate: Fri Aug 2 15:28:08 2019 -0400

clipboard: elide string constructor.

Change-Id: I1f476d981989296138ab9b9b58075919da4c09b8

diff --git a/desktop/source/lib/lokclipboard.cxx 
b/desktop/source/lib/lokclipboard.cxx
index 8b7577f3bf63..46c63bc02951 100644
--- a/desktop/source/lib/lokclipboard.cxx
+++ b/desktop/source/lib/lokclipboard.cxx
@@ -79,10 +79,7 @@ Sequence 
LOKClipboard::getSupportedServiceNames_static()
 return aRet;
 }
 
-OUString LOKClipboard::getImplementationName()
-{
-return OUString("com.sun.star.datatransfer.LOKClipboard");
-}
+OUString LOKClipboard::getImplementationName() { return 
"com.sun.star.datatransfer.LOKClipboard"; }
 
 Sequence LOKClipboard::getSupportedServiceNames()
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] website.git: Branch 'update' - check.php

2019-08-02 Thread Christian Lohmaier
 check.php |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit df8f54e8e4d0af2ddd778eb3b6209ffa540c6eeb
Author: Christian Lohmaier 
AuthorDate: Fri Aug 2 20:12:55 2019 +0200
Commit: Christian Lohmaier 
CommitDate: Fri Aug 2 20:12:55 2019 +0200

migrate 6.1 users to 6.2

diff --git a/check.php b/check.php
index c24b3ca..1e44101 100644
--- a/check.php
+++ b/check.php
@@ -618,11 +618,11 @@ $build_hash_to_version = array(
 #   where '' and '' will be substitued with the right value
 #   NOTE: '&' in the URL has to be escaped as &
 $update_map = array(
-'stable' => array('gitid'   => 
'5896ab1714085361c45cf540f76f60673dd96a72',
-  'id'  => 'LibreOffice 6.1.6',
-  'version' => '6.1.6',
+'stable' => array('gitid'   => 
'1ec314fa52f458adc18c4f025c545a4e8b22c159',
+  'id'  => 'LibreOffice 6.2.5',
+  'version' => '6.2.5',
   'update_type' => 'text/html',
-  'update_src'  => 
'https://www.libreoffice.org/download/download/?lang=&version=6.1.6',
+  'update_src'  => 
'https://www.libreoffice.org/download/download/?lang=&version=6.2.5',
   'substitute'  => true ),
 'latest' => array('gitid'   => 
'1ec314fa52f458adc18c4f025c545a4e8b22c159',
   'id'  => 'LibreOffice 6.2.5',
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - svx/source

2019-08-02 Thread Matthias Seidel (via logerrit)
 svx/source/sidebar/paragraph/ParaPropertyPanel.src |  532 ++---
 1 file changed, 268 insertions(+), 264 deletions(-)

New commits:
commit cc36ea775eb22fd95e3e746f1912264763faf57d
Author: Matthias Seidel 
AuthorDate: Fri Aug 2 18:03:42 2019 +
Commit: Matthias Seidel 
CommitDate: Fri Aug 2 18:03:42 2019 +

Cleaned up whitespace, reordered Increase/Decrease Indent in sidebar

diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.src 
b/svx/source/sidebar/paragraph/ParaPropertyPanel.src
index ffa10f7a7928..5824653f08ac 100755
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.src
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.src
@@ -19,112 +19,114 @@
  *
  */
 
+
+
 #include "ParaPropertyPanel.hrc"
 #include 
 #include "helpid.hrc"
 
-#define MASKCOLOR   MaskColor = Color { Red = 0x ; Green = 0x ; Blue = 
0x ; };
+#define MASKCOLOR MaskColor = Color { Red = 0x ; Green = 0x ; Blue = 
0x ; };
 
-#define SVX_PROPERTYPANEL_PARA_VERT_IDLIST \
-IdList =   \
-{  \
-IID_VERT_TOP ; \
+#define SVX_PROPERTYPANEL_PARA_VERT_IDLIST  \
+IdList =\
+{   \
+IID_VERT_TOP ;  \
 IID_VERT_CENTER ;   \
 IID_VERT_BOTTOM ;   \
-}; \
+};  \
 IdCount = { 3 ; };
 
 #define SVX_PROPERTYPANEL_PARA_NUMBULLET_IDLIST \
-IdList =   \
-{  \
-IID_BULLET ;   \
-IID_NUMBER ;   \
-}; \
+IdList =\
+{   \
+IID_BULLET ;\
+IID_NUMBER ;\
+};  \
 IdCount = { 2 ; };
 
-//add by wj for sym2_7380
+// add by wj for sym2_7380
 #define SVX_PROPERTYPANEL_PARA_NUMBULLET_IDLIST_RTL \
-IdList =   \
-{  \
-IID_BULLET ;   \
-IID_NUMBER ;   \
-}; \
+IdList =\
+{   \
+IID_BULLET ;\
+IID_NUMBER ;\
+};  \
 IdCount = { 2 ; };
 
 Control RID_SIDEBAR_PARA_PANEL
 {
-OutputSize = TRUE;
-DialogControl = TRUE;
-Border = FALSE;
-Size = MAP_APPFONT( PROPERTYPAGE_WIDTH, PARA_SECTIONPAGE_HEIGHT );
+OutputSize = TRUE ;
+DialogControl = TRUE ;
+Border = FALSE ;
+Size = MAP_APPFONT ( PROPERTYPAGE_WIDTH, PARA_SECTIONPAGE_HEIGHT ) ;
 HelpID = HID_PROPERTYPANEL_PARA_SECTION ;
-Text = "Paragraph";
+Text = "Paragraph" ;
 
 ToolBox TBX_HORIZONTALALIGNMENT
 {
-Pos = MAP_APPFONT ( TBX_HORI_ALIGN_X , TBX_HORI_ALIGN_Y );
-Size = MAP_APPFONT ( ALIGNMENT_TBX_WIDTH*4 ,ALIGNMENT_TBX_HEIGHT);
+Pos = MAP_APPFONT ( TBX_HORI_ALIGN_X, TBX_HORI_ALIGN_Y ) ;
+Size = MAP_APPFONT ( ALIGNMENT_TBX_WIDTH*4 ,ALIGNMENT_TBX_HEIGHT) ;
 SVLook = TRUE ;
 Border = FALSE ;
-HelpID = HID_PPROPERTYPANEL_PARA_TBX_HALIGN;
-Text = "Horizontal Alignment";
+HelpID = HID_PPROPERTYPANEL_PARA_TBX_HALIGN ;
+Text = "Horizontal Alignment" ;
 ItemList =
 {
 ToolBoxItem
 {
 Identifier = BT_SUBSTLEFT ;
-HelpID = HID_PPROPERTYPANEL_PARA_TBI_HALIGN_LEFT;
+HelpID = HID_PPROPERTYPANEL_PARA_TBI_HALIGN_LEFT ;
 Text [ en-US ] = "Align Left" ;
 };
 ToolBoxItem
 {
 Identifier = BT_SUBSTCENTER ;
-HelpID = HID_PPROPERTYPANEL_PARA_TBI_HALIGN_CENTER;
+HelpID = HID_PPROPERTYPANEL_PARA_TBI_HALIGN_CENTER ;
 Text [ en-US ] = "Align Center" ;
 };
 ToolBoxItem
 {
 Identifier = BT_SUBSTRIGHT ;
-HelpID = HID_PPROPERTYPANEL_PARA_TBI_HALIGN_RIGHT;
+HelpID = HID_PPROPERTYPANEL_PARA_TBI_HALIGN_RIGHT ;
 Text [ en-US ] = "Align Right" ;
 };
 ToolBoxItem
 {
 Identifier = BT_SUBSTJUSTIFY ;
-HelpID = HID_PPROPERTYPANEL_PARA_TBI_HALIGN_JUSTIFY;
+HelpID = HID_PPROPERTYPANEL_PARA_TBI_HALIGN_JUSTIFY ;
 Text [ en-US ] = "Align Justified" ;
 };
 };
 };
 ToolBox TBX_VERT_ALIGN
 {
-HelpID = HID_PPROPERTYPANEL_PARA_TBX_VALIGN;
+HelpID = HID_PPROPERTYPANEL_PARA_TBX_VALIGN ;
 SVLook = TRUE ;
 Border = FALSE ;
-Pos = MAP_APPFONT ( TBX_VERT_ALIGN_X,  TBX_VERT_ALIGN_Y ) ;
-Size = MAP_APPFONT ( TOOLBOX_ITEM_WIDTH * 3 ,  TOOLBOX_ITEM_HEIGHT) ;
+Pos = MAP_APPFONT ( TBX_VERT_ALIGN_X, TBX_VERT_ALIGN_Y ) ;
+Size = MAP_APPFONT ( TOOLBOX_ITEM_WIDTH * 3, TOOLBOX_ITEM_HEIGHT) ;
  

[Libreoffice-commits] core.git: 2 commits - desktop/source offapi/com

2019-08-02 Thread Michael Meeks (via logerrit)
 desktop/source/lib/lokclipboard.hxx |2 +-
 offapi/com/sun/star/datatransfer/XTransferable2.idl |2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 6a3c5b418437ae928553530b938f4b7b3e5ea9e0
Author: Michael Meeks 
AuthorDate: Fri Aug 2 13:58:48 2019 -0400
Commit: Michael Meeks 
CommitDate: Fri Aug 2 14:00:30 2019 -0400

clipboard: elide string constructor.

Change-Id: I18c01e77e0ddf4b86f2f5ba610509555160f96c3

diff --git a/desktop/source/lib/lokclipboard.hxx 
b/desktop/source/lib/lokclipboard.hxx
index 6c0509265db4..7da5f3ef3900 100644
--- a/desktop/source/lib/lokclipboard.hxx
+++ b/desktop/source/lib/lokclipboard.hxx
@@ -54,7 +54,7 @@ public:
 const css::uno::Reference& 
xTransferable,
 const 
css::uno::Reference& 
xClipboardOwner)
 override;
-OUString SAL_CALL getName() override { return OUString("CLIPBOARD"); }
+OUString SAL_CALL getName() override { return "CLIPBOARD"; }
 
 // XClipboardEx
 sal_Int8 SAL_CALL getRenderingCapabilities() override { return 0; }
commit e5e26b83e722bc49727c434ea5c775a97f737566
Author: Michael Meeks 
AuthorDate: Fri Aug 2 13:13:51 2019 -0400
Commit: Michael Meeks 
CommitDate: Fri Aug 2 14:00:30 2019 -0400

XTransferable2 - add missing 'since' tag on isComplex.

Change-Id: Ib8165edb4d87fb5bbb115fe26b8dbbe5a70bd59a

diff --git a/offapi/com/sun/star/datatransfer/XTransferable2.idl 
b/offapi/com/sun/star/datatransfer/XTransferable2.idl
index a6b53f0671e2..9fb99e600177 100644
--- a/offapi/com/sun/star/datatransfer/XTransferable2.idl
+++ b/offapi/com/sun/star/datatransfer/XTransferable2.idl
@@ -34,6 +34,8 @@ interface XTransferable2 : 
com::sun::star::datatransfer::XTransferable
 
 /**
  * Returns true if the selection contains embedded objects or is a large 
text blob.
+ *
+ * @since LibreOffice 6.4
  */
 boolean isComplex();
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Re: [Libreoffice-commits] core.git: 27 commits ...

2019-08-02 Thread Michael Meeks
Hi Stephan,

On 02/08/2019 17:07, Stephan Bergmann wrote:
>> +    /**
>> + * Returns true if the selection contains embedded objects or is
>> a large text blob.
> 
> Please provide a @since tag.

Will add that.

> (And one wonders why these patches didn't get in through Gerrit.)

Oh - that's simple, it's a chunk of work that for uninteresting,
customer related reasons had to be done internally, and fiddling with
and/or re-basing 27 stacked commits multiple times will either kill CI
for everyone or if done one by one, take an extremely long time to get
in, and/or would need squashing thus loosing the history and/or
authorship; so I pushed just a terminal commit through gerrit / CI.

The good news is that (with the Online side which is also coming) this
gives us some excellent clipboard support for Online.

Thanks for the review,

Michael.

-- 
michael.me...@collabora.com <><, GM Collabora Productivity
Hangout: mejme...@gmail.com, Skype: mmeeks
(M) +44 7795 666 147 - timezone usually UK / Europe
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

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

2019-08-02 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/tiledrendering/data/image-comment.odt |binary
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   47 +
 sw/source/uibase/docvw/PostItMgr.cxx   |   22 -
 3 files changed, 67 insertions(+), 2 deletions(-)

New commits:
commit d2f4a7518946ac195505308e74f411c25a459fcc
Author: Miklos Vajna 
AuthorDate: Fri Aug 2 12:31:00 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Aug 2 19:04:40 2019 +0200

sw comments on frames: no overlay in the LOK API, either: insert case

This is similar to commit 28fcb7d86765194b4015e7023449333f43aba0c5 (sw
comments on frames: no overlay in the LOK API, either, 2019-07-16), but
that one handled the initial fetch of comment states, while this one
does the incremental updates.

With this, there is no overlay on commented images right after inserting
them.

(cherry picked from commit 225930119543975697d3f5f042e271f0ec6c6b15)

[ cp-6.2 backport note: added explicit IsEmpty() check, otherwise we
would expose negative width/height for empty rectangles via LOK, which
doesn't happen on master. ]

[ cp-6.2 backport note: use the comphelper::dispatchCommand() variant
that takes no explicit frames, the default frame seems to working here
and we can't be explicit on this branch. ]

Change-Id: I060303806a6611b113b4813300ed1cafd0b654fa
Reviewed-on: https://gerrit.libreoffice.org/76880
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/tiledrendering/data/image-comment.odt 
b/sw/qa/extras/tiledrendering/data/image-comment.odt
new file mode 100644
index ..0852bedabf7f
Binary files /dev/null and b/sw/qa/extras/tiledrendering/data/image-comment.odt 
differ
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 9b2984b7af9f..701c135a579e 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -98,6 +98,7 @@ public:
 void testCreateViewTextSelection();
 void testRedlineColors();
 void testCommentEndTextEdit();
+void testCommentInsert();
 void testCursorPosition();
 void testPaintCallbacks();
 void testUndoRepairResult();
@@ -156,6 +157,7 @@ public:
 CPPUNIT_TEST(testCreateViewTextSelection);
 CPPUNIT_TEST(testRedlineColors);
 CPPUNIT_TEST(testCommentEndTextEdit);
+CPPUNIT_TEST(testCommentInsert);
 CPPUNIT_TEST(testCursorPosition);
 CPPUNIT_TEST(testPaintCallbacks);
 CPPUNIT_TEST(testUndoRepairResult);
@@ -727,6 +729,8 @@ public:
 boost::property_tree::ptree m_aRedlineTableChanged;
 /// Redline table modified payload
 boost::property_tree::ptree m_aRedlineTableModified;
+/// Post-it / annotation payload.
+boost::property_tree::ptree m_aComment;
 
 ViewCallback()
 : m_bOwnCursorInvalidated(false),
@@ -861,6 +865,14 @@ public:
 m_aRedlineTableModified = 
m_aRedlineTableModified.get_child("redline");
 }
 break;
+case LOK_CALLBACK_COMMENT:
+{
+m_aComment.clear();
+std::stringstream aStream(pPayload);
+boost::property_tree::read_json(aStream, m_aComment);
+m_aComment = m_aComment.get_child("comment");
+}
+break;
 }
 }
 };
@@ -1721,6 +1733,41 @@ void SwTiledRenderingTest::testCommentEndTextEdit()
 CPPUNIT_ASSERT(aView1.m_bTilesInvalidated);
 }
 
+void SwTiledRenderingTest::testCommentInsert()
+{
+// Load a document with an as-char image in it.
+comphelper::LibreOfficeKit::setActive();
+comphelper::LibreOfficeKit::setTiledAnnotations(false);
+SwXTextDocument* pXTextDocument = createDoc("image-comment.odt");
+SwDoc* pDoc = pXTextDocument->GetDocShell()->GetDoc();
+SwView* pView = pDoc->GetDocShell()->GetView();
+
+// Select the image.
+pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, 
SfxCallMode::SYNCHRON);
+// Make sure SwTextShell is replaced with SwDrawShell right now, not after 
120 ms, as set in the
+// SwView ctor.
+pView->StopShellTimer();
+
+// Add a comment.
+uno::Sequence aPropertyValues = 
comphelper::InitPropertySequence(
+{
+{"Text", uno::makeAny(OUString("some text"))},
+{"Author", uno::makeAny(OUString("me"))},
+});
+ViewCallback aView;
+
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback,
 &aView);
+comphelper::dispatchCommand(".uno:InsertAnnotation", aPropertyValues);
+Scheduler::ProcessEventsToIdle();
+OString 
aAnchorPos(aView.m_aComment.get_child("anchorPos").get_value().c_str());
+// Without the accompanying fix in place, this test would have failed with
+// - Expected: 1418, 1418, 0, 0
+// - Actual  : 1418, 1418, 1024, 1024
+// i.e. the anchor position was a non-empty rectangle.
+CPPUN

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

2019-08-02 Thread Andrea Gelmini (via logerrit)
 desktop/source/lib/init.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 07e2d6ca179f13666a9d7adfbf1d907ddc5b878b
Author: Andrea Gelmini 
AuthorDate: Fri Aug 2 18:37:43 2019 +0200
Commit: Julien Nabet 
CommitDate: Fri Aug 2 19:01:33 2019 +0200

Removed duplicated include

Change-Id: Ic54fab581f34f385f5a6395bb39020299fbf2bde
Reviewed-on: https://gerrit.libreoffice.org/76882
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7193b1ec4571..f17251c70bf5 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -56,7 +56,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Re: [Libreoffice-commits] core.git: 27 commits - desktop/qa desktop/source editeng/source include/LibreOfficeKit include/vcl offapi/com sc/source sfx2/source sw/source vcl/source

2019-08-02 Thread Stephan Bergmann

On 02/08/2019 17:45, Michael Meeks (via logerrit) wrote:

  desktop/qa/data/objects.odt |binary
  desktop/qa/desktop_lib/test_desktop_lib.cxx |   61 +++
  desktop/source/lib/init.cxx |  331 
++--
  desktop/source/lib/lokclipboard.cxx |  225 +++--
  desktop/source/lib/lokclipboard.hxx |   83 -
  editeng/source/editeng/editeng.cxx  |3
  include/LibreOfficeKit/LibreOfficeKit.h |   19 +
  include/LibreOfficeKit/LibreOfficeKit.hxx   |   50 +++
  include/LibreOfficeKit/LibreOfficeKitEnums.h|9
  include/vcl/transfer.hxx|1
  offapi/com/sun/star/datatransfer/XTransferable2.idl |5
  sc/source/ui/app/seltrans.cxx   |   12
  sc/source/ui/app/transobj.cxx   |   83 +++--
  sc/source/ui/inc/seltrans.hxx   |1
  sc/source/ui/inc/transobj.hxx   |1
  sc/source/ui/view/viewfun5.cxx  |3
  sfx2/source/view/lokhelper.cxx  |   17 -
  sw/source/filter/html/htmlplug.cxx  |6
  sw/source/filter/html/wrthtml.cxx   |   24 -
  sw/source/filter/html/wrthtml.hxx   |6
  sw/source/uibase/dochdl/swdtflvr.cxx|   42 ++
  sw/source/uibase/inc/swdtflvr.hxx   |1
  vcl/source/treelist/transfer.cxx|6
  23 files changed, 863 insertions(+), 126 deletions(-)

New commits:

[...]

commit 7e174f327a3cf16a09e4b2f8e2ffba2225c21901
Author: Ashod Nakashian 
AuthorDate: Fri Jul 19 23:51:16 2019 +0100
Commit: Michael Meeks 
CommitDate: Fri Aug 2 11:41:47 2019 -0400

 LOK: Support detecting complex selections
 
 Includes unit-test, but is otherwise not complete

 implementation.
 
 Change-Id: I5fdcd543358caab1858f6351238c21312665839c



[...]

diff --git a/offapi/com/sun/star/datatransfer/XTransferable2.idl 
b/offapi/com/sun/star/datatransfer/XTransferable2.idl
index f792a969ded8..a6b53f0671e2 100644
--- a/offapi/com/sun/star/datatransfer/XTransferable2.idl
+++ b/offapi/com/sun/star/datatransfer/XTransferable2.idl
@@ -31,6 +31,11 @@ interface XTransferable2 : 
com::sun::star::datatransfer::XTransferable
   */
  any getTransferData2( [in] DataFlavor aFlavor, [in] string aDestShellID )
  raises ( UnsupportedFlavorException, com::sun::star::io::IOException 
);
+
+/**
+ * Returns true if the selection contains embedded objects or is a large 
text blob.


Please provide a @since tag.  (And one wonders why these patches didn't 
get in through Gerrit.)



+ */
+boolean isComplex();
  };
  
  }; }; }; };

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

[Libreoffice-commits] core.git: 27 commits - desktop/qa desktop/source editeng/source include/LibreOfficeKit include/vcl offapi/com sc/source sfx2/source sw/source vcl/source

2019-08-02 Thread Michael Meeks (via logerrit)
 desktop/qa/data/objects.odt |binary
 desktop/qa/desktop_lib/test_desktop_lib.cxx |   61 +++
 desktop/source/lib/init.cxx |  331 ++--
 desktop/source/lib/lokclipboard.cxx |  225 +++--
 desktop/source/lib/lokclipboard.hxx |   83 -
 editeng/source/editeng/editeng.cxx  |3 
 include/LibreOfficeKit/LibreOfficeKit.h |   19 +
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   50 +++
 include/LibreOfficeKit/LibreOfficeKitEnums.h|9 
 include/vcl/transfer.hxx|1 
 offapi/com/sun/star/datatransfer/XTransferable2.idl |5 
 sc/source/ui/app/seltrans.cxx   |   12 
 sc/source/ui/app/transobj.cxx   |   83 +++--
 sc/source/ui/inc/seltrans.hxx   |1 
 sc/source/ui/inc/transobj.hxx   |1 
 sc/source/ui/view/viewfun5.cxx  |3 
 sfx2/source/view/lokhelper.cxx  |   17 -
 sw/source/filter/html/htmlplug.cxx  |6 
 sw/source/filter/html/wrthtml.cxx   |   24 -
 sw/source/filter/html/wrthtml.hxx   |6 
 sw/source/uibase/dochdl/swdtflvr.cxx|   42 ++
 sw/source/uibase/inc/swdtflvr.hxx   |1 
 vcl/source/treelist/transfer.cxx|6 
 23 files changed, 863 insertions(+), 126 deletions(-)

New commits:
commit 343bc8260d428f2fc3b61c82af25eda4adfc04e4
Author: Michael Meeks 
AuthorDate: Sat Jul 27 16:56:46 2019 -0400
Commit: Michael Meeks 
CommitDate: Fri Aug 2 11:41:50 2019 -0400

Use implicit OString constructor and cleanup casts.

Change-Id: I686c32d3666bceb23dd86a4220428fa319ffdf45

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 8a7934b9f0e2..8ccb6b01335f 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -2649,13 +2649,13 @@ void DesktopLOKTest::testComplexSelection()
 static const OString aText("hello world");
 
 // Certainly not complex.
-CPPUNIT_ASSERT_EQUAL((int)LOK_SELTYPE_NONE, 
pDocument->pClass->getSelectionType(pDocument));
+CPPUNIT_ASSERT_EQUAL(static_cast(LOK_SELTYPE_NONE), 
pDocument->pClass->getSelectionType(pDocument));
 
 // Paste text.
 CPPUNIT_ASSERT(pDocument->pClass->paste(pDocument, 
"text/plain;charset=utf-8", aText.getStr(), aText.getLength()));
 
 // No selection.
-CPPUNIT_ASSERT_EQUAL((int)LOK_SELTYPE_NONE, 
pDocument->pClass->getSelectionType(pDocument));
+CPPUNIT_ASSERT_EQUAL(static_cast(LOK_SELTYPE_NONE), 
pDocument->pClass->getSelectionType(pDocument));
 
 // Paste an image.
 OUString aFileURL;
@@ -2689,7 +2689,7 @@ void DesktopLOKTest::testComplexSelection()
 free(pText);
 
 // We expect this to be complex.
-CPPUNIT_ASSERT_EQUAL((int)LOK_SELTYPE_COMPLEX, 
pDocument->pClass->getSelectionType(pDocument));
+CPPUNIT_ASSERT_EQUAL(static_cast(LOK_SELTYPE_COMPLEX), 
pDocument->pClass->getSelectionType(pDocument));
 }
 
 namespace {
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 03c0d86267d1..7193b1ec4571 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -986,6 +986,15 @@ LibLODocument_Impl::~LibLODocument_Impl()
 }
 }
 
+static OUString getGenerator()
+{
+OUString sGenerator(
+Translate::ExpandVariables("%PRODUCTNAME 
%PRODUCTVERSION%PRODUCTEXTENSION (%1)"));
+OUString os("$_OS");
+::rtl::Bootstrap::expandMacros(os);
+return sGenerator.replaceFirst("%1", os);
+}
+
 extern "C" {
 
 CallbackFlushHandler::CallbackFlushHandler(LibreOfficeKitDocument* pDocument, 
LibreOfficeKitCallback pCallback, void* pData)
@@ -3427,15 +3436,6 @@ static void doc_setTextSelection(LibreOfficeKitDocument* 
pThis, int nType, int n
 pDoc->setTextSelection(nType, nX, nY);
 }
 
-static OUString getGenerator()
-{
-OUString sGenerator(
-Translate::ExpandVariables("%PRODUCTNAME 
%PRODUCTVERSION%PRODUCTEXTENSION (%1)"));
-OUString os("$_OS");
-::rtl::Bootstrap::expandMacros(os);
-return sGenerator.replaceFirst("%1", os);
-}
-
 static bool getFromTransferrable(
 const css::uno::Reference &xTransferable,
 const OString &aInMimeType, OString &aRet);
@@ -3633,7 +3633,7 @@ static int doc_getSelectionType(LibreOfficeKitDocument* 
pThis)
 return LOK_SELTYPE_COMPLEX;
 
 OString aRet;
-bool bSuccess = getFromTransferrable(xTransferable, 
OString("text/plain;charset=utf-8"), aRet);
+bool bSuccess = getFromTransferrable(xTransferable, 
"text/plain;charset=utf-8", aRet);
 if (!bSuccess)
 return LOK_SELTYPE_NONE;
 
commit 666427b7a51eb16829d96563b53bcef2de541da1
Author: Michael Meeks 
AuthorDate: Thu Jul 25 19:02:47 2019 +0100
Commit: Michael Meeks 
CommitDate: Fri Aug 2

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - shell/source

2019-08-02 Thread Mike Kaganski (via logerrit)
 shell/source/win32/SysShExec.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit dd2b7919058fc0e23a7117d39110d3ecaaad1fb2
Author: Mike Kaganski 
AuthorDate: Thu Aug 1 10:52:12 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 2 17:37:29 2019 +0200

tdf#126641: don't fail on file URLs with fragment

This only fixes part that the URL refuses to open the target file.
Honoring fragment isn't fixed here, since it's the system call to
ShellExecuteExW that in this case internally converts the file URL
into a system path, and strips the fragment from it.

Regression from commit d59ec4cd1660410fa1b18c50d2d83b1417a82ddc.

Change-Id: I6c9ed27e9a5bd7f2780dd3be96f816a6e825e043
Reviewed-on: https://gerrit.libreoffice.org/76778
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 2207269a84c7c9920af3385b837ce67978c720b4)
Reviewed-on: https://gerrit.libreoffice.org/76848
Reviewed-by: Stephan Bergmann 

diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index 4786e4ddedc7..910aae1c095f 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -315,7 +315,9 @@ void SAL_CALL CSysShExec::execute( const OUString& 
aCommand, const OUString& aPa
 }
 if (uri->getScheme().equalsIgnoreAsciiCase("file")) {
 OUString pathname;
-auto const e1 = osl::FileBase::getSystemPathFromFileURL(aCommand, 
pathname);
+uri->clearFragment(); // getSystemPathFromFileURL fails for URLs 
with fragment
+auto const e1
+= 
osl::FileBase::getSystemPathFromFileURL(uri->getUriReference(), pathname);
 if (e1 != osl::FileBase::E_None) {
 throw css::lang::IllegalArgumentException(
 ("XSystemShellExecute.execute, getSystemPathFromFileURL <" 
+ aCommand
___
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.2' - sw/qa sw/source

2019-08-02 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/tiledrendering/data/image-comment.odt |binary
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   48 +
 sw/source/uibase/docvw/PostItMgr.cxx   |   22 -
 3 files changed, 68 insertions(+), 2 deletions(-)

New commits:
commit 5e2977d3a93a2145333102e91e490ec9226aa519
Author: Miklos Vajna 
AuthorDate: Fri Aug 2 12:31:00 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Aug 2 17:36:22 2019 +0200

sw comments on frames: no overlay in the LOK API, either: insert case

This is similar to commit 28fcb7d86765194b4015e7023449333f43aba0c5 (sw
comments on frames: no overlay in the LOK API, either, 2019-07-16), but
that one handled the initial fetch of comment states, while this one
does the incremental updates.

With this, there is no overlay on commented images right after inserting
them.

(cherry picked from commit 225930119543975697d3f5f042e271f0ec6c6b15)

[ cp-6.2 backport note: added explicit IsEmpty() check, otherwise we
would expose negative width/height for empty rectangles via LOK, which
doesn't happen on master. ]

Change-Id: I060303806a6611b113b4813300ed1cafd0b654fa
Reviewed-on: https://gerrit.libreoffice.org/76869
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/tiledrendering/data/image-comment.odt 
b/sw/qa/extras/tiledrendering/data/image-comment.odt
new file mode 100644
index ..0852bedabf7f
Binary files /dev/null and b/sw/qa/extras/tiledrendering/data/image-comment.odt 
differ
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 04069f6f904b..3605ede97e71 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -95,6 +95,7 @@ public:
 void testCreateViewTextSelection();
 void testRedlineColors();
 void testCommentEndTextEdit();
+void testCommentInsert();
 void testCursorPosition();
 void testPaintCallbacks();
 void testUndoRepairResult();
@@ -152,6 +153,7 @@ public:
 CPPUNIT_TEST(testCreateViewTextSelection);
 CPPUNIT_TEST(testRedlineColors);
 CPPUNIT_TEST(testCommentEndTextEdit);
+CPPUNIT_TEST(testCommentInsert);
 CPPUNIT_TEST(testCursorPosition);
 CPPUNIT_TEST(testPaintCallbacks);
 CPPUNIT_TEST(testUndoRepairResult);
@@ -702,6 +704,8 @@ public:
 boost::property_tree::ptree m_aRedlineTableChanged;
 /// Redline table modified payload
 boost::property_tree::ptree m_aRedlineTableModified;
+/// Post-it / annotation payload.
+boost::property_tree::ptree m_aComment;
 
 ViewCallback()
 : m_bOwnCursorInvalidated(false),
@@ -836,6 +840,14 @@ public:
 m_aRedlineTableModified = 
m_aRedlineTableModified.get_child("redline");
 }
 break;
+case LOK_CALLBACK_COMMENT:
+{
+m_aComment.clear();
+std::stringstream aStream(pPayload);
+boost::property_tree::read_json(aStream, m_aComment);
+m_aComment = m_aComment.get_child("comment");
+}
+break;
 }
 }
 };
@@ -1673,6 +1685,42 @@ void SwTiledRenderingTest::testCommentEndTextEdit()
 comphelper::LibreOfficeKit::setActive(false);
 }
 
+void SwTiledRenderingTest::testCommentInsert()
+{
+// Load a document with an as-char image in it.
+comphelper::LibreOfficeKit::setActive();
+comphelper::LibreOfficeKit::setTiledAnnotations(false);
+SwXTextDocument* pXTextDocument = createDoc("image-comment.odt");
+SwDoc* pDoc = pXTextDocument->GetDocShell()->GetDoc();
+SwView* pView = pDoc->GetDocShell()->GetView();
+
+// Select the image.
+pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, 
SfxCallMode::SYNCHRON);
+// Make sure SwTextShell is replaced with SwDrawShell right now, not after 
120 ms, as set in the
+// SwView ctor.
+pView->StopShellTimer();
+
+// Add a comment.
+uno::Reference xFrame = 
pView->GetViewFrame()->GetFrame().GetFrameInterface();
+uno::Sequence aPropertyValues = 
comphelper::InitPropertySequence(
+{
+{"Text", uno::makeAny(OUString("some text"))},
+{"Author", uno::makeAny(OUString("me"))},
+});
+ViewCallback aView;
+
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback,
 &aView);
+comphelper::dispatchCommand(".uno:InsertAnnotation", xFrame, 
aPropertyValues);
+Scheduler::ProcessEventsToIdle();
+OString 
aAnchorPos(aView.m_aComment.get_child("anchorPos").get_value().c_str());
+// Without the accompanying fix in place, this test would have failed with
+// - Expected: 1418, 1418, 0, 0
+// - Actual  : 1418, 1418, 1024, 1024
+// i.e. the anchor position was a non-empty rectangle.
+CPPUNIT_ASSERT_EQUAL(OString("1418, 1418, 0, 0"), aAnchorPos);
+comphelper::LibreOfficeKit::setTiledAnnota

[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sc/source

2019-08-02 Thread Jim Raykowski (via logerrit)
 sc/source/ui/cctrl/checklistmenu.cxx |   31 ++-
 1 file changed, 26 insertions(+), 5 deletions(-)

New commits:
commit 32cf2f6614526e560623498afe4d80b29fc52649
Author: Jim Raykowski 
AuthorDate: Mon Jul 15 23:41:55 2019 -0800
Commit: Xisco Faulí 
CommitDate: Fri Aug 2 17:18:44 2019 +0200

tdf#122774 Make all ScCheckListMenuWindow items keyboard accessible

This patch provides keyboard tab navigation to the menu window menu
items.

In addition to the Ok button being already disabled when search is empty
the patch disables the check list box, toggle all check box select,
single button and unselect single button. This prevents keyboard focus
from being trapped in the check list box and from tab navigation visting
useless controls when search is empty.

This patch also provides a hack fix for tdf#122772

Change-Id: I7677d544ae63acc8eca08877ecd001d394fcfaca
Reviewed-on: https://gerrit.libreoffice.org/75684
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 
(cherry picked from commit 3e50aea3c723e82ea4acf32aae8d72e875d4b321)
Reviewed-on: https://gerrit.libreoffice.org/76532
Reviewed-by: Xisco Faulí 
(cherry picked from commit f111aba46cbb037bd82d7246bb0a111b87931f03)
Reviewed-on: https://gerrit.libreoffice.org/76564

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 492c64b3d1c7..587e2e41a353 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1207,6 +1207,7 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, TriStateHdl, 
Button*, void)
 }
 
 mePrevToggleAllState = maChkToggleAll->GetState();
+maTabStops.SetTabStop(maChkToggleAll); // Needed for when accelerator is 
used
 }
 
 IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl, Edit&, void)
@@ -1282,7 +1283,14 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl, 
Edit&, void)
 maChkToggleAll->SetState( TRISTATE_INDET );
 
 if ( !maConfig.mbAllowEmptySet )
-maBtnOk->Enable( nSelCount != 0);
+{
+const bool bEmptySet( nSelCount == 0 );
+maChecks->Enable( !bEmptySet );
+maChkToggleAll->Enable( !bEmptySet );
+maBtnSelectSingle->Enable( !bEmptySet );
+maBtnUnselectSingle->Enable( !bEmptySet );
+maBtnOk->Enable( !bEmptySet );
+}
 }
 
 IMPL_LINK( ScCheckListMenuWindow, CheckHdl, SvTreeListBox*, pChecks, void )
@@ -1320,14 +1328,27 @@ void ScCheckListMenuWindow::MouseMove(const MouseEvent& 
rMEvt)
 
 bool ScCheckListMenuWindow::EventNotify(NotifyEvent& rNEvt)
 {
-if (rNEvt.GetType() == MouseNotifyEvent::KEYUP)
+MouseNotifyEvent nType = rNEvt.GetType();
+if (HasFocus() && nType == MouseNotifyEvent::GETFOCUS)
+{
+setSelectedMenuItem( 0 , false, false );
+return true;
+}
+if (nType == MouseNotifyEvent::KEYINPUT)
 {
 const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
 const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode();
-bool bShift = rCode.IsShift();
-if (rCode.GetCode() == KEY_TAB)
+const sal_uInt16 nCode = rCode.GetCode();
+if (rCode.IsMod2()) // Hack to prevent tdf#122772
+{
+if (nCode == KEY_DOWN || nCode == KEY_RIGHT)
+return true;
+}
+else
 {
-maTabStops.CycleFocus(bShift);
+bool bShift = rCode.IsShift();
+if (nCode == KEY_TAB)
+maTabStops.CycleFocus(bShift);
 return true;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - connectivity/qa connectivity/source

2019-08-02 Thread Tamas Bunth (via logerrit)
 connectivity/qa/connectivity/mysql/mysql.cxx |   41 ++
 connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx |  164 
+-
 connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx |7 
 3 files changed, 130 insertions(+), 82 deletions(-)

New commits:
commit 8c32cc30dbba3ee466b75628436ab790d6561e36
Author: Tamas Bunth 
AuthorDate: Mon Jul 29 13:27:38 2019 +0200
Commit: Xisco Faulí 
CommitDate: Fri Aug 2 17:12:57 2019 +0200

mysqlc: Fix query of cursor position in result set

Fix queries like "IsAfterLast" in result sets of prepared statements in
the mysql driver.

Cursor position is stored in the driver, since the mysql C driver does
not support the query of the cursor position.

The cursor position works the following way:
- 0 means the cursor is on "BeforeFirst". In that state calling of
  getXXX() methods is user error.
- 1 means the first row is already fetched.
- n means the last fow is fetched, where n is the total number of rows
  in the result set.
- Everything bigger than n is "AfterLast"

Change-Id: I131f2042606897019cc0f868dbc4151faf4850ac
Reviewed-on: https://gerrit.libreoffice.org/76549
Tested-by: Jenkins
Reviewed-by: Tamás Bunth 
(cherry picked from commit 41d3be4a48ea2abe019cd4f9b51bef703a2dc454)
Reviewed-on: https://gerrit.libreoffice.org/76585
Reviewed-by: Xisco Faulí 

diff --git a/connectivity/qa/connectivity/mysql/mysql.cxx 
b/connectivity/qa/connectivity/mysql/mysql.cxx
index 3e48ce5b3750..24af725b0110 100644
--- a/connectivity/qa/connectivity/mysql/mysql.cxx
+++ b/connectivity/qa/connectivity/mysql/mysql.cxx
@@ -54,6 +54,7 @@ public:
 void testDBMetaData();
 void testTimestampField();
 void testNumericConversionPrepared();
+void testPreparedStmtIsAfterLast();
 
 CPPUNIT_TEST_SUITE(MysqlTestDriver);
 CPPUNIT_TEST(testDBConnection);
@@ -63,6 +64,7 @@ public:
 CPPUNIT_TEST(testDBMetaData);
 CPPUNIT_TEST(testTimestampField);
 CPPUNIT_TEST(testNumericConversionPrepared);
+CPPUNIT_TEST(testPreparedStmtIsAfterLast);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -405,6 +407,45 @@ void MysqlTestDriver::testNumericConversionPrepared()
 xStatement->executeUpdate("DROP TABLE myTestTable");
 }
 
+/**
+ * Test cursor positioning method isAfterLast in case of using prepared
+ * statement.
+ */
+void MysqlTestDriver::testPreparedStmtIsAfterLast()
+{
+Reference xConnection = m_xDriver->connect(m_sUrl, m_infos);
+if (!xConnection.is())
+CPPUNIT_ASSERT_MESSAGE("cannot connect to data source!", 
xConnection.is());
+uno::Reference xStatement = xConnection->createStatement();
+CPPUNIT_ASSERT(xStatement.is());
+xStatement->executeUpdate("DROP TABLE IF EXISTS myTestTable");
+
+// create test table
+xStatement->executeUpdate("CREATE TABLE myTestTable (id INTEGER PRIMARY 
KEY)");
+Reference xPrepared
+= xConnection->prepareStatement(OUString{ "INSERT INTO myTestTable 
VALUES (?)" });
+Reference xParams(xPrepared, UNO_QUERY);
+constexpr int ROW_COUNT = 6;
+for (int i = 0; i < ROW_COUNT; ++i)
+{
+xParams->setShort(1, i);
+xPrepared->executeUpdate();
+}
+
+// query test table
+xPrepared = xConnection->prepareStatement("SELECT id from myTestTable 
where id = 3");
+Reference xResultSet = xPrepared->executeQuery();
+
+// There should be exactly one row, therefore IsAfterLast is false at 
first.
+xResultSet->next();
+CPPUNIT_ASSERT(!xResultSet->isAfterLast());
+
+// attempt to fetch more data
+bool hasData = xResultSet->next();
+CPPUNIT_ASSERT(!hasData); // now we are on "AfterLast"
+CPPUNIT_ASSERT(xResultSet->isAfterLast());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(MysqlTestDriver);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
index 3b9e4a2aeb57..6c4711f65c71 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
@@ -100,6 +100,62 @@ const std::type_index 
getTypeFromMysqlType(enum_field_types type)
 }
 }
 
+bool OPreparedResultSet::fetchResult()
+{
+// allocate array if it does not exist
+if (m_aData == nullptr)
+{
+m_aData.reset(new MYSQL_BIND[m_nColumnCount]);
+memset(m_aData.get(), 0, m_nColumnCount * sizeof(MYSQL_BIND));
+m_aMetaData.reset(new BindMetaData[m_nColumnCount]);
+}
+for (sal_Int32 i = 0; i < m_nColumnCount; ++i)
+{
+m_aMetaData[i].is_null = 0;
+m_aMetaData[i].length = 0l;
+m_aMetaData[i].error = 0;
+
+m_aData[i].is_null = &m_aMetaData[i].is_null;
+m_aData[i].buffer_length = m_aFields[i].type == MYSQL_TYPE_BLOB ? 0 : 
m_aFields[i].length;
+m_aData[i].length = &m_aMetaData[i].length

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - connectivity/source

2019-08-02 Thread Tamas Bunth (via logerrit)
 connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx |8 
+++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 7b2fa9b757f0860d82a7bea9efa503a50a6b70a0
Author: Tamas Bunth 
AuthorDate: Tue Jul 30 15:05:35 2019 +0200
Commit: Xisco Faulí 
CommitDate: Fri Aug 2 17:13:29 2019 +0200

mysqlc: Support reading blob as string

Change-Id: I1ef0c3817bc255e7f0c38aca73c475b19d5d7d9b
Reviewed-on: https://gerrit.libreoffice.org/76600
Tested-by: Jenkins
Reviewed-by: Tamás Bunth 
(cherry picked from commit cc4c20d08fca59819e121c0678d1e595a97c92c9)
Reviewed-on: https://gerrit.libreoffice.org/76746
Reviewed-by: Xisco Faulí 

diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
index 6c4711f65c71..6146ff6a9816 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
@@ -309,7 +309,10 @@ template <> DateTime 
OPreparedResultSet::retrieveValue(sal_Int32 column)
 
 template <> OUString OPreparedResultSet::retrieveValue(sal_Int32 column)
 {
-if (getTypeFromMysqlType(m_aFields[column - 1].type) != 
std::type_index(typeid(OUString)))
+// redirect call to the appropiate method if needed
+// BLOB can be simply read out as string
+if (getTypeFromMysqlType(m_aFields[column - 1].type) != 
std::type_index(typeid(OUString))
+&& m_aFields[column - 1].type != MYSQL_TYPE_BLOB)
 return getRowSetValue(column);
 const char* sStr = static_cast(m_aData[column - 1].buffer);
 
@@ -345,6 +348,9 @@ ORowSetValue OPreparedResultSet::getRowSetValue(sal_Int32 
nColumnIndex)
 case MYSQL_TYPE_DECIMAL:
 case MYSQL_TYPE_NEWDECIMAL:
 return getString(nColumnIndex);
+case MYSQL_TYPE_BLOB:
+throw SQLException("Column with type BLOB cannot be converted", 
*this, OUString(), 1,
+   Any());
 default:
 SAL_WARN("connectivity.mysqlc", 
"OPreparedResultSet::getRowSetValue: unknown type: "
 << m_aFields[nColumnIndex - 
1].type);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-08-02 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/generalpage.cxx |4 ++--
 dbaccess/source/ui/dlg/generalpage.hxx |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a513402155a394b5d6f121360618a34b949e43dd
Author: Caolán McNamara 
AuthorDate: Fri Aug 2 10:50:50 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 17:00:26 2019 +0200

weld OGeneralPageDialog

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

diff --git a/dbaccess/source/ui/dlg/generalpage.cxx 
b/dbaccess/source/ui/dlg/generalpage.cxx
index 58e00ac046d9..2cf8d121999e 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -400,8 +400,8 @@ namespace dbaui
 }
 
 // OGeneralPageDialog
-OGeneralPageDialog::OGeneralPageDialog( vcl::Window* pParent, const 
SfxItemSet& _rItems )
-:OGeneralPage( pParent, "dbaccess/ui/generalpagedialog.ui", _rItems )
+OGeneralPageDialog::OGeneralPageDialog(TabPageParent pParent, const 
SfxItemSet& _rItems)
+: OGeneralPage(pParent, "dbaccess/ui/generalpagedialog.ui", _rItems)
 {
 }
 
diff --git a/dbaccess/source/ui/dlg/generalpage.hxx 
b/dbaccess/source/ui/dlg/generalpage.hxx
index 8cbeb0f88694..bc6b477caf42 100644
--- a/dbaccess/source/ui/dlg/generalpage.hxx
+++ b/dbaccess/source/ui/dlg/generalpage.hxx
@@ -104,7 +104,7 @@ namespace dbaui
 class OGeneralPageDialog : public OGeneralPage
 {
 public:
-OGeneralPageDialog( vcl::Window* pParent, const SfxItemSet& _rItems );
+OGeneralPageDialog(TabPageParent pParent, const SfxItemSet& _rItems);
 
 protected:
 virtual bool FillItemSet( SfxItemSet* _rCoreAttrs ) override;
___
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.2' - 2 commits - connectivity/source

2019-08-02 Thread Tamas Bunth (via logerrit)
 connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx |   13 
++
 connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx |4 +--
 2 files changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 52a396d4a676021d595bde0af3bd7f3254193ea8
Author: Tamas Bunth 
AuthorDate: Thu May 30 18:34:03 2019 +0200
Commit: Tamás Bunth 
CommitDate: Fri Aug 2 16:50:37 2019 +0200

mysqlc: Add support for mysql type INT24

Which is mapped to sal_Int32.

Change-Id: Ibf12e92a20034440fa990ed0c6f1196f4ca3f40f
Reviewed-on: https://gerrit.libreoffice.org/73218
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/76733
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Bunth 

diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
index 2eaeceb66b90..ead866968ead 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace rtl;
 #include 
@@ -66,6 +67,7 @@ const std::type_index getTypeFromMysqlType(enum_field_types 
type)
 case MYSQL_TYPE_SHORT:
 return std::type_index(typeid(sal_Int16));
 case MYSQL_TYPE_LONG:
+case MYSQL_TYPE_INT24:
 return std::type_index(typeid(sal_Int32));
 case MYSQL_TYPE_LONGLONG:
 return std::type_index(typeid(sal_Int64));
@@ -88,7 +90,6 @@ const std::type_index getTypeFromMysqlType(enum_field_types 
type)
 case MYSQL_TYPE_BLOB:
 case MYSQL_TYPE_YEAR:
 case MYSQL_TYPE_BIT:
-case MYSQL_TYPE_INT24:
 case MYSQL_TYPE_SET:
 case MYSQL_TYPE_ENUM:
 case MYSQL_TYPE_GEOMETRY:
@@ -268,6 +269,7 @@ ORowSetValue OPreparedResultSet::getRowSetValue(sal_Int32 
nColumnIndex)
 case MYSQL_TYPE_SHORT:
 return getShort(nColumnIndex);
 case MYSQL_TYPE_LONG:
+case MYSQL_TYPE_INT24:
 return getInt(nColumnIndex);
 case MYSQL_TYPE_LONGLONG:
 return getLong(nColumnIndex);
@@ -287,9 +289,10 @@ ORowSetValue OPreparedResultSet::getRowSetValue(sal_Int32 
nColumnIndex)
 case MYSQL_TYPE_NEWDECIMAL:
 return getString(nColumnIndex);
 default:
-mysqlc_sdbc_driver::throwFeatureNotImplementedException(
-"OPreparedResultSet::getRowSetValue", *this);
-return ORowSetValue();
+SAL_WARN("connectivity.mysqlc", 
"OPreparedResultSet::getRowSetValue: unknown type: "
+<< m_aFields[nColumnIndex - 
1].type);
+throw SQLException("Unknown column type when fetching result", 
*this, OUString(), 1,
+   Any());
 }
 }
 
commit 62bd8daf20b66cea5b84b05fb04b9ed5240b1ab9
Author: Tamas Bunth 
AuthorDate: Thu Apr 25 12:17:06 2019 +0200
Commit: Tamás Bunth 
CommitDate: Fri Aug 2 16:50:19 2019 +0200

mysqlc: move template specialization to namespace

so gcc 4.8 would be happy about it.
See:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480

Change-Id: I7e696758c5598b9e64947bc9b1606c653becddce
Reviewed-on: https://gerrit.libreoffice.org/71294
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/76732
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Bunth 

diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
index b3630072c143..2eaeceb66b90 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
@@ -198,6 +198,7 @@ template  T 
OPreparedResultSet::retrieveValue(sal_Int32 nColumnIndex
 return getRowSetValue(nColumnIndex);
 }
 
+namespace connectivity { namespace mysqlc {
 template <> uno::Sequence 
OPreparedResultSet::retrieveValue(sal_Int32 column)
 {
 // TODO make conversion possible
@@ -256,6 +257,7 @@ template <> OUString 
OPreparedResultSet::retrieveValue(sal_Int32 column)
 OUString sReturn = OUString(sStr, *m_aData[column - 1].length, m_encoding);
 return sReturn;
 }
+}}
 
 ORowSetValue OPreparedResultSet::getRowSetValue(sal_Int32 nColumnIndex)
 {
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx 
b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx
index b43935039efe..d10c8df5dacd 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx
@@ -92,8 +92,8 @@ class OPreparedResultSet final : public OBase_Mutex,
 
 void SAL_CALL getFastPropertyValue(Any& rValue, sal_Int32 nHandle) 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - connectivity/Library_mysqlc.mk connectivity/qa connectivity/source

2019-08-02 Thread Tamas Bunth (via logerrit)
 connectivity/Library_mysqlc.mk   |1 
 connectivity/qa/connectivity/mysql/mysql.cxx |   32 
 connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx |  353 
--
 connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx |5 
 4 files changed, 210 insertions(+), 181 deletions(-)

New commits:
commit e7d3a95d9c87150bcaaf78d5a790ea44e6c1e41b
Author: Tamas Bunth 
AuthorDate: Mon Apr 22 19:09:24 2019 +0200
Commit: Tamás Bunth 
CommitDate: Fri Aug 2 16:49:55 2019 +0200

mysqlc: Allow conversions between different types

Change-Id: I54c1f438a755267db0896637c79f915de9113f83
Reviewed-on: https://gerrit.libreoffice.org/71246
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/76731
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Bunth 

diff --git a/connectivity/Library_mysqlc.mk b/connectivity/Library_mysqlc.mk
index 9dba7769a9a2..455f9b2224df 100644
--- a/connectivity/Library_mysqlc.mk
+++ b/connectivity/Library_mysqlc.mk
@@ -31,6 +31,7 @@ $(eval $(call gb_Library_use_sdk_api,mysqlc))
 
 $(eval $(call gb_Library_use_libraries,mysqlc,\
cppu \
+dbtools \
sal \
salhelper \
comphelper \
diff --git a/connectivity/qa/connectivity/mysql/mysql.cxx 
b/connectivity/qa/connectivity/mysql/mysql.cxx
index 38683149d432..546e916bd0a7 100644
--- a/connectivity/qa/connectivity/mysql/mysql.cxx
+++ b/connectivity/qa/connectivity/mysql/mysql.cxx
@@ -52,6 +52,7 @@ public:
 void testMultipleResultsets();
 void testDBMetaData();
 void testTimestampField();
+void testNumericConversionPrepared();
 
 CPPUNIT_TEST_SUITE(MysqlTestDriver);
 CPPUNIT_TEST(testDBConnection);
@@ -60,6 +61,7 @@ public:
 CPPUNIT_TEST(testMultipleResultsets);
 CPPUNIT_TEST(testDBMetaData);
 CPPUNIT_TEST(testTimestampField);
+CPPUNIT_TEST(testNumericConversionPrepared);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -358,6 +360,36 @@ void MysqlTestDriver::testTimestampField()
 xStatement->executeUpdate("DROP TABLE myTestTable");
 }
 
+/**
+ * Test getting value from a decimal type column from a result set of a
+ * prepared statement, getting as a tinyint, string, short, int, long.
+ */
+void MysqlTestDriver::testNumericConversionPrepared()
+{
+Reference xConnection = m_xDriver->connect(m_sUrl, m_infos);
+if (!xConnection.is())
+CPPUNIT_ASSERT_MESSAGE("cannot connect to data source!", 
xConnection.is());
+uno::Reference xStatement = xConnection->createStatement();
+CPPUNIT_ASSERT(xStatement.is());
+xStatement->executeUpdate("DROP TABLE IF EXISTS myTestTable");
+
+xStatement->executeUpdate("CREATE TABLE myTestTable (myDecimal 
DECIMAL(4,2))");
+xStatement->executeUpdate("INSERT INTO myTestTable VALUES (11.22)");
+Reference xPrepared
+= xConnection->prepareStatement("SELECT * from myTestTable");
+Reference xResultSet = xPrepared->executeQuery();
+xResultSet->next(); // use it
+Reference xRow(xResultSet, UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("11.22"), xRow->getString(1));
+// converting to integer types results in rounding down the number
+CPPUNIT_ASSERT_EQUAL(static_cast(11), xRow->getByte(1));
+CPPUNIT_ASSERT_EQUAL(static_cast(11), xRow->getShort(1));
+CPPUNIT_ASSERT_EQUAL(static_cast(11), xRow->getInt(1));
+CPPUNIT_ASSERT_EQUAL(static_cast(11), xRow->getLong(1));
+
+xStatement->executeUpdate("DROP TABLE myTestTable");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(MysqlTestDriver);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
index a3e45937b610..b3630072c143 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
@@ -38,6 +38,7 @@ using namespace rtl;
 #include 
 
 using namespace connectivity::mysqlc;
+using namespace connectivity;
 using namespace cppu;
 using namespace com::sun::star;
 using namespace com::sun::star::lang;
@@ -51,6 +52,52 @@ using namespace ::comphelper;
 using ::osl::MutexGuard;
 
 #include 
+#include 
+#include 
+
+namespace
+{
+const std::type_index getTypeFromMysqlType(enum_field_types type)
+{
+switch (type)
+{
+case MYSQL_TYPE_TINY:
+return std::type_index(typeid(sal_Int8));
+case MYSQL_TYPE_SHORT:
+return std::type_index(typeid(sal_Int16));
+case MYSQL_TYPE_LONG:
+return std::type_index(typeid(sal_Int32));
+case MYSQL_TYPE_LONGLONG:
+return std::type_index(typeid(sal_Int64));
+case MYSQL_TYPE_FLOAT:
+return std::type_index(typeid(float));
+case MYSQL_TYPE_DOUBLE:
+return std::type_index(typeid(double));
+case MYSQL_TYPE_TIMESTAMP:
+case MYSQL_TYPE_DATE

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - connectivity/qa connectivity/source

2019-08-02 Thread Tamas Bunth (via logerrit)
 connectivity/qa/connectivity/mysql/mysql.cxx|   36 
+
 connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx |   11 +-
 connectivity/source/drivers/mysqlc/mysqlc_resultset.hxx |2 
 connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx |   40 
+-
 4 files changed, 67 insertions(+), 22 deletions(-)

New commits:
commit 4f2271cef80ade0edfc272afd13388a8d67ccf2e
Author: Tamas Bunth 
AuthorDate: Tue Jan 29 13:00:21 2019 +0100
Commit: Tamás Bunth 
CommitDate: Fri Aug 2 16:49:35 2019 +0200

mysqlc: fix timestamp query of result set

Also add test for inserting and reading timestamp values.

Change-Id: I2ba997c438f4e33965b0fe0602e58eddeff38b01
Reviewed-on: https://gerrit.libreoffice.org/67066
Tested-by: Jenkins
Reviewed-by: Tamás Bunth 
Reviewed-on: https://gerrit.libreoffice.org/67091
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/76730
Tested-by: Jenkins CollaboraOffice 

diff --git a/connectivity/qa/connectivity/mysql/mysql.cxx 
b/connectivity/qa/connectivity/mysql/mysql.cxx
index 77e82c9cdfc5..38683149d432 100644
--- a/connectivity/qa/connectivity/mysql/mysql.cxx
+++ b/connectivity/qa/connectivity/mysql/mysql.cxx
@@ -20,6 +20,8 @@
 #include 
 #include 
 #include 
+
+#include 
 #include 
 #include 
 
@@ -49,6 +51,7 @@ public:
 void testDBPositionChange();
 void testMultipleResultsets();
 void testDBMetaData();
+void testTimestampField();
 
 CPPUNIT_TEST_SUITE(MysqlTestDriver);
 CPPUNIT_TEST(testDBConnection);
@@ -56,6 +59,7 @@ public:
 CPPUNIT_TEST(testIntegerInsertAndQuery);
 CPPUNIT_TEST(testMultipleResultsets);
 CPPUNIT_TEST(testDBMetaData);
+CPPUNIT_TEST(testTimestampField);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -322,6 +326,38 @@ void MysqlTestDriver::testDBMetaData()
 nUpdateCount = xStatement->executeUpdate("DROP TABLE myTestTable");
 }
 
+void MysqlTestDriver::testTimestampField()
+{
+Reference xConnection = m_xDriver->connect(m_sUrl, m_infos);
+if (!xConnection.is())
+CPPUNIT_ASSERT_MESSAGE("cannot connect to data source!", 
xConnection.is());
+uno::Reference xStatement = xConnection->createStatement();
+CPPUNIT_ASSERT(xStatement.is());
+xStatement->executeUpdate("DROP TABLE IF EXISTS myTestTable");
+
+xStatement->executeUpdate(
+"CREATE TABLE myTestTable (id INTEGER PRIMARY KEY, mytimestamp 
timestamp)");
+xStatement->executeUpdate("INSERT INTO myTestTable VALUES (1, '2008-02-16 
20:15:03')");
+
+// now let's query
+Reference xResultSet
+= xStatement->executeQuery("SELECT mytimestamp from myTestTable");
+
+xResultSet->next(); // use it
+Reference xRow(xResultSet, UNO_QUERY);
+CPPUNIT_ASSERT_MESSAGE("cannot extract row from result set!", xRow.is());
+util::DateTime dt = xRow->getTimestamp(1);
+CPPUNIT_ASSERT_EQUAL(static_cast(2008), dt.Year);
+CPPUNIT_ASSERT_EQUAL(static_cast(2), dt.Month);
+CPPUNIT_ASSERT_EQUAL(static_cast(16), dt.Day);
+
+CPPUNIT_ASSERT_EQUAL(static_cast(20), dt.Hours);
+CPPUNIT_ASSERT_EQUAL(static_cast(15), dt.Minutes);
+CPPUNIT_ASSERT_EQUAL(static_cast(3), dt.Seconds);
+
+xStatement->executeUpdate("DROP TABLE myTestTable");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(MysqlTestDriver);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
index 1d93aa952383..6fb5f1e3ee61 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
@@ -235,7 +235,7 @@ uno::Reference SAL_CALL 
OResultSet::getBinaryStream(sal_Int32 colu
 
 OString sVal = m_aRows[m_nRowPosition][column - 1];
 return new SequenceInputStream{ uno::Sequence(
-reinterpret_cast(sVal.getStr()), getDataLength(column 
- 1)) };
+reinterpret_cast(sVal.getStr()), 
getDataLength(column)) };
 }
 
 uno::Reference SAL_CALL OResultSet::getCharacterStream(sal_Int32 
column)
@@ -285,7 +285,7 @@ uno::Sequence SAL_CALL 
OResultSet::getBytes(sal_Int32 column)
 return uno::Sequence();
 
 return uno::Sequence(reinterpret_cast(sVal.getStr()),
-   getDataLength(column - 1));
+   getDataLength(column));
 }
 
 Date SAL_CALL OResultSet::getDate(sal_Int32 column)
@@ -488,7 +488,7 @@ Time SAL_CALL OResultSet::getTime(sal_Int32 column)
 return t;
 
 OString sVal = m_aRows[m_nRowPosition][column - 1];
-OString timeString{ sVal.getStr(), getDataLength(column - 1) };
+OString timeString{ sVal.getStr(), getDataLength(column) };
 OString token;
 sal_Int32 nIndex, i = 0;
 
@@ -528,11 +528,14 @@ DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 
column)
 
 // YY-MM-DD HH:MM:SS
 std::vector dateAndTime
-= lcl_split(OString{ sVal

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - connectivity/qa connectivity/source

2019-08-02 Thread Tamas Bunth (via logerrit)
 connectivity/qa/connectivity/mysql/mysql.cxx|   84 
 connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx  |2 
 connectivity/source/drivers/mysqlc/mysqlc_general.cxx   |   26 +-
 connectivity/source/drivers/mysqlc/mysqlc_general.hxx   |4 
 connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx |2 
 connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx |9 
 connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx |   99 
+-
 connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.hxx |   31 +--
 8 files changed, 182 insertions(+), 75 deletions(-)

New commits:
commit 3d5adeab32a1b40dff203face30223ce7d298c26
Author: Tamas Bunth 
AuthorDate: Tue Jan 22 13:06:45 2019 +0100
Commit: Tamás Bunth 
CommitDate: Fri Aug 2 16:49:13 2019 +0200

mysqlc: resultset's previous() on first position..

.. should move the cursor backwards to beforeFirst position and return
false.

Change-Id: Icbb4bed0ea39ea3a0bf375d5616e3ef768fc69d9
Reviewed-on: https://gerrit.libreoffice.org/66730
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/76729
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Bunth 

diff --git a/connectivity/qa/connectivity/mysql/mysql.cxx 
b/connectivity/qa/connectivity/mysql/mysql.cxx
index 414a0de569e2..77e82c9cdfc5 100644
--- a/connectivity/qa/connectivity/mysql/mysql.cxx
+++ b/connectivity/qa/connectivity/mysql/mysql.cxx
@@ -241,6 +241,12 @@ void MysqlTestDriver::testDBPositionChange()
 xResultSet->first();
 CPPUNIT_ASSERT_EQUAL(1, xResultSet->getRow());
 
+// Now previous should put the cursor to before-first position, but it
+// should return with false.
+successPrevious = xResultSet->previous();
+CPPUNIT_ASSERT(!successPrevious);
+CPPUNIT_ASSERT_EQUAL(0, xResultSet->getRow());
+
 nUpdateCount = xStatement->executeUpdate("DROP TABLE myTestTable");
 CPPUNIT_ASSERT_EQUAL(0, nUpdateCount); // it's a DDL statement
 }
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
index be02c7c73ee3..1d93aa952383 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
@@ -659,8 +659,15 @@ sal_Bool SAL_CALL OResultSet::previous()
 MutexGuard aGuard(m_aMutex);
 checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
 
-if (m_nRowPosition <= 0)
+if (m_nRowPosition == 0)
+{
+m_nRowPosition--;
 return false;
+}
+else if (m_nRowPosition < 0)
+{
+return false;
+}
 
 m_nRowPosition--;
 return true;
commit 4348e54817da8b8b4348935fff74ca9d8b7ab4e0
Author: Tamas Bunth 
AuthorDate: Sat Dec 29 15:22:56 2018 +0100
Commit: Tamás Bunth 
CommitDate: Fri Aug 2 16:49:03 2019 +0200

mysqlc: Fix result set metadata related issue

In order to allow fetching result of multiple result sets at time same
time, all the data is fetched and copied on demand from the mysql result
set. The mysql result set (MYSQL_RES) is freed afterwards.

That means we need a copy of the meta information as well. Now all the
meta data is stored in the driver for each result set, so it does not
depend on the MYSQL_RES structure anymore.

Also add test case for invoking some meta data queries before and after
fetching the result set.

Change-Id: Ie8bf993926ebe89cd362ab0b311d1f3d164b84df
Reviewed-on: https://gerrit.libreoffice.org/65855
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/76726
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tamás Bunth 

diff --git a/connectivity/qa/connectivity/mysql/mysql.cxx 
b/connectivity/qa/connectivity/mysql/mysql.cxx
index 24436641fe6c..414a0de569e2 100644
--- a/connectivity/qa/connectivity/mysql/mysql.cxx
+++ b/connectivity/qa/connectivity/mysql/mysql.cxx
@@ -13,7 +13,10 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -44,11 +47,15 @@ public:
 void testCreateAndDropTable();
 void testIntegerInsertAndQuery();
 void testDBPositionChange();
+void testMultipleResultsets();
+void testDBMetaData();
 
 CPPUNIT_TEST_SUITE(MysqlTestDriver);
 CPPUNIT_TEST(testDBConnection);
 CPPUNIT_TEST(testCreateAndDropTable);
 CPPUNIT_TEST(testIntegerInsertAndQuery);
+CPPUNIT_TEST(testMultipleResultsets);
+CPPUNIT_TEST(testDBMetaData);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -238,6 +245,77 @@ void MysqlTestDriver::testDBPositionChange()
 CPPUNIT_ASSERT_EQUAL(0, nUpdateCount); // it's a DDL statement
 }
 
+void MysqlTestDriver::testMultipleResultsets()
+{
+Reference xConnection = m_xDriver->connect(m_sUrl, m_infos);
+CPPUNIT_ASSERT(xConnection.is(

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - dbaccess/uiconfig

2019-08-02 Thread Caolán McNamara (via logerrit)
 dbaccess/uiconfig/ui/useradmindialog.ui |   20 +---
 1 file changed, 17 insertions(+), 3 deletions(-)

New commits:
commit bf847968bc0aaafdc6c0dfee19b959516b7939ab
Author: Caolán McNamara 
AuthorDate: Wed Jul 31 20:23:02 2019 +0100
Commit: Xisco Faulí 
CommitDate: Fri Aug 2 16:43:21 2019 +0200

crash on missing reset button

in database user admin dialog

Change-Id: Icbacf37d23994ddb81fa0aa3f67468aeaf1d71f2
Reviewed-on: https://gerrit.libreoffice.org/76768
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/dbaccess/uiconfig/ui/useradmindialog.ui 
b/dbaccess/uiconfig/ui/useradmindialog.ui
index f84e756cef1e..4b470a9b5838 100644
--- a/dbaccess/uiconfig/ui/useradmindialog.ui
+++ b/dbaccess/uiconfig/ui/useradmindialog.ui
@@ -24,6 +24,19 @@
 False
 end
 
+  
+gtk-revert-to-saved
+True
+True
+True
+  
+  
+False
+True
+0
+  
+
+
   
 gtk-ok
 True
@@ -36,7 +49,7 @@
   
 False
 True
-0
+1
   
 
 
@@ -50,7 +63,7 @@
   
 False
 True
-1
+2
   
 
 
@@ -64,7 +77,7 @@
   
 False
 True
-2
+3
 True
   
 
@@ -138,6 +151,7 @@
   
 
 
+  reset
   ok
   cancel
   help
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sw/CppunitTest_sw_ww8import.mk sw/qa sw/source

2019-08-02 Thread Miklos Vajna (via logerrit)
 sw/CppunitTest_sw_ww8import.mk|1 +
 sw/qa/extras/ww8import/data/tdf112535.doc |binary
 sw/qa/extras/ww8import/ww8import.cxx  |   20 
 sw/source/filter/ww8/ww8graf.cxx  |8 
 4 files changed, 29 insertions(+)

New commits:
commit 4927f0c98c4231cb126e6d2e958971dcf5aa5268
Author: Miklos Vajna 
AuthorDate: Mon Jul 29 20:49:21 2019 +0200
Commit: Xisco Faulí 
CommitDate: Fri Aug 2 16:41:41 2019 +0200

tdf#112535 DOC import: fix handling the have contour but no polygon case

In case a graphic has contour enabled, but there is no wrap polygon,
that means auto-contour in Writer, and no contour in Word, so handle
this difference during DOC import.

Regarding the DOCX import -> DOC export -> DOC import scenario, this
fixes a regression from commit 628a0f313ed05db0149db680837c99267a77ea3c
(DOCX drawingML import: handle SurroundContour shape property,
2014-08-11), though the DOC import part was always broken, I think.

(cherry picked from commit 90928f23994d8fc1d9cc7edf95880782c8ca712a)

Change-Id: I6049fcf5df20736b702de901aef7068826d43f18
Reviewed-on: https://gerrit.libreoffice.org/76579
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/sw/CppunitTest_sw_ww8import.mk b/sw/CppunitTest_sw_ww8import.mk
index 31a7dcbe80ba..01e0d6b95164 100644
--- a/sw/CppunitTest_sw_ww8import.mk
+++ b/sw/CppunitTest_sw_ww8import.mk
@@ -25,6 +25,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ww8import, \
 unotest \
 vcl \
 sfx \
+svl \
 sw \
utl \
 ))
diff --git a/sw/qa/extras/ww8import/data/tdf112535.doc 
b/sw/qa/extras/ww8import/data/tdf112535.doc
new file mode 100644
index ..4eea19ecd54c
Binary files /dev/null and b/sw/qa/extras/ww8import/data/tdf112535.doc differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx 
b/sw/qa/extras/ww8import/ww8import.cxx
index 73495cea2754..bd29b496fea4 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -85,6 +86,25 @@ DECLARE_WW8IMPORT_TEST(testTdf107773, "tdf107773.doc")
 CPPUNIT_ASSERT_EQUAL(static_cast(0), xDrawPage->getCount());
 }
 
+DECLARE_WW8IMPORT_TEST(testTdf112535, "tdf112535.doc")
+{
+SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get());
+CPPUNIT_ASSERT(pTextDoc);
+
+SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+CPPUNIT_ASSERT(pDoc->GetSpzFrameFormats());
+
+SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+CPPUNIT_ASSERT(!rFormats.empty());
+
+const SwFrameFormat* pFormat = rFormats[0];
+CPPUNIT_ASSERT(pFormat);
+
+// Without the accompanying fix in place, this test would have failed: 
auto-contour was enabled
+// in Writer, but not in Word.
+CPPUNIT_ASSERT(!pFormat->GetSurround().IsContour());
+}
+
 DECLARE_WW8IMPORT_TEST(testTdf106291, "tdf106291.doc")
 {
 // Table cell was merged vertically instead of horizontally -> had 
incorrect dimensions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 3beb1e2f6181..58f72514f147 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2087,6 +2087,14 @@ void 
SwWW8ImplReader::MapWrapIntoFlyFormat(SvxMSDffImportRec const * pRecord,
 pNd->SetContour(&aPoly);
 }
 }
+else if (pFlyFormat->GetSurround().IsContour())
+{
+// Contour is enabled, but no polygon is set: disable contour, because 
Word does not
+// Writer-style auto-contour in that case.
+SwFormatSurround aSurround(pFlyFormat->GetSurround());
+aSurround.SetContour(false);
+pFlyFormat->SetFormatAttr(aSurround);
+}
 }
 
 static sal_Int32 lcl_ConvertCrop(sal_uInt32 const nCrop, sal_Int32 const nSize)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sd/source

2019-08-02 Thread Gabor Kelemen (via logerrit)
 sd/source/ui/view/DocumentRenderer.cxx |   38 ++---
 1 file changed, 31 insertions(+), 7 deletions(-)

New commits:
commit c542a385ce100f8f52a4aff6ab12312f9fbb674e
Author: Gabor Kelemen 
AuthorDate: Mon Jul 22 00:49:03 2019 +0200
Commit: Xisco Faulí 
CommitDate: Fri Aug 2 16:37:56 2019 +0200

tdf#39742 tdf#44786 Consider Impress/Draw default printing settings

Default settings can be set under Options - APP - Print but
Impress/Draw has not used these as defaults unlike other apps

Change-Id: I7d430f8fb24f9626cd628b4fe9e0520d9d42b848
Reviewed-on: https://gerrit.libreoffice.org/76079
Tested-by: Jenkins
Reviewed-by: László Németh 
(cherry picked from commit 844be49e7e511f0c397e1faebca10b4fa25ea937)
Reviewed-on: https://gerrit.libreoffice.org/76565
Reviewed-by: Xisco Faulí 

diff --git a/sd/source/ui/view/DocumentRenderer.cxx 
b/sd/source/ui/view/DocumentRenderer.cxx
index 3750db72e59d..c8a1456d1c7b 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -60,6 +60,9 @@
 #include 
 #include 
 
+#include 
+#include 
+
 #include 
 #include 
 
@@ -436,7 +439,7 @@ namespace {
 
SdResId(STR_IMPRESS_PRINT_UI_IS_PRINT_NAME),
 
".HelpID:vcl:PrintDialog:IsPrintName:CheckBox" ,
 "IsPrintName" ,
-false
+
officecfg::Office::Impress::Print::Other::PageName::get()
 )
 );
 }
@@ -446,7 +449,7 @@ namespace {
 SdResId(STR_DRAW_PRINT_UI_IS_PRINT_NAME),
 
".HelpID:vcl:PrintDialog:IsPrintName:CheckBox" ,
 "IsPrintName" ,
-false
+
officecfg::Office::Draw::Print::Other::PageName::get()
 )
 );
 }
@@ -455,7 +458,12 @@ namespace {
 SdResId(STR_IMPRESS_PRINT_UI_IS_PRINT_DATE),
 
".HelpID:vcl:PrintDialog:IsPrintDateTime:CheckBox" ,
 "IsPrintDateTime" ,
-false
+// Separate settings for time and date in 
Impress/Draw -> Print page, check that both are set
+mbImpress ?
+
officecfg::Office::Impress::Print::Other::Date::get() &&
+
officecfg::Office::Impress::Print::Other::Time::get() :
+
officecfg::Office::Draw::Print::Other::Date::get() &&
+
officecfg::Office::Draw::Print::Other::Time::get()
 )
 );
 
@@ -465,7 +473,7 @@ namespace {
 
SdResId(STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN),
 
".HelpID:vcl:PrintDialog:IsPrintHidden:CheckBox" ,
 "IsPrintHidden" ,
-false
+
officecfg::Office::Impress::Print::Other::HiddenPage::get()
 )
 );
 }
@@ -487,7 +495,9 @@ namespace {
 aHelpIds,
 "Quality" ,
 
CreateChoice(STR_IMPRESS_PRINT_UI_QUALITY_CHOICES, 
SAL_N_ELEMENTS(STR_IMPRESS_PRINT_UI_QUALITY_CHOICES)),
-0)
+mbImpress ? 
officecfg::Office::Impress::Print::Other::Quality::get() :
+
officecfg::Office::Draw::Print::Other::Quality::get() )
+
 );
 
 AddDialogControl( 
vcl::PrinterOptionsHelper::setSubgroupControlOpt("pagesizes",
@@ -504,6 +514,19 @@ namespace {
 aWidgetIds[2] = "distributeonmultiple";
 aWidgetIds[3] = "tilesheet";
 
+// Mutually exclusive page options settings are stored in separate 
config keys...
+// TODO: There is no config key to set the distributeonmultiple 
option as default
+sal_Int32 nDefaultChoice = 0;
+if ( mbImpress ? 
officecfg::Office::Impress::Print::Page::PageSize::get() :
+ 
officecfg::Office::Draw::Print::Page::PageSize::get() )
+{
+nDefaultChoice = 1;
+}
+else if ( mbImpress ? 
officecfg::Office::Impress::Print::Page::PageTile::get() :
+  
officecfg::Office::Draw::Print::Page::PageTile::get() )
+{
+nDefaultChoice = 

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

2019-08-02 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/tiledrendering/data/image-comment.odt |binary
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   46 +
 sw/source/uibase/docvw/PostItMgr.cxx   |9 +++-
 3 files changed, 54 insertions(+), 1 deletion(-)

New commits:
commit 225930119543975697d3f5f042e271f0ec6c6b15
Author: Miklos Vajna 
AuthorDate: Fri Aug 2 12:31:00 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Aug 2 16:15:02 2019 +0200

sw comments on frames: no overlay in the LOK API, either: insert case

This is similar to commit 28fcb7d86765194b4015e7023449333f43aba0c5 (sw
comments on frames: no overlay in the LOK API, either, 2019-07-16), but
that one handled the initial fetch of comment states, while this one
does the incremental updates.

With this, there is no overlay on commented images right after inserting
them.

Change-Id: I060303806a6611b113b4813300ed1cafd0b654fa
Reviewed-on: https://gerrit.libreoffice.org/76859
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/sw/qa/extras/tiledrendering/data/image-comment.odt 
b/sw/qa/extras/tiledrendering/data/image-comment.odt
new file mode 100644
index ..0852bedabf7f
Binary files /dev/null and b/sw/qa/extras/tiledrendering/data/image-comment.odt 
differ
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index f5814504c16c..5851faa56534 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -100,6 +100,7 @@ public:
 void testCreateViewTextSelection();
 void testRedlineColors();
 void testCommentEndTextEdit();
+void testCommentInsert();
 void testCursorPosition();
 void testPaintCallbacks();
 void testUndoRepairResult();
@@ -159,6 +160,7 @@ public:
 CPPUNIT_TEST(testCreateViewTextSelection);
 CPPUNIT_TEST(testRedlineColors);
 CPPUNIT_TEST(testCommentEndTextEdit);
+CPPUNIT_TEST(testCommentInsert);
 CPPUNIT_TEST(testCursorPosition);
 CPPUNIT_TEST(testPaintCallbacks);
 CPPUNIT_TEST(testUndoRepairResult);
@@ -735,6 +737,8 @@ public:
 boost::property_tree::ptree m_aRedlineTableChanged;
 /// Redline table modified payload
 boost::property_tree::ptree m_aRedlineTableModified;
+/// Post-it / annotation payload.
+boost::property_tree::ptree m_aComment;
 
 ViewCallback(SfxViewShell* pViewShell, std::function 
const & rBeforeInstallFunc = {})
 : m_bOwnCursorInvalidated(false),
@@ -882,6 +886,14 @@ public:
 m_aRedlineTableModified = 
m_aRedlineTableModified.get_child("redline");
 }
 break;
+case LOK_CALLBACK_COMMENT:
+{
+m_aComment.clear();
+std::stringstream aStream(pPayload);
+boost::property_tree::read_json(aStream, m_aComment);
+m_aComment = m_aComment.get_child("comment");
+}
+break;
 }
 }
 };
@@ -1641,6 +1653,40 @@ void SwTiledRenderingTest::testCommentEndTextEdit()
 CPPUNIT_ASSERT(aView1.m_bTilesInvalidated);
 }
 
+void SwTiledRenderingTest::testCommentInsert()
+{
+// Load a document with an as-char image in it.
+comphelper::LibreOfficeKit::setActive();
+comphelper::LibreOfficeKit::setTiledAnnotations(false);
+SwXTextDocument* pXTextDocument = createDoc("image-comment.odt");
+SwDoc* pDoc = pXTextDocument->GetDocShell()->GetDoc();
+SwView* pView = pDoc->GetDocShell()->GetView();
+
+// Select the image.
+pView->GetViewFrame()->GetDispatcher()->Execute(FN_CNTNT_TO_NEXT_FRAME, 
SfxCallMode::SYNCHRON);
+// Make sure SwTextShell is replaced with SwDrawShell right now, not after 
120 ms, as set in the
+// SwView ctor.
+pView->StopShellTimer();
+
+// Add a comment.
+uno::Reference xFrame = 
pView->GetViewFrame()->GetFrame().GetFrameInterface();
+uno::Sequence aPropertyValues = 
comphelper::InitPropertySequence(
+{
+{"Text", uno::makeAny(OUString("some text"))},
+{"Author", uno::makeAny(OUString("me"))},
+});
+ViewCallback aView(SfxViewShell::Current());
+comphelper::dispatchCommand(".uno:InsertAnnotation", xFrame, 
aPropertyValues);
+Scheduler::ProcessEventsToIdle();
+OString 
aAnchorPos(aView.m_aComment.get_child("anchorPos").get_value().c_str());
+// Without the accompanying fix in place, this test would have failed with
+// - Expected: 1418, 1418, 0, 0
+// - Actual  : 1418, 1418, 1024, 1024
+// i.e. the anchor position was a non-empty rectangle.
+CPPUNIT_ASSERT_EQUAL(OString("1418, 1418, 0, 0"), aAnchorPos);
+comphelper::LibreOfficeKit::setTiledAnnotations(true);
+}
+
 void SwTiledRenderingTest::testCursorPosition()
 {
 // Load a document and register a callback, should get an own cursor.
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 3e7f48844fae..48121d7d8dd5 100644
--- a/sw/source

distro packagers: where are LOKDocView-0.1.typelib and LOKDocView-0.1.gir

2019-08-02 Thread Michael Stahl


hello people who package LO for distros:

i'm not sure if anybody other than Fedora needs these files but they 
were moved around for 6.4 so if you do include them you will need to 
adapt your build script for that change.


commit 634844354ee6ed884128086a80c3ee32c889d8c9

sysui: fix rpm errors in freedesktop-menus (4.14.1)

RPM build errors:
Explicit %attr() mode not applicable to symlink: 
/workdir/CustomTarget/sysui/rpm/libreofficedev/freedesktop/usr/bin/libreofficedev6.1

Installed (but unpackaged) file(s) found:
   /usr/local/lib/girepository-1.0/LOKDocView-0.1.typelib
   /usr/share/gir-1.0/LOKDocView-0.1.gir


they were built into a directory meant for upstream rpm/deb packaging 
but then not actually included in the upstream packages because there 
does not appear to be a good place on the system available to 3rd party 
packages (i.e. in /opt) where they would be found by the gobject 
introspection, so we decided to improve the maintainability by moving 
them elsewhere.


there is a follow-up change to move them to yet another place:
https://gerrit.libreoffice.org/#/c/76833/

sorry about the inconvenience!
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice

[Libreoffice-commits] core.git: include/rtl

2019-08-02 Thread Andrea Gelmini (via logerrit)
 include/rtl/byteseq.h |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 39bd7b97f00f0b6f0bbb01ab882207760b77e349
Author: Andrea Gelmini 
AuthorDate: Fri Aug 2 15:02:40 2019 +0200
Commit: Andrea Gelmini 
CommitDate: Fri Aug 2 15:24:11 2019 +0200

Fix typo

Change-Id: Idaaec17114aa2b03c00da075f5accc4c0c0e69b4
Reviewed-on: https://gerrit.libreoffice.org/75768
Reviewed-by: Stephan Bergmann 
Tested-by: Andrea Gelmini 

diff --git a/include/rtl/byteseq.h b/include/rtl/byteseq.h
index 75bd40210c72..0ec93c066652 100644
--- a/include/rtl/byteseq.h
+++ b/include/rtl/byteseq.h
@@ -306,13 +306,13 @@ public:
 */
 inline void SAL_CALL realloc( sal_Int32 nSize );
 
-/** Returns the UNnacquired C handle of the sequence
+/** Returns the UNacquired C handle of the sequence
 
 @return UNacquired handle of the sequence
 */
 sal_Sequence * SAL_CALL getHandle() const
 { return _pSequence; }
-/** Returns the UNnacquired C handle of the sequence (for compatibility 
reasons)
+/** Returns the UNacquired C handle of the sequence (for compatibility 
reasons)
 
 @return UNacquired handle of the sequence
 */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-08-02 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/detailpages.cxx |   16 +++-
 dbaccess/source/ui/dlg/detailpages.hxx |3 ++-
 2 files changed, 13 insertions(+), 6 deletions(-)

New commits:
commit 2598f8a127c6ce2ec85a0d1ae1b1c706951e4e9d
Author: Caolán McNamara 
AuthorDate: Fri Aug 2 10:43:27 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 15:05:34 2019 +0200

dispose MySQLNativePage

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

diff --git a/dbaccess/source/ui/dlg/detailpages.cxx 
b/dbaccess/source/ui/dlg/detailpages.cxx
index b8453c87f6bf..4f23ef8737fb 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -502,7 +502,7 @@ namespace dbaui
 MySQLNativePage::MySQLNativePage(TabPageParent pParent, const SfxItemSet& 
rCoreAttrs)
 : OCommonBehaviourTabPage(pParent, "dbaccess/ui/mysqlnativepage.ui", 
"MysqlNativePage", rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset)
 , 
m_xMySQLSettingsContainer(m_xBuilder->weld_widget("MySQLSettingsContainer"))
-, m_aMySQLSettings(m_xMySQLSettingsContainer.get(), 
LINK(this,OGenericAdministrationPage,OnControlModified))
+, m_xMySQLSettings(new 
MySQLNativeSettings(m_xMySQLSettingsContainer.get(), 
LINK(this,OGenericAdministrationPage,OnControlModified)))
 , m_xSeparator1(m_xBuilder->weld_label("connectionheader"))
 , m_xSeparator2(m_xBuilder->weld_label("userheader"))
 , m_xUserNameLabel(m_xBuilder->weld_label("usernamelabel"))
@@ -512,6 +512,12 @@ namespace dbaui
 
m_xUserName->connect_changed(LINK(this,OGenericAdministrationPage,OnControlEntryModifyHdl));
 }
 
+void MySQLNativePage::dispose()
+{
+m_xMySQLSettings.reset();
+OCommonBehaviourTabPage::dispose();
+}
+
 MySQLNativePage::~MySQLNativePage()
 {
 disposeOnce();
@@ -520,7 +526,7 @@ namespace dbaui
 void MySQLNativePage::fillControls(std::vector< 
std::unique_ptr >& _rControlList)
 {
 OCommonBehaviourTabPage::fillControls( _rControlList );
-m_aMySQLSettings.fillControls( _rControlList );
+m_xMySQLSettings->fillControls( _rControlList );
 
 _rControlList.emplace_back(new 
OSaveValueWidgetWrapper(m_xUserName.get()));
 _rControlList.emplace_back(new 
OSaveValueWidgetWrapper(m_xPasswordRequired.get()));
@@ -529,7 +535,7 @@ namespace dbaui
 void MySQLNativePage::fillWindows(std::vector< 
std::unique_ptr >& _rControlList)
 {
 OCommonBehaviourTabPage::fillWindows( _rControlList );
-m_aMySQLSettings.fillWindows( _rControlList);
+m_xMySQLSettings->fillWindows( _rControlList);
 
 _rControlList.emplace_back(new 
ODisableWidgetWrapper(m_xSeparator1.get()));
 _rControlList.emplace_back(new 
ODisableWidgetWrapper(m_xSeparator2.get()));
@@ -540,7 +546,7 @@ namespace dbaui
 {
 bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet( _rSet );
 
-bChangedSomething |= m_aMySQLSettings.FillItemSet( _rSet );
+bChangedSomething |= m_xMySQLSettings->FillItemSet( _rSet );
 
 if (m_xUserName->get_value_changed_from_saved())
 {
@@ -558,7 +564,7 @@ namespace dbaui
 bool bValid, bReadonly;
 getFlags(_rSet, bValid, bReadonly);
 
-m_aMySQLSettings.implInitControls( _rSet );
+m_xMySQLSettings->implInitControls( _rSet );
 
 const SfxStringItem* pUidItem = 
_rSet.GetItem(DSID_USER);
 const SfxBoolItem* pAllowEmptyPwd = 
_rSet.GetItem(DSID_PASSWORDREQUIRED);
diff --git a/dbaccess/source/ui/dlg/detailpages.hxx 
b/dbaccess/source/ui/dlg/detailpages.hxx
index af535194ee20..ead3a3af6c24 100644
--- a/dbaccess/source/ui/dlg/detailpages.hxx
+++ b/dbaccess/source/ui/dlg/detailpages.hxx
@@ -194,11 +194,12 @@ namespace dbaui
 {
 public:
 MySQLNativePage(TabPageParent pParent, const SfxItemSet& rCoreAttrs);
+virtual void dispose() override;
 virtual ~MySQLNativePage() override;
 
 private:
 std::unique_ptr m_xMySQLSettingsContainer;
-MySQLNativeSettings m_aMySQLSettings;
+std::unique_ptr m_xMySQLSettings;
 std::unique_ptr m_xSeparator1;
 std::unique_ptr m_xSeparator2;
 std::unique_ptr m_xUserNameLabel;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - dbaccess/source

2019-08-02 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/adminpages.cxx |   47 --
 dbaccess/source/ui/dlg/adminpages.hxx |4 --
 2 files changed, 51 deletions(-)

New commits:
commit 4cb2fb91d4f70940c1656716e59cdee5e6b6b592
Author: Caolán McNamara 
AuthorDate: Fri Aug 2 10:24:32 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 15:05:15 2019 +0200

remove newly unused OGenericAdministrationPage ctor

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

diff --git a/dbaccess/source/ui/dlg/adminpages.cxx 
b/dbaccess/source/ui/dlg/adminpages.cxx
index 22486900faf3..f85635e8cbbb 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -58,16 +58,6 @@ namespace dbaui
 {
 }
 
-OGenericAdministrationPage::OGenericAdministrationPage(vcl::Window* 
_pParent, const OString& _rId, const OUString& _rUIXMLDescription, const 
SfxItemSet& _rAttrSet)
-:SfxTabPage(_pParent, _rId, _rUIXMLDescription, &_rAttrSet)
-,m_abEnableRoadmap(false)
-,m_pAdminDialog(nullptr)
-,m_pItemSetHelper(nullptr)
-{
-
-SetExchangeSupport();
-}
-
 OGenericAdministrationPage::OGenericAdministrationPage(TabPageParent 
pParent, const OUString& rUIXMLDescription, const OString& rId, const 
SfxItemSet& rAttrSet)
 : SfxTabPage(pParent, rUIXMLDescription, rId, &rAttrSet)
 , m_abEnableRoadmap(false)
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx 
b/dbaccess/source/ui/dlg/adminpages.hxx
index 6900f1f7cc2f..63641145cbdf 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -123,7 +123,6 @@ namespace dbaui
 css::uno::Reference< css::uno::XComponentContext >
m_xORB;
 public:
-OGenericAdministrationPage(vcl::Window* _pParent, const OString& _rId, 
const OUString& _rUIXMLDescription, const SfxItemSet& _rAttrSet);
 OGenericAdministrationPage(TabPageParent pParent, const OUString& 
rUIXMLDescription, const OString& rId, const SfxItemSet& rAttrSet);
 /// set a handler which gets called every time something on the page 
has been modified
 void SetModifiedHandler(const Link& _rHandler) { m_aModifiedHandler = _rHandler; }
commit a6ed90b37cabd339aa1b364762e5e49fd9067848
Author: Caolán McNamara 
AuthorDate: Fri Aug 2 10:22:10 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 15:04:55 2019 +0200

drop some newly unused functions

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

diff --git a/dbaccess/source/ui/dlg/adminpages.cxx 
b/dbaccess/source/ui/dlg/adminpages.cxx
index 58464f36643c..22486900faf3 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -203,27 +203,6 @@ namespace dbaui
 {
 return true;
 }
-void OGenericAdministrationPage::fillBool( SfxItemSet& _rSet, CheckBox 
const * _pCheckBox, sal_uInt16 _nID, bool& _bChangedSomething, bool 
_bRevertValue )
-{
-if ( _pCheckBox && _pCheckBox->IsValueChangedFromSaved() )
-{
-bool bValue = _pCheckBox->IsChecked();
-if ( _bRevertValue )
-bValue = !bValue;
-
-if ( _pCheckBox->IsTriStateEnabled() )
-{
-OptionalBoolItem aValue( _nID );
-if ( _pCheckBox->GetState() != TRISTATE_INDET )
-aValue.SetValue( bValue );
-_rSet.Put( aValue );
-}
-else
-_rSet.Put( SfxBoolItem( _nID, bValue ) );
-
-_bChangedSomething = true;
-}
-}
 void OGenericAdministrationPage::fillBool( SfxItemSet& _rSet, const 
weld::CheckButton* pCheckBox, sal_uInt16 _nID, bool bOptionalBool, bool& 
_bChangedSomething, bool _bRevertValue )
 {
 if (pCheckBox && pCheckBox->get_state_changed_from_saved())
@@ -245,14 +224,6 @@ namespace dbaui
 _bChangedSomething = true;
 }
 }
-void OGenericAdministrationPage::fillInt32(SfxItemSet& _rSet, NumericField 
const * _pEdit, sal_uInt16 _nID, bool& _bChangedSomething)
-{
-if( _pEdit && _pEdit->IsValueChangedFromSaved() )
-{
-_rSet.Put(SfxInt32Item(_nID, 
static_cast(_pEdit->GetValue(;
-_bChangedSomething = true;
-}
-}
 void OGenericAdministrationPage::fillInt32(SfxItemSet& _rSet, const 
weld::SpinButton* pEdit, sal_uInt16 _nID, bool& _bChangedSomething)
 {
 if (pEdit && pEdit->get_value_changed_from_saved())
@@ -261,14 +232,6 @@ namespace dbaui
 _bChangedSomething = true;
 }
 }
-void OGenericAdministrationPage::fillSt

[Libreoffice-commits] core.git: 2 commits - dbaccess/source

2019-08-02 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx |8 ++---
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |8 ++---
 dbaccess/source/ui/dlg/admincontrols.cxx  |   34 +++---
 dbaccess/source/ui/dlg/admincontrols.hxx  |6 +--
 dbaccess/source/ui/dlg/adminpages.cxx |2 -
 dbaccess/source/ui/dlg/adminpages.hxx |4 +-
 dbaccess/source/ui/dlg/detailpages.cxx|2 -
 dbaccess/source/ui/dlg/detailpages.hxx|4 +-
 8 files changed, 34 insertions(+), 34 deletions(-)

New commits:
commit d5220a535400440c657dc3000a7e078f17112861
Author: Caolán McNamara 
AuthorDate: Fri Aug 2 10:19:16 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 15:04:28 2019 +0200

void* -> weld::Widget*

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

diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index dab449091e36..5bf0805206a0 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -218,7 +218,7 @@ using namespace ::com::sun::star;
 callModifiedHdl();
 }
 
-void OLDAPConnectionPageSetup::callModifiedHdl(void *)
+void OLDAPConnectionPageSetup::callModifiedHdl(weld::Widget*)
 {
 bool bRoadmapState = ((!m_xETHostServer->get_text().isEmpty() ) && ( 
!m_xETBaseDN->get_text().isEmpty() ) && 
(!m_xFTPortNumber->get_label().isEmpty() ));
 SetRoadmapStateValue(bRoadmapState);
@@ -344,7 +344,7 @@ using namespace ::com::sun::star;
 callModifiedHdl();
 }
 
-void MySQLNativeSetupPage::callModifiedHdl(void*)
+void MySQLNativeSetupPage::callModifiedHdl(weld::Widget*)
 {
 SetRoadmapStateValue( m_xMySQLSettings->canAdvance() );
 
@@ -512,7 +512,7 @@ using namespace ::com::sun::star;
 aMsg.run();
 }
 
-void OGeneralSpecialJDBCConnectionPageSetup::callModifiedHdl(void* 
pControl)
+void OGeneralSpecialJDBCConnectionPageSetup::callModifiedHdl(weld::Widget* 
pControl)
 {
 if (pControl == m_xETDriverClass.get())
 m_xPBTestJavaDriver->set_sensitive( 
!m_xETDriverClass->get_text().trim().isEmpty() );
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index 8cbe44c1297f..f5ae1a6fbaf8 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -80,7 +80,7 @@ namespace dbaui
 static VclPtr CreateLDAPTabPage( 
TabPageParent pParent, const SfxItemSet& _rAttrSet );
 OLDAPConnectionPageSetup( TabPageParent pParent, const SfxItemSet& 
_rCoreAttrs );
 virtual ~OLDAPConnectionPageSetup() override;
-virtual void callModifiedHdl(void* pControl = nullptr) override;
+virtual void callModifiedHdl(weld::Widget* pControl = nullptr) 
override;
 
 protected:
 virtual void implInitControls(const SfxItemSet& _rSet, bool 
_bSaveValue) override;
@@ -121,7 +121,7 @@ namespace dbaui
 virtual bool FillItemSet( SfxItemSet* _rCoreAttrs ) override;
 virtual void implInitControls(const SfxItemSet& _rSet, bool 
_bSaveValue) override;
 
-virtual void callModifiedHdl(void* pControl = nullptr) override;
+virtual void callModifiedHdl(weld::Widget* pControl = nullptr) 
override;
 };
 
 // OGeneralSpecialJDBCConnectionPageSetup
@@ -144,7 +144,7 @@ namespace dbaui
 virtual void implInitControls(const SfxItemSet& _rSet, bool 
_bSaveValue) override;
 virtual void fillControls(std::vector< 
std::unique_ptr >& _rControlList) override;
 virtual void fillWindows(std::vector< 
std::unique_ptr >& _rControlList) override;
-virtual void callModifiedHdl(void* pControl = nullptr) override;
+virtual void callModifiedHdl(weld::Widget* pControl = nullptr) 
override;
 
 DECL_LINK(OnTestJavaClickHdl, weld::Button&, void);
 
diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx 
b/dbaccess/source/ui/dlg/admincontrols.cxx
index 6f16870a3158..3af6b2a6eb2c 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -30,7 +30,7 @@ namespace dbaui
 {
 
 // MySQLNativeSettings
-MySQLNativeSettings::MySQLNativeSettings(weld::Widget* pParent, const 
Link& rControlModificationLink)
+MySQLNativeSettings::MySQLNativeSettings(weld::Widget* pParent, const 
Link& rControlModificationLink)
 : m_xBuilder(Application::CreateBuilder(pParent, 
"dbaccess/ui/mysqlnativesettings.ui"))
 , m_xContainer(m_xBuilder->weld_widget("MysqlNativeSettings"))
 , m_xDatabaseNameLabel(m_xBuilder->weld_label("dbnamelabel"))
diff --git a/dbaccess/source/ui/dlg/admincontrols.hxx 
b/dbaccess/source/

[Libreoffice-commits] core.git: 2 commits - dbaccess/source

2019-08-02 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx |   34 +--
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |   11 -
 dbaccess/source/ui/dlg/admincontrols.cxx  |  224 ++
 dbaccess/source/ui/dlg/admincontrols.hxx  |   40 ---
 4 files changed, 51 insertions(+), 258 deletions(-)

New commits:
commit ebca63dc3f1e8a314599d3a9e2739bd6ced9efab
Author: Caolán McNamara 
AuthorDate: Fri Aug 2 10:12:33 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 15:03:54 2019 +0200

drop newly unused MySQLNativeSettings

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

diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx 
b/dbaccess/source/ui/dlg/admincontrols.cxx
index 5ba2a5b313f3..33bd77cb27c4 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -30,204 +30,6 @@ namespace dbaui
 {
 
 // MySQLNativeSettings
-MySQLNativeSettings::MySQLNativeSettings( vcl::Window& _rParent, const 
Link& _rControlModificationLink )
-:TabPage( &_rParent, "MysqlNativeSettings", 
"dbaccess/ui/mysqlnativesettings.ui" ),
-m_aControlModificationLink(_rControlModificationLink)
-{
-get(m_pDatabaseNameLabel, "dbnamelabel");
-get(m_pDatabaseName, "dbname");
-get(m_pHostPortRadio, "hostport");
-get(m_pSocketRadio, "socketlabel");
-get(m_pNamedPipeRadio, "namedpipelabel");
-get(m_pHostNameLabel, "serverlabel");
-get(m_pHostName, "server");
-get(m_pPortLabel, "portlabel");
-get(m_pPort, "port");
-m_pPort->SetUseThousandSep(false);
-get(m_pDefaultPort, "defaultport");
-get(m_pSocket, "socket");
-get(m_pNamedPipe, "namedpipe");
-
-m_pHostName->SetText("localhost");
-
-m_pDatabaseName->SetModifyHdl( LINK(this, MySQLNativeSettings, 
EditModifyHdl) );
-m_pHostName->SetModifyHdl( LINK(this, MySQLNativeSettings, 
EditModifyHdl) );
-m_pPort->SetModifyHdl( LINK(this, MySQLNativeSettings, EditModifyHdl) 
);
-m_pSocket->SetModifyHdl( LINK(this, MySQLNativeSettings, 
EditModifyHdl) );
-m_pNamedPipe->SetModifyHdl( LINK(this, MySQLNativeSettings, 
EditModifyHdl) );
-m_pSocketRadio->SetToggleHdl( LINK(this, MySQLNativeSettings, 
RadioToggleHdl) );
-m_pNamedPipeRadio->SetToggleHdl( LINK(this, MySQLNativeSettings, 
RadioToggleHdl) );
-m_pHostPortRadio->SetToggleHdl( LINK(this, MySQLNativeSettings, 
RadioToggleHdl) );
-
-// sockets are available on Unix systems only, named pipes only on 
Windows
-#ifdef UNX
-m_pNamedPipeRadio->Hide();
-m_pNamedPipe->Hide();
-#else
-m_pSocketRadio->Hide();
-m_pSocket->Hide();
-#endif
-}
-
-IMPL_LINK(MySQLNativeSettings, RadioToggleHdl, RadioButton&, rRadioButton, 
void)
-{
-if (&rRadioButton == &*m_pSocketRadio || &rRadioButton == 
&*m_pNamedPipeRadio)
-m_aControlModificationLink.Call(&rRadioButton);
-m_pHostNameLabel->Enable(m_pHostPortRadio->IsChecked());
-m_pHostName->Enable(m_pHostPortRadio->IsChecked());
-m_pPortLabel->Enable(m_pHostPortRadio->IsChecked());
-m_pPort->Enable(m_pHostPortRadio->IsChecked());
-m_pDefaultPort->Enable(m_pHostPortRadio->IsChecked());
-m_pSocket->Enable(m_pSocketRadio->IsChecked());
-m_pNamedPipe->Enable(m_pNamedPipeRadio->IsChecked());
-if (&rRadioButton == &*m_pHostPortRadio)
-{
-if (rRadioButton.IsChecked())
-m_pHostName->SetText(m_sHostNameUserText);
-else
-m_pHostName->SetText("localhost");
-}
-}
-
-IMPL_LINK(MySQLNativeSettings, EditModifyHdl, Edit&, rEdit, void)
-{
-m_aControlModificationLink.Call(&rEdit);
-
-if (&rEdit == m_pHostName.get())
-{
-if (m_pHostName->IsEnabled())
-m_sHostNameUserText = m_pHostName->GetText();
-}
-}
-
-MySQLNativeSettings::~MySQLNativeSettings()
-{
-disposeOnce();
-}
-
-void MySQLNativeSettings::dispose()
-{
-m_pDatabaseNameLabel.clear();
-m_pDatabaseName.clear();
-m_pHostPortRadio.clear();
-m_pSocketRadio.clear();
-m_pNamedPipeRadio.clear();
-m_pHostNameLabel.clear();
-m_pHostName.clear();
-m_pPortLabel.clear();
-m_pPort.clear();
-m_pDefaultPort.clear();
-m_pSocket.clear();
-m_pNamedPipe.clear();
-TabPage::dispose();
-}
-
-void MySQLNativeSettings::fillControls( std::vector< 
std::unique_ptr >& _rControlList )
-{
-_rControlList.emplace_back( new OSaveValueWrapper< Edit >( 
m_pDatabaseName ) );
-_rControlList.emplace_back( new OSaveValueWrapper< Edit >( m_pHostName 
) );
-   

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

2019-08-02 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/adminpages.cxx |   32 
 dbaccess/source/ui/dlg/adminpages.hxx |   16 
 2 files changed, 48 deletions(-)

New commits:
commit c44028ceb8dbc07cefea77c98b2416be3635418b
Author: Caolán McNamara 
AuthorDate: Fri Aug 2 09:54:35 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 15:02:42 2019 +0200

drop newly unused LayoutHelper

Change-Id: I602c9a3f9df79ad8c268c6902adac9046abd34ea
Reviewed-on: https://gerrit.libreoffice.org/76841
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/dbaccess/source/ui/dlg/adminpages.cxx 
b/dbaccess/source/ui/dlg/adminpages.cxx
index 28c677d254ab..f68abd8e262a 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -326,38 +326,6 @@ namespace dbaui
 m_pAdminDialog->clearPassword();
 }
 }
-
-// LayoutHelper
-void LayoutHelper::positionBelow( const Control& _rReference, Control& 
_rControl,
-const long _nIndentAppFont )
-{
-Point aReference = _rReference.GetPosPixel();
-aReference.AdjustY(_rReference.GetSizePixel().Height() );
-
-const vcl::Window* pConverter = _rControl.GetParent();
-Size aOffset = pConverter->LogicToPixel(Size(_nIndentAppFont, 3), 
MapMode(MapUnit::MapAppFont));
-
-Point aControlPos( aReference.X() + aOffset.Width(), aReference.Y() + 
aOffset.Height() );
-_rControl.SetPosPixel( aControlPos );
-}
-
-void LayoutHelper::fitSizeRightAligned( PushButton& io_button )
-{
-const Point aOldPos = io_button.GetPosPixel();
-const Size aOldSize = io_button.GetSizePixel();
-const Size aMinSize( io_button.CalcMinimumSize() );
-if ( aMinSize.Width() > aOldSize.Width() )
-{
-io_button.setPosSizePixel(
-aOldPos.X() + aOldSize.Width() - aMinSize.Width(),
-0,
-aMinSize.Width(),
-0,
-PosSizeFlags::X | PosSizeFlags::Width
-);
-}
-}
-
 }   // namespace dbaui
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx 
b/dbaccess/source/ui/dlg/adminpages.hxx
index c9897d20b8dd..1b41fbc18040 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -262,22 +262,6 @@ namespace dbaui
 DECL_LINK(OnControlModifiedButtonClick, weld::ToggleButton&, void);
 DECL_LINK(OnTestConnectionButtonClickHdl, weld::Button&, void);
 };
-
-// LayoutHelper
-class LayoutHelper
-{
-public:
-static void positionBelow(
-const Control& _rReference,
-Control& _rControl,
-const long _nIndentAppFont
-);
-/** fits the button size to be large enough to contain the buttons text
-*/
-static void fitSizeRightAligned( PushButton& io_button );
-// why is CalcMinimumSize not a virtual method of vcl::Window?
-};
-
 }   // namespace dbaui
 
 #endif // INCLUDED_DBACCESS_SOURCE_UI_DLG_ADMINPAGES_HXX
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: dbaccess/source dbaccess/uiconfig

2019-08-02 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx |   85 --
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |   23 ++---
 dbaccess/source/ui/dlg/adminpages.cxx |   10 --
 dbaccess/source/ui/dlg/adminpages.hxx |3 
 dbaccess/uiconfig/ui/ldapconnectionpage.ui|   20 +++--
 5 files changed, 60 insertions(+), 81 deletions(-)

New commits:
commit 3cf9c2d436a076c472ef6e22e7a10d2bc9a85c48
Author: Caolán McNamara 
AuthorDate: Fri Aug 2 09:49:53 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 15:02:12 2019 +0200

weld OLDAPConnectionPageSetup

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

diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 51c5dcf36dbb..20f9ec53e4cb 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -132,59 +132,42 @@ using namespace ::com::sun::star;
 return m_xTextConnectionHelper->prepareLeave();
 }
 
-VclPtr 
OLDAPConnectionPageSetup::CreateLDAPTabPage( vcl::Window* pParent, const 
SfxItemSet& _rAttrSet )
+VclPtr 
OLDAPConnectionPageSetup::CreateLDAPTabPage( TabPageParent pParent, const 
SfxItemSet& _rAttrSet )
 {
 return VclPtr::Create( pParent, _rAttrSet );
 }
 
 // OLDAPPageSetup
-OLDAPConnectionPageSetup::OLDAPConnectionPageSetup( vcl::Window* pParent, 
const SfxItemSet& _rCoreAttrs )
-:OGenericAdministrationPage(pParent, "LDAPConnectionPage", 
"dbaccess/ui/ldapconnectionpage.ui",_rCoreAttrs)
-{
-get(m_pFTHelpText, "helpLabel");
-get(m_pFTHostServer, "hostNameLabel");
-get(m_pETHostServer, "hostNameEntry");
-get(m_pFTBaseDN, "baseDNLabel");
-get(m_pETBaseDN, "baseDNEntry");
-get(m_pFTPortNumber, "portNumLabel");
-get(m_pNFPortNumber, "portNumEntry");
-m_pNFPortNumber->SetUseThousandSep(false);
-get(m_pFTDefaultPortNumber, "portNumDefLabel");
-get(m_pCBUseSSL, "useSSLCheckbutton");
-
-m_pETHostServer->SetModifyHdl(LINK(this, OGenericAdministrationPage, 
OnControlEditModifyHdl));
-m_pETBaseDN->SetModifyHdl(LINK(this, OGenericAdministrationPage, 
OnControlEditModifyHdl));
-m_pNFPortNumber->SetModifyHdl(LINK(this, OGenericAdministrationPage, 
OnControlEditModifyHdl));
-m_pCBUseSSL->SetToggleHdl( LINK(this, OGenericAdministrationPage, 
ControlModifiedCheckBoxHdl) );
+OLDAPConnectionPageSetup::OLDAPConnectionPageSetup( TabPageParent pParent, 
const SfxItemSet& _rCoreAttrs )
+: OGenericAdministrationPage(pParent, 
"dbaccess/ui/ldapconnectionpage.ui", "LDAPConnectionPage", _rCoreAttrs)
+, m_xFTHelpText(m_xBuilder->weld_label("helpLabel"))
+, m_xFTHostServer(m_xBuilder->weld_label("hostNameLabel"))
+, m_xETHostServer(m_xBuilder->weld_entry("hostNameEntry"))
+, m_xFTBaseDN(m_xBuilder->weld_label("baseDNLabel"))
+, m_xETBaseDN(m_xBuilder->weld_entry("baseDNEntry"))
+, m_xFTPortNumber(m_xBuilder->weld_label("portNumLabel"))
+, m_xNFPortNumber(m_xBuilder->weld_spin_button("portNumEntry"))
+, m_xFTDefaultPortNumber(m_xBuilder->weld_label("portNumDefLabel"))
+, m_xCBUseSSL(m_xBuilder->weld_check_button("useSSLCheckbutton"))
+{
+m_xETHostServer->connect_changed(LINK(this, 
OGenericAdministrationPage, OnControlEntryModifyHdl));
+m_xETBaseDN->connect_changed(LINK(this, OGenericAdministrationPage, 
OnControlEntryModifyHdl));
+m_xNFPortNumber->connect_value_changed(LINK(this, 
OGenericAdministrationPage, OnControlSpinButtonModifyHdl));
+m_xCBUseSSL->connect_toggled( LINK(this, OGenericAdministrationPage, 
OnControlModifiedButtonClick) );
 SetRoadmapStateValue(false);
 }
 
 OLDAPConnectionPageSetup::~OLDAPConnectionPageSetup()
 {
-disposeOnce();
-}
-
-void OLDAPConnectionPageSetup::dispose()
-{
-m_pFTHelpText.clear();
-m_pFTHostServer.clear();
-m_pETHostServer.clear();
-m_pFTBaseDN.clear();
-m_pETBaseDN.clear();
-m_pFTPortNumber.clear();
-m_pNFPortNumber.clear();
-m_pFTDefaultPortNumber.clear();
-m_pCBUseSSL.clear();
-OGenericAdministrationPage::dispose();
 }
 
 bool OLDAPConnectionPageSetup::FillItemSet( SfxItemSet* _rSet )
 {
 bool bChangedSomething = false;
-fillString(*_rSet,m_pETBaseDN,DSID_CONN_LDAP_BASEDN, 
bChangedSomething);
-
fillInt32(*_rSet,m_pNFPortNumber,DSID_CONN_LDAP_PORTNUMBER,bChangedSomething);
+fillString(*_rSet,m_xETBaseDN.get(),DSID_CONN_LDAP_BASEDN, 
bChangedSomething);
+
fillInt32(*_rSet,m_xNFPortNumber.get(),DSID_CONN_LDAP_PORTNUMBER,bChangedSomething);
 
-  

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

2019-08-02 Thread Stephan Bergmann (via logerrit)
 sw/source/core/layout/wsfrm.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8a119dfbee7a2f4917d4089acbfda8fa6fc46d35
Author: Stephan Bergmann 
AuthorDate: Fri Aug 2 11:23:06 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Aug 2 14:52:15 2019 +0200

Avoid -fsanitize=signed-integer-overflow within m_pFrame->GrowTst( LONG_MAX 
);

`--convert-to pdf doc/ooo70429-1.doc` (i.e., the attachment Whole Book.odt 
at
) failed with

> sw/source/core/layout/wsfrm.cxx:2659:27: runtime error: signed integer 
overflow: 9223372036854775647 + 9254 cannot be represented in type 'long'
>  #0 in SwLayoutFrame::GrowFrame(long, bool, bool) at 
sw/source/core/layout/wsfrm.cxx:2659:27
>  #1 in SwFrame::Grow(long, bool, bool) at 
sw/source/core/layout/wsfrm.cxx:1493:35
>  #2 in SwContentFrame::GrowFrame(long, bool, bool) at 
sw/source/core/layout/wsfrm.cxx:2147:37
>  #3 in SwFrame::Grow(long, bool, bool) at 
sw/source/core/layout/wsfrm.cxx:1493:35
>  #4 in SwTextFrame::GrowTst(long) at sw/source/core/inc/txtfrm.hxx:815:12
>  #5 in SwTextFrameBreak::IsInside(SwTextMargin const&) const at 
sw/source/core/text/widorp.cxx:156:34
[...]

when frame 5 calls

nHeight += m_pFrame->GrowTst( LONG_MAX );

As various places along the code path between frames 5 and 0 already clip 
values
at LONG_MAX, it looks reasonable to similarly clip the increased nReal here.

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

diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 95af7d95dda2..452ad6cf42f2 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2656,7 +2657,7 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool 
bTst, bool bInfo )
 }
 
 if( SwNeighbourAdjust::GrowAdjust == nAdjust && nGrow < nReal )
-nReal += AdjustNeighbourhood( nReal - nGrow, bTst );
+nReal = o3tl::saturating_add(nReal, AdjustNeighbourhood( 
nReal - nGrow, bTst ));
 
 if ( IsFootnoteFrame() && (nGrow != nReal) && GetNext() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-08-02 Thread Andrea Gelmini (via logerrit)
 
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java
  |2 +-
 
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java
|2 +-
 
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java
 |4 ++--
 
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java
|4 ++--
 
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharacterParser.java
  |4 ++--
 xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java  
   |4 ++--
 
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ParaNodeIterator.java
 |4 ++--
 
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeIterator.java
 |4 ++--
 
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/CharacterBaseParagraphMerge.java
 |4 ++--
 xmerge/source/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java 
   |2 +-
 10 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit 72ce0058eacbd199a6bbda27e5ec80b0495b61b1
Author: Andrea Gelmini 
AuthorDate: Fri Aug 2 11:55:13 2019 +0200
Commit: Andrea Gelmini 
CommitDate: Fri Aug 2 14:42:07 2019 +0200

Fix typos

Change-Id: I8e2f3104f3ae9d20e520d357e61c02afde0cedf4
Reviewed-on: https://gerrit.libreoffice.org/76858
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini 

diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java
 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java
index d8e2caea05b4..03649deffc4c 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java
@@ -157,7 +157,7 @@ public class ColumnRowInfo {
 }
 
 /**
- * Test if the row height as been set manually.
+ * Test if the row height has been set manually.
  *
  * @return {@code true} if user defined otherwise {@code false}.
  */
diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java
 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java
index 215e806e24bb..b8d3ddfb9918 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java
@@ -77,4 +77,4 @@ public class DocumentMergerImpl implements DocumentMerger {
 
 docMerge.applyDifference(i1, i2, diffTable);
 }
-}
\ No newline at end of file
+}
diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java
 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java
index 3d2dfc144d77..791c809f92a9 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java
@@ -30,7 +30,7 @@ import org.openoffice.xmerge.converter.xml.OfficeConstants;
  * It will traverse the tree and find cell {@code Node} sequences.
  *
  * Note: Once the XML Tree is parsed, then the {@code Iterator} will be a
- * snap shot of that tree. That means even the tree is modified later, than the
+ * snapshot of that tree. That means even the tree is modified later, then the
  * cached paragraph {@code Node} list will not be updated accordingly.  For 
this
  * reason and for performance reasons this {@code Iterator} does not support 
any
  * operation methods such as insert, remove or replace. The main purpose of 
this
@@ -93,4 +93,4 @@ public final class CellNodeIterator extends NodeIterator  {
 
 return equal;
 }
-}
\ No newline at end of file
+}
diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java
 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java
index 94c2bea396cd..9e9eaf369a26 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java
@@ -79,7 +79,7 @@ public class CharArrayLCSAlgorithm {
 int modSeqlen = modSeq.length + 1;
 int[][] diffTable;
 
-// initialize the diffTable (it need to be 1 row/col bigger
+// initialize the diffTable (it needs to be 1 row/col bigger
 // than the original str)
 diffTable = new int[orgSeqlen][];
 for (int i = 0; i < orgSeqlen; i++) {
@@ -185,4 +185,4 @@ public class CharArrayLCSAlgorithm {
 }
 }
 }
-}
\ No newline at end of file
+}
diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/

[Libreoffice-commits] core.git: 2 commits - sal/osl sal/qa sal/rtl sal/test sal/textenc sw/qa

2019-08-02 Thread Andrea Gelmini (via logerrit)
 sal/osl/all/filepath.cxx  |2 +-
 sal/osl/unx/file.cxx  |2 +-
 sal/osl/unx/nlsupport.cxx |4 ++--
 sal/osl/unx/time.cxx  |4 ++--
 sal/osl/w32/file_url.cxx  |4 ++--
 sal/osl/w32/module.cxx|2 +-
 sal/qa/osl/mutex/osl_Mutex.cxx|6 +++---
 sal/qa/osl/process/osl_Thread.cxx |2 +-
 sal/qa/osl/process/osl_process.cxx|2 +-
 sal/rtl/string.cxx|2 +-
 sal/test/bootstrap.pl |2 +-
 sal/textenc/convertsimple.cxx |2 +-
 sal/textenc/tcvtjp2.tab   |   20 ++--
 sal/textenc/tcvtmb.cxx|6 +++---
 sal/textenc/tcvtutf7.cxx  |6 +++---
 sal/textenc/tencinfo.cxx  |4 ++--
 sal/textenc/textenc.cxx   |2 +-
 sw/qa/extras/rtfexport/rtfexport4.cxx |2 +-
 18 files changed, 37 insertions(+), 37 deletions(-)

New commits:
commit 1f0802c13e835363ff48ee71a18876527321e7d8
Author: Andrea Gelmini 
AuthorDate: Fri Aug 2 11:30:46 2019 +0200
Commit: Andrea Gelmini 
CommitDate: Fri Aug 2 14:03:48 2019 +0200

Fix typo in code

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

diff --git a/sal/test/bootstrap.pl b/sal/test/bootstrap.pl
index 60a306a99c96..5dde94f80154 100644
--- a/sal/test/bootstrap.pl
+++ b/sal/test/bootstrap.pl
@@ -233,7 +233,7 @@ $rc = system "./testbootstrap",
 "AAABBBCCC000",
 
'-env:MYBOOTSTRAPTESTVALUE=\u0041\u0041\u0041\u0042\u0042\u0042\u0043\u0043\u0043\u0030\u0030\u0030';
 if (!$rc) {
-$comment = $comment . "uncode not passed\n";
+$comment = $comment . "unicode not passed\n";
 $state = 0;
 }
 
commit 7bef1aa72271361921b452559bb5debe3bfcf925
Author: Andrea Gelmini 
AuthorDate: Fri Aug 2 11:30:01 2019 +0200
Commit: Andrea Gelmini 
CommitDate: Fri Aug 2 14:03:36 2019 +0200

Fix typos

Change-Id: Ie183c445bf8a545f59aac7b0e29f72ab679a6cf3
Reviewed-on: https://gerrit.libreoffice.org/76852
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini 

diff --git a/sal/osl/all/filepath.cxx b/sal/osl/all/filepath.cxx
index ae917c6d90ed..afba01739b1b 100644
--- a/sal/osl/all/filepath.cxx
+++ b/sal/osl/all/filepath.cxx
@@ -93,7 +93,7 @@ oslFileError SAL_CALL osl_abbreviateSystemPath( rtl_uString 
*ustrSystemPath, rtl
 
 rtl_uString_newConcat( pustrCompacted, ustrPath, ustrFile );
 
-/* Event now if path was compacted to ".../..." it can be to large */
+/* Event now if path was compacted to ".../..." it can be too large */
 
 uPathWidth += uFileWidth;
 
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 0ee0b8887dd4..e961c36c7662 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -493,7 +493,7 @@ oslFileError FileHandle_Impl::writeFileAt(
 
 if (nBytesToWrite >= m_bufsiz)
 {
-// buffer to small, write through to file
+// buffer too small, write through to file
 sal_uInt64 uDone = 0;
 result = writeAt(nOffset, &(buffer[*pBytesWritten]), 
nBytesToWrite, &uDone);
 if (result != osl_File_E_None)
diff --git a/sal/osl/unx/nlsupport.cxx b/sal/osl/unx/nlsupport.cxx
index 616447ecafe3..9be260b6dd03 100644
--- a/sal/osl/unx/nlsupport.cxx
+++ b/sal/osl/unx/nlsupport.cxx
@@ -245,8 +245,8 @@ static rtl_Locale * parse_locale( const char * locale )
 /*
  * _nl_language_list[] is an array list of supported encodings. Because
  * we are using a binary search, the list has to be in ascending order.
- * We are comparing the encodings case insensitiv, so the list has
- * to be completely upper- , or lowercase.
+ * We are comparing the encodings case insensitive, so the list has
+ * to be completely upper or lowercase.
  */
 
 #if defined(__sun)
diff --git a/sal/osl/unx/time.cxx b/sal/osl/unx/time.cxx
index 4bd3003ef7d5..490865d9a859 100644
--- a/sal/osl/unx/time.cxx
+++ b/sal/osl/unx/time.cxx
@@ -167,7 +167,7 @@ sal_Bool SAL_CALL osl_getTimeValueFromDateTime( const 
oslDateTime* pDateTime, Ti
 /* check if daylight saving time is in effect */
 bias = aTime.tm_isdst > 0 ? altzone : timezone;
 #else
-/* exspect daylight saving time to be one hour */
+/* expect daylight saving time to be one hour */
 bias = aTime.tm_isdst > 0 ? timezone - 3600 : timezone;
 #endif
 
@@ -243,7 +243,7 @@ sal_Bool SAL_CALL osl_getSystemTimeFromLocalTime( const 
TimeValue* pLocalTimeVal
 /* check if daylight saving time is in effect */
 bias = pLocalTime->tm_isdst > 0 ? altzone : timezone;
 #else
-/* exspect daylight saving time to be one hour */
+/* expect daylight saving time to be one hour */
 bias = pLocalTime->tm_isdst > 0 ? timezone - 3600 : timezone;
 #endif
 
diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_ur

[Libreoffice-commits] core.git: cui/uiconfig solenv/sanitizers

2019-08-02 Thread Noel Grandin (via logerrit)
 cui/uiconfig/ui/assigncomponentdialog.ui   |6 
 cui/uiconfig/ui/blackorwhitelistentrydialog.ui |   37 +
 cui/uiconfig/ui/breaknumberoption.ui   |   26 ++---
 cui/uiconfig/ui/storedwebconnectiondialog.ui   |6 
 cui/uiconfig/ui/tsaurldialog.ui|6 
 solenv/sanitizers/ui/cui.suppr |   17 +++
 6 files changed, 23 insertions(+), 75 deletions(-)

New commits:
commit 493a1bfbc07394a94b6b8f0b35946b9e17c96001
Author: Noel Grandin 
AuthorDate: Fri Aug 2 10:24:32 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 2 12:27:19 2019 +0200

Revert "fix some accessibility warnings"

This reverts commit 885ae69174cf717edd00526e5cf8f1585c505c95.

 noel_grandin, wrt the accessibility labelled-by and label-for. If 
the label really is a GtkLabel then setting its mnemonic target (in glade, 
general tab, and use underline and select a target) is the most straight 
forward thing to do and implies those a11y relations
 the painful manual a11y labelled-by/label-for are typically for 
using something weird, like a checkbutton, as a label for something

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

diff --git a/cui/uiconfig/ui/assigncomponentdialog.ui 
b/cui/uiconfig/ui/assigncomponentdialog.ui
index 4c77b44f330c..9fbfcb538a6a 100644
--- a/cui/uiconfig/ui/assigncomponentdialog.ui
+++ b/cui/uiconfig/ui/assigncomponentdialog.ui
@@ -93,9 +93,6 @@
 False
 start
 Component method name:
-
-  
-
   
   
 False
@@ -109,9 +106,6 @@
 True
 True
 True
-
-  
-
   
   
 False
diff --git a/cui/uiconfig/ui/blackorwhitelistentrydialog.ui 
b/cui/uiconfig/ui/blackorwhitelistentrydialog.ui
index 485957da7b4b..3336f28a835f 100644
--- a/cui/uiconfig/ui/blackorwhitelistentrydialog.ui
+++ b/cui/uiconfig/ui/blackorwhitelistentrydialog.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -31,11 +31,8 @@
   
 False
 6
-dummy
+dummy
 dialog
-
-  
-
 
   
 False
@@ -129,9 +126,6 @@
 False
 True
 os-liststore
-
-  
-
   
   
 1
@@ -144,9 +138,6 @@
 True
 True
 22
-
-  
-
   
   
 1
@@ -159,9 +150,6 @@
 True
 True
 12
-
-  
-
   
   
 1
@@ -174,9 +162,6 @@
 True
 True
 22
-
-  
-
   
   
 1
@@ -189,9 +174,6 @@
 True
 True
 22
-
-  
-
   
   
 1
@@ -205,9 +187,6 @@
 end
 Operating system:
 True
-
-  
-
   
   
 0
@@ -221,9 +200,6 @@
 end
 Version:
 True
-
-  
-
   
   
 0
@@ -237,9 +213,6 @@
 end
 OpenCL vendor:
 True
-
-  
-
   
   
 0
@@ -253,9 +226,6 @@
 end
 Device:
 True
-

[Libreoffice-commits] core.git: dbaccess/source dbaccess/uiconfig

2019-08-02 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx |  142 +-
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |   38 ++---
 dbaccess/uiconfig/ui/specialjdbcconnectionpage.ui |   20 ++-
 3 files changed, 95 insertions(+), 105 deletions(-)

New commits:
commit ce64ab3c4a8cbd633b91e2313b82d8b4f309cff8
Author: Caolán McNamara 
AuthorDate: Fri Aug 2 09:35:07 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 12:03:13 2019 +0200

weld OGeneralSpecialJDBCConnectionPageSetup

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

diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index c8a57500875e..51c5dcf36dbb 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -371,38 +371,36 @@ using namespace ::com::sun::star;
 }
 
 // OMySQLJDBCConnectionPageSetup
-
OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( 
vcl::Window* pParent, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId, const 
char* pDefaultPortResId, const char* pHelpTextResId, const char* 
pHeaderTextResId, const char* pDriverClassId)
-:OGenericAdministrationPage(pParent, "SpecialJDBCConnectionPage", 
"dbaccess/ui/specialjdbcconnectionpage.ui", _rCoreAttrs)
-,m_nPortId(_nPortId)
-{
-get(m_pHeaderText, "header");
-get(m_pFTHelpText, "helpLabel");
-get(m_pFTDatabasename, "dbNameLabel");
-get(m_pETDatabasename, "dbNameEntry");
-get(m_pFTHostname, "hostNameLabel");
-get(m_pETHostname, "hostNameEntry");
-get(m_pFTPortNumber, "portNumLabel");
-get(m_pFTDefaultPortNumber, "portNumDefLabel");
-get(m_pNFPortNumber, "portNumEntry");
-m_pNFPortNumber->SetUseThousandSep(false);
-get(m_pFTDriverClass, "jdbcDriverLabel");
-get(m_pETDriverClass, "jdbcDriverEntry");
-get(m_pPBTestJavaDriver, "testDriverButton");
-
-m_pFTDriverClass->SetText(DBA_RES(pDriverClassId));
-
-m_pFTDefaultPortNumber->SetText(DBA_RES(pDefaultPortResId));
+
OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( 
TabPageParent pParent, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId, 
const char* pDefaultPortResId, const char* pHelpTextResId, const char* 
pHeaderTextResId, const char* pDriverClassId)
+: OGenericAdministrationPage(pParent, 
"dbaccess/ui/specialjdbcconnectionpage.ui", "SpecialJDBCConnectionPage", 
_rCoreAttrs)
+, m_nPortId(_nPortId)
+, m_xHeaderText(m_xBuilder->weld_label("header"))
+, m_xFTHelpText(m_xBuilder->weld_label("helpLabel"))
+, m_xFTDatabasename(m_xBuilder->weld_label("dbNameLabel"))
+, m_xETDatabasename(m_xBuilder->weld_entry("dbNameEntry"))
+, m_xFTHostname(m_xBuilder->weld_label("hostNameLabel"))
+, m_xETHostname(m_xBuilder->weld_entry("hostNameEntry"))
+, m_xFTPortNumber(m_xBuilder->weld_label("portNumLabel"))
+, m_xFTDefaultPortNumber(m_xBuilder->weld_label("portNumDefLabel"))
+, m_xNFPortNumber(m_xBuilder->weld_spin_button("portNumEntry"))
+, m_xFTDriverClass(m_xBuilder->weld_label("jdbcDriverLabel"))
+, m_xETDriverClass(m_xBuilder->weld_entry("jdbcDriverEntry"))
+, m_xPBTestJavaDriver(m_xBuilder->weld_button("testDriverButton"))
+{
+m_xFTDriverClass->set_label(DBA_RES(pDriverClassId));
+
+m_xFTDefaultPortNumber->set_label(DBA_RES(pDefaultPortResId));
 OUString sHelpText = DBA_RES(pHelpTextResId);
-m_pFTHelpText->SetText(sHelpText);
+m_xFTHelpText->set_label(sHelpText);
 //TODO this code snippet is redundant
-m_pHeaderText->SetText(DBA_RES(pHeaderTextResId));
+m_xHeaderText->set_label(DBA_RES(pHeaderTextResId));
 
-m_pETDatabasename->SetModifyHdl(LINK(this, OGenericAdministrationPage, 
OnControlEditModifyHdl));
-m_pETHostname->SetModifyHdl(LINK(this, OGenericAdministrationPage, 
OnControlEditModifyHdl));
-m_pNFPortNumber->SetModifyHdl(LINK(this, OGenericAdministrationPage, 
OnControlEditModifyHdl));
+m_xETDatabasename->connect_changed(LINK(this, 
OGenericAdministrationPage, OnControlEntryModifyHdl));
+m_xETHostname->connect_changed(LINK(this, OGenericAdministrationPage, 
OnControlEntryModifyHdl));
+m_xNFPortNumber->connect_value_changed(LINK(this, 
OGenericAdministrationPage, OnControlSpinButtonModifyHdl));
 
-m_pETDriverClass->SetModifyHdl(LINK(this, OGenericAdministrationPage, 
OnControlEditModifyHdl));
-
m_pPBTestJavaDriver->SetClickHdl(LINK(this,OGeneralSpecialJDBCConnectionPageSetup,OnTestJavaClickHdl));
+m_xETDriverClass->connect_changed(LINK(this, 
OGenericAdministrationPage, OnCont

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sw/CppunitTest_sw_layoutwriter.mk sw/qa sw/source

2019-08-02 Thread Miklos Vajna (via logerrit)
 sw/CppunitTest_sw_layoutwriter.mk  |1 
 sw/qa/extras/layout/data/image-comment.odt |binary
 sw/qa/extras/layout/layout.cxx |   44 +
 sw/source/core/text/itrcrsr.cxx|   30 +++
 4 files changed, 74 insertions(+), 1 deletion(-)

New commits:
commit 315c0c50506c8b2608fd49008a55145db675209e
Author: Miklos Vajna 
AuthorDate: Thu Aug 1 15:31:10 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Aug 2 11:45:30 2019 +0200

sw comments on frames: improve doc coordinates -> doc model pos conversion

In case an as-char image at the end of a paragraph was commented and the
user clicked past the end of the paragraph, we defaulted to extending
that comment, rather appending content. (The cursor was placed between
the as-char image and the comment anchor, not past the comment anchor.)

This doesn't seem to be useful, probably the expectation is that if the
user clicks before the comment anchor then we extend the comment range,
and if the click is after the comment anchor, then we don't. In both
cases we used to *select* the comment anchor, so typing a character
deleted the comment instead.

This commit is a step in the direction of never selecting the comment
anchor: now if you click past the comment anchor, then we place the
cursor after the comment anchor.

(But clicking before the comment anchor results in unchanged behavior
for now.)

(cherry picked from commit 27c46ecf34b32bae1806d3fc0e1684179301feb8)

Conflicts:
sw/qa/extras/layout/layout.cxx
sw/source/core/text/itrcrsr.cxx

Change-Id: I6c36ec4344591fdf330a73bcd3cdd6fd0610e339
Reviewed-on: https://gerrit.libreoffice.org/76839
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sw/CppunitTest_sw_layoutwriter.mk 
b/sw/CppunitTest_sw_layoutwriter.mk
index e5f5a180920e..99eee6c12b40 100644
--- a/sw/CppunitTest_sw_layoutwriter.mk
+++ b/sw/CppunitTest_sw_layoutwriter.mk
@@ -44,6 +44,7 @@ $(eval $(call gb_CppunitTest_use_externals,sw_layoutwriter,\
 $(eval $(call gb_CppunitTest_set_include,sw_layoutwriter,\
 -I$(SRCDIR)/sw/inc \
 -I$(SRCDIR)/sw/source/core/inc \
+-I$(SRCDIR)/sw/source/uibase/inc \
 -I$(SRCDIR)/sw/qa/extras/inc \
 $$(INCLUDE) \
 ))
diff --git a/sw/qa/extras/layout/data/image-comment.odt 
b/sw/qa/extras/layout/data/image-comment.odt
new file mode 100644
index ..d861d3a9aa03
Binary files /dev/null and b/sw/qa/extras/layout/data/image-comment.odt differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 59f73e0b78bd..0087f49c76f8 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -10,6 +10,13 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 static char const DATA_DIRECTORY[] = "/sw/qa/extras/layout/data/";
 
@@ -25,6 +32,7 @@ public:
 void testTdf117188();
 void testTdf119875();
 void testTdf123651();
+void testImageComment();
 
 CPPUNIT_TEST_SUITE(SwLayoutWriter);
 CPPUNIT_TEST(testTdf116830);
@@ -35,6 +43,7 @@ public:
 CPPUNIT_TEST(testTdf117188);
 CPPUNIT_TEST(testTdf119875);
 CPPUNIT_TEST(testTdf123651);
+CPPUNIT_TEST(testImageComment);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -182,6 +191,41 @@ void SwLayoutWriter::testTdf123651()
 assertXPath(pXmlDoc, "//SwAnchoredDrawObject/bounds", "top", "7639");
 }
 
+void SwLayoutWriter::testImageComment()
+{
+// Load a document that has "aaa" in it, then a commented image (4th char 
is the as-char image,
+// 5th char is the comment anchor).
+SwDoc* pDoc = createDoc("image-comment.odt");
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+// Look up a layout position which is on the right of the image.
+SwRootFrame* pRoot = pWrtShell->GetLayout();
+CPPUNIT_ASSERT(pRoot->GetLower()->IsPageFrame());
+SwPageFrame* pPage = static_cast(pRoot->GetLower());
+CPPUNIT_ASSERT(pPage->GetLower()->IsBodyFrame());
+SwBodyFrame* pBody = static_cast(pPage->GetLower());
+CPPUNIT_ASSERT(pBody->GetLower()->IsTextFrame());
+SwTextFrame* pTextFrame = static_cast(pBody->GetLower());
+CPPUNIT_ASSERT(pTextFrame->GetDrawObjs());
+SwSortedObjs& rDrawObjs = *pTextFrame->GetDrawObjs();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), rDrawObjs.size());
+SwAnchoredObject* pDrawObj = rDrawObjs[0];
+const SwRect& rDrawObjRect = pDrawObj->GetObjRect();
+Point aPoint = rDrawObjRect.Center();
+aPoint.setX(aPoint.getX() + rDrawObjRect.Width() / 2);
+
+// Ask for the doc model pos of this layout point.
+SwPosition aPosition(*pTextFrame->GetTextNode());
+pTextFrame->GetCursorOfst(&aPosition, aPoint);
+
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 5
+// - 

[Libreoffice-commits] core.git: configure.ac

2019-08-02 Thread Lionel Elie Mamane (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6d482d0ac21249d4d4987cda1bfe51f967c36dc8
Author: Lionel Elie Mamane 
AuthorDate: Wed Jul 10 13:58:46 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Aug 2 11:44:57 2019 +0200

build fails with libxmlsec version 1.2.27

Due to indirect inclusion of C++ headers in scope of an 'extern "C"'.
Possibly it works with version 1.2.24 to 1.2.26.

Change-Id: I12bd43b51b1cf829bfe91d4ab1eb5470b86ec18e
Reviewed-on: https://gerrit.libreoffice.org/75349
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/configure.ac b/configure.ac
index b3f5390428fe..96f776280732 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8300,7 +8300,7 @@ libo_CHECK_SYSTEM_MODULE([expat], [EXPAT], [expat])
 dnl ===
 dnl Check for system xmlsec
 dnl ===
-libo_CHECK_SYSTEM_MODULE([xmlsec], [XMLSEC], [xmlsec1-nss >= 1.2.24])
+libo_CHECK_SYSTEM_MODULE([xmlsec], [XMLSEC], [xmlsec1-nss >= 1.2.28])
 
 AC_MSG_CHECKING([whether to enable Embedded OpenType support])
 if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_eot" = "yes"; then
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sw/source

2019-08-02 Thread Vasily Melenchuk (via logerrit)
 sw/source/core/inc/UndoCore.hxx |4 ++--
 sw/source/core/undo/undobj1.cxx |   21 +++--
 2 files changed, 13 insertions(+), 12 deletions(-)

New commits:
commit 9b9a69aa0eefca90ed4a72caae97b485aabb37ae
Author: Vasily Melenchuk 
AuthorDate: Fri Jul 26 10:45:59 2019 +0300
Commit: Xisco Faulí 
CommitDate: Fri Aug 2 11:25:57 2019 +0200

tdf#126168: sw undo/redo crash fixed

After undo of style creation we have a dangling pointers to
deleted style in SwUndoSetFlyFormat. So instead of keeping
pointers to SwFrameFormat which can be invalidated, we could
keep style name and find style by name.

Change-Id: I9a60d6b3311278d7391d676010c31c862189fd08
Reviewed-on: https://gerrit.libreoffice.org/76351
Reviewed-by: Michael Stahl 
Tested-by: Jenkins
(cherry picked from commit 20e7632919f4bbefabb4190d10ee79c65b89dca7)
Reviewed-on: https://gerrit.libreoffice.org/76798
Reviewed-by: Xisco Faulí 

diff --git a/sw/source/core/inc/UndoCore.hxx b/sw/source/core/inc/UndoCore.hxx
index 002f2ebc1b2d..1699c5716041 100644
--- a/sw/source/core/inc/UndoCore.hxx
+++ b/sw/source/core/inc/UndoCore.hxx
@@ -188,8 +188,8 @@ public:
 class SwUndoSetFlyFormat : public SwUndo, public SwClient
 {
 SwFrameFormat* m_pFrameFormat;  // saved FlyFormat
-SwFrameFormat* const m_pOldFormat;
-SwFrameFormat* m_pNewFormat;
+const OUString m_DerivedFromFormatName;
+const OUString m_NewFormatName;
 std::unique_ptr m_pItemSet;   // the re-/ set 
attributes
 sal_uLong m_nOldNode, m_nNewNode;
 sal_Int32 m_nOldContent, m_nNewContent;
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index f88611b0cf11..6a2387f8712f 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -457,7 +457,8 @@ void SwUndoDelLayFormat::RedoForRollback()
 
 SwUndoSetFlyFormat::SwUndoSetFlyFormat( SwFrameFormat& rFlyFormat, 
SwFrameFormat& rNewFrameFormat )
 : SwUndo( SwUndoId::SETFLYFRMFMT, rFlyFormat.GetDoc() ), SwClient( 
&rFlyFormat ), m_pFrameFormat( &rFlyFormat ),
-m_pOldFormat( static_cast(rFlyFormat.DerivedFrom()) ), 
m_pNewFormat( &rNewFrameFormat ),
+m_DerivedFromFormatName( rFlyFormat.IsDefault() ? "" : 
rFlyFormat.DerivedFrom()->GetName() ),
+m_NewFormatName( rNewFrameFormat.GetName() ),
 m_pItemSet( new SfxItemSet( *rFlyFormat.GetAttrSet().GetPool(),
 rFlyFormat.GetAttrSet().GetRanges() )),
 m_nOldNode( 0 ), m_nNewNode( 0 ),
@@ -470,8 +471,7 @@ SwRewriter SwUndoSetFlyFormat::GetRewriter() const
 {
 SwRewriter aRewriter;
 
-if (m_pNewFormat)
-aRewriter.AddRule(UndoArg1, m_pNewFormat->GetName());
+aRewriter.AddRule(UndoArg1, m_NewFormatName);
 
 return aRewriter;
 }
@@ -532,13 +532,14 @@ void SwUndoSetFlyFormat::UndoImpl(::sw::UndoRedoContext & 
rContext)
 SwDoc & rDoc = rContext.GetDoc();
 
 // Is the new Format still existent?
-if (rDoc.GetFrameFormats()->IsAlive(m_pOldFormat))
+SwFrameFormat* pDerivedFromFrameFormat = 
rDoc.FindFrameFormatByName(m_DerivedFromFormatName);
+if (pDerivedFromFrameFormat)
 {
 if( m_bAnchorChanged )
 m_pFrameFormat->DelFrames();
 
-if( m_pFrameFormat->DerivedFrom() != m_pOldFormat )
-m_pFrameFormat->SetDerivedFrom( m_pOldFormat );
+if( m_pFrameFormat->DerivedFrom() != pDerivedFromFrameFormat)
+m_pFrameFormat->SetDerivedFrom(pDerivedFromFrameFormat);
 
 SfxItemIter aIter( *m_pItemSet );
 const SfxPoolItem* pItem = aIter.GetCurItem();
@@ -606,19 +607,19 @@ void SwUndoSetFlyFormat::RedoImpl(::sw::UndoRedoContext & 
rContext)
 SwDoc & rDoc = rContext.GetDoc();
 
 // Is the new Format still existent?
-if (rDoc.GetFrameFormats()->IsAlive(m_pNewFormat))
+SwFrameFormat* pNewFrameFormat = 
rDoc.FindFrameFormatByName(m_NewFormatName);
+if (pNewFrameFormat)
 {
-
 if( m_bAnchorChanged )
 {
 SwFormatAnchor aNewAnchor( m_nNewAnchorType );
 GetAnchor( aNewAnchor, m_nNewNode, m_nNewContent );
 SfxItemSet aSet( rDoc.GetAttrPool(), aFrameFormatSetRange );
 aSet.Put( aNewAnchor );
-rDoc.SetFrameFormatToFly( *m_pFrameFormat, *m_pNewFormat, &aSet );
+rDoc.SetFrameFormatToFly( *m_pFrameFormat, *pNewFrameFormat, &aSet 
);
 }
 else
-rDoc.SetFrameFormatToFly( *m_pFrameFormat, *m_pNewFormat );
+rDoc.SetFrameFormatToFly( *m_pFrameFormat, *pNewFrameFormat);
 
 rContext.SetSelections(m_pFrameFormat, nullptr);
 }
___
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-02 Thread Andrea Gelmini (via logerrit)
 sw/source/uibase/app/docshini.cxx|2 +-
 sw/source/uibase/config/StoredChapterNumbering.cxx   |4 ++--
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx |2 +-
 sw/source/uibase/dochdl/gloshdl.cxx  |4 ++--
 sw/source/uibase/docvw/PostItMgr.cxx |2 +-
 sw/source/uibase/docvw/edtwin.cxx|   10 +-
 sw/source/uibase/frmdlg/frmmgr.cxx   |4 ++--
 sw/source/uibase/inc/maildispatcher.hxx  |2 +-
 sw/source/uibase/inc/mmconfigitem.hxx|2 +-
 sw/source/uibase/inc/wrtsh.hxx   |4 ++--
 sw/source/uibase/shells/basesh.cxx   |4 ++--
 sw/source/uibase/shells/textsh2.cxx  |2 +-
 sw/source/uibase/uiview/view2.cxx|2 +-
 sw/source/uibase/uiview/viewdraw.cxx |2 +-
 sw/source/uibase/uno/unodispatch.cxx |2 +-
 sw/source/uibase/utlui/content.cxx   |4 ++--
 sw/source/uibase/wrtsh/move.cxx  |2 +-
 sw/source/uibase/wrtsh/select.cxx|4 ++--
 sw/source/uibase/wrtsh/wrtsh1.cxx|2 +-
 19 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit e154e3652e8292fce066f0f942620c859a5e3991
Author: Andrea Gelmini 
AuthorDate: Fri Aug 2 08:43:12 2019 +0200
Commit: Andrea Gelmini 
CommitDate: Fri Aug 2 11:00:40 2019 +0200

Fix typos

Change-Id: I3d1dd03022eb37609ee0dd62c4ee9cec93ac0717
Reviewed-on: https://gerrit.libreoffice.org/76813
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini 

diff --git a/sw/source/uibase/app/docshini.cxx 
b/sw/source/uibase/app/docshini.cxx
index 4f9690818f65..a8fec573095d 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -373,7 +373,7 @@ SwDocShell::SwDocShell( SwDoc *const pD, 
SfxObjectCreateMode const eMode )
 // Dtor
 SwDocShell::~SwDocShell()
 {
-// disable chart related objects now because in ~SwDoc it may be to late 
for this
+// disable chart related objects now because in ~SwDoc it may be too late 
for this
 if (m_xDoc)
 {
 
m_xDoc->getIDocumentChartDataProviderAccess().GetChartControllerHelper().Disconnect();
diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx 
b/sw/source/uibase/config/StoredChapterNumbering.cxx
index 653bd737bd0c..2416195fb899 100644
--- a/sw/source/uibase/config/StoredChapterNumbering.cxx
+++ b/sw/source/uibase/config/StoredChapterNumbering.cxx
@@ -48,7 +48,7 @@ class StoredChapterNumberingRules
 : public ::cppu::WeakImplHelper
 {
 private:
-// TODO in case this ever becomes accessible via api need a invalidate
+// TODO in case this ever becomes accessible via API need an invalidate
 SwChapterNumRules & m_rNumRules;
 sal_uInt16 const m_nIndex;
 
@@ -227,7 +227,7 @@ public:
   GetNamespaceMap_().GetNameByKey(XML_NAMESPACE_SVG));
 
 {
-// let's just have a office:styles as a dummy root
+// let's just have an office:styles as a dummy root
 SvXMLElementExport styles(*this,
 XML_NAMESPACE_OFFICE, XML_STYLES, true, true);
 
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx 
b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 918d48436145..f9b85ca705f8 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -254,7 +254,7 @@ svx::SpellPortions 
SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
 Note: spelling in a selection only, or starting in a mid of a drawing object 
requires
 further changes elsewhere. (Especially if it should work in sc and sd as well.)
 The code below would only be part of the solution.
-(Keeping it a as a comment for the time being)
+(Keeping it as a comment for the time being)
 ESelection aCurSel( pOLV->GetSelection() );
 ESelection aSentenceSel( 
pOLV->GetEditView().GetEditEngine()->SelectSentence( aCurSel ) );
 if (!aCurSel.HasRange())
diff --git a/sw/source/uibase/dochdl/gloshdl.cxx 
b/sw/source/uibase/dochdl/gloshdl.cxx
index bdb9e7da045e..784a6933ad98 100644
--- a/sw/source/uibase/dochdl/gloshdl.cxx
+++ b/sw/source/uibase/dochdl/gloshdl.cxx
@@ -203,7 +203,7 @@ void SwGlossaryHdl::RenameGroup(const OUString& rOld, 
OUString& rNew, const OUSt
 }
 }
 
-// delete a autotext-file-group
+// delete an autotext-file-group
 bool SwGlossaryHdl::DelGroup(const OUString &rGrpName)
 {
 OUString sGroup(rGrpName);
@@ -304,7 +304,7 @@ bool SwGlossaryHdl::NewGlossary(const OUString& rName, 
const OUString& rShortNam
 return nSuccess != sal_uInt16(-1);
 }
 
-// Delete a autotext
+// Delete an autotext
 bool SwGlossaryHdl::DelGlossary(const OUString &rShortName)
 {
 SwTextBlocks *pGlossary = pCurGrp ? pCurGrp.get()
diff --git a/sw/

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

2019-08-02 Thread László Németh (via logerrit)
 sw/qa/extras/rtfimport/rtfimport.cxx|2 +-
 writerfilter/source/dmapper/PropertyMap.cxx |   12 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 2550b380e8f81528aa2dde5790c3b607c068ee1a
Author: László Németh 
AuthorDate: Thu Aug 1 17:06:47 2019 +0200
Commit: László Németh 
CommitDate: Fri Aug 2 10:21:11 2019 +0200

tdf#123702 RTF/DOCX default 1" left/right page margins

since MSO 2007: now 1440 twips = 2540 1/100 mm (it was
1800 twips = 3175 1/100 mm).

Changing the default value fixes the layout of the
documents based on RTF templates without explicit margins.

Change-Id: I0395fb7cdd6ba176f266c8f0a9309ba48a047da3
Reviewed-on: https://gerrit.libreoffice.org/76812
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx 
b/sw/qa/extras/rtfimport/rtfimport.cxx
index 3155cf9f0a73..0bcea620da8d 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -420,7 +420,7 @@ DECLARE_RTFIMPORT_TEST(testFdo79319, "fdo79319.rtf")
 // the thin horizontal rule was imported as a big fat rectangle
 uno::Reference xShape = getShape(1);
 CPPUNIT_ASSERT_EQUAL(sal_Int16(100), getProperty(xShape, 
"RelativeWidth"));
-CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(15238), xShape->getSize().Width, 
10);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(16508), xShape->getSize().Width, 
10);
 CPPUNIT_ASSERT_DOUBLES_EQUAL(sal_Int32(53), xShape->getSize().Height, 10);
 #if 0
 CPPUNIT_ASSERT_EQUAL(text::VertOrientation::CENTER, 
getProperty(xShape, "VertOrient"));
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index a85b80735b1a..f720131c5fd5 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -382,8 +382,8 @@ SectionPropertyMap::SectionPropertyMap( bool 
bIsFirstSection )
 , m_nPageNumber( -1 )
 , m_nPageNumberType( -1 )
 , m_nBreakType( -1 )
-, m_nLeftMargin( 3175 )  // page left margin,  default 0x708 (1800) twip 
-> 3175 1/100 mm
-, m_nRightMargin( 3175 ) // page right margin,  default 0x708 (1800) twip 
-> 3175 1/100 mm
+, m_nLeftMargin( 2540 )  // page left margin,  default 1 inch = 1440 twip 
-> 2540 1/100 mm
+, m_nRightMargin( 2540 ) // page right margin,  default 1 inch = 1440 twip 
-> 2540 1/100 mm
 , m_nTopMargin( 2540 )
 , m_nBottomMargin( 2540 )
 , m_nHeaderTop( 1270 )// 720 twip
@@ -420,10 +420,10 @@ SectionPropertyMap::SectionPropertyMap( bool 
bIsFirstSection )
 Insert( PROP_HEIGHT, uno::makeAny( 
static_cast(aLetter.getHeight()) ) );
 // page width, 1/100mm
 Insert( PROP_WIDTH, uno::makeAny( 
static_cast(aLetter.getWidth()) ) );
-// page left margin, default 0x708 (1800) twip -> 3175 1/100 mm
-Insert( PROP_LEFT_MARGIN, uno::makeAny( sal_Int32(3175) ) );
-// page right margin, default 0x708 (1800) twip -> 3175 1/100 mm
-Insert( PROP_RIGHT_MARGIN, uno::makeAny( sal_Int32(3175) ) );
+// page left margin, default 0x5a0 (1440) twip -> 2540 1/100 mm
+Insert( PROP_LEFT_MARGIN, uno::makeAny( sal_Int32(2540) ) );
+// page right margin, default 0x5a0 (1440) twip -> 2540 1/100 mm
+Insert( PROP_RIGHT_MARGIN, uno::makeAny( sal_Int32(2540) ) );
 // page top margin, default 0x5a0 (1440) twip -> 2540 1/100 mm
 Insert( PROP_TOP_MARGIN, uno::makeAny( sal_Int32(2540) ) );
 // page bottom margin, default 0x5a0 (1440) twip -> 2540 1/100 mm
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: cui/uiconfig solenv/sanitizers

2019-08-02 Thread Noel Grandin (via logerrit)
 cui/uiconfig/ui/assigncomponentdialog.ui   |6 
 cui/uiconfig/ui/blackorwhitelistentrydialog.ui |   37 +++--
 cui/uiconfig/ui/breaknumberoption.ui   |   26 ++---
 cui/uiconfig/ui/storedwebconnectiondialog.ui   |6 
 cui/uiconfig/ui/tsaurldialog.ui|6 
 solenv/sanitizers/ui/cui.suppr |   17 ---
 6 files changed, 75 insertions(+), 23 deletions(-)

New commits:
commit 885ae69174cf717edd00526e5cf8f1585c505c95
Author: Noel Grandin 
AuthorDate: Fri Aug 2 09:16:36 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 2 10:13:32 2019 +0200

fix some accessibility warnings

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

diff --git a/cui/uiconfig/ui/assigncomponentdialog.ui 
b/cui/uiconfig/ui/assigncomponentdialog.ui
index 9fbfcb538a6a..4c77b44f330c 100644
--- a/cui/uiconfig/ui/assigncomponentdialog.ui
+++ b/cui/uiconfig/ui/assigncomponentdialog.ui
@@ -93,6 +93,9 @@
 False
 start
 Component method name:
+
+  
+
   
   
 False
@@ -106,6 +109,9 @@
 True
 True
 True
+
+  
+
   
   
 False
diff --git a/cui/uiconfig/ui/blackorwhitelistentrydialog.ui 
b/cui/uiconfig/ui/blackorwhitelistentrydialog.ui
index 3336f28a835f..485957da7b4b 100644
--- a/cui/uiconfig/ui/blackorwhitelistentrydialog.ui
+++ b/cui/uiconfig/ui/blackorwhitelistentrydialog.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -31,8 +31,11 @@
   
 False
 6
-dummy
+dummy
 dialog
+
+  
+
 
   
 False
@@ -126,6 +129,9 @@
 False
 True
 os-liststore
+
+  
+
   
   
 1
@@ -138,6 +144,9 @@
 True
 True
 22
+
+  
+
   
   
 1
@@ -150,6 +159,9 @@
 True
 True
 12
+
+  
+
   
   
 1
@@ -162,6 +174,9 @@
 True
 True
 22
+
+  
+
   
   
 1
@@ -174,6 +189,9 @@
 True
 True
 22
+
+  
+
   
   
 1
@@ -187,6 +205,9 @@
 end
 Operating system:
 True
+
+  
+
   
   
 0
@@ -200,6 +221,9 @@
 end
 Version:
 True
+
+  
+
   
   
 0
@@ -213,6 +237,9 @@
 end
 OpenCL vendor:
 True
+
+  
+
   
   
 0
@@ -226,6 +253,9 @@
 end
 Device:
 True
+
+  
+
   
   
 0
@@ -239,6 +269,9 @@
 end
 Driver version:
 True
+
+  
+
   
   
 0
diff --git a/cui/uiconfig/ui/breaknum

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sw/qa sw/source

2019-08-02 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/layout/data/image-comment.odt |binary
 sw/qa/extras/layout/layout.cxx |   42 +
 sw/source/core/text/itrcrsr.cxx|   30 
 3 files changed, 71 insertions(+), 1 deletion(-)

New commits:
commit af9e212f84ba5148fac09bb44bf1ea6bb2d57983
Author: Miklos Vajna 
AuthorDate: Thu Aug 1 15:31:10 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Aug 2 09:58:39 2019 +0200

sw comments on frames: improve doc coordinates -> doc model pos conversion

In case an as-char image at the end of a paragraph was commented and the
user clicked past the end of the paragraph, we defaulted to extending
that comment, rather appending content. (The cursor was placed between
the as-char image and the comment anchor, not past the comment anchor.)

This doesn't seem to be useful, probably the expectation is that if the
user clicks before the comment anchor then we extend the comment range,
and if the click is after the comment anchor, then we don't. In both
cases we used to *select* the comment anchor, so typing a character
deleted the comment instead.

This commit is a step in the direction of never selecting the comment
anchor: now if you click past the comment anchor, then we place the
cursor after the comment anchor.

(But clicking before the comment anchor results in unchanged behavior
for now.)

(cherry picked from commit 27c46ecf34b32bae1806d3fc0e1684179301feb8)

Conflicts:
sw/qa/extras/layout/layout.cxx
sw/source/core/text/itrcrsr.cxx

Change-Id: I6c36ec4344591fdf330a73bcd3cdd6fd0610e339
Reviewed-on: https://gerrit.libreoffice.org/76832
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/layout/data/image-comment.odt 
b/sw/qa/extras/layout/data/image-comment.odt
new file mode 100644
index ..d861d3a9aa03
Binary files /dev/null and b/sw/qa/extras/layout/data/image-comment.odt differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 7090f76d5360..5548484c3874 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -23,6 +23,11 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 static char const DATA_DIRECTORY[] = "/sw/qa/extras/layout/data/";
 
@@ -73,6 +78,7 @@ public:
 void testTdf118719();
 void testTdf123651();
 void testBtlrCell();
+void testImageComment();
 
 CPPUNIT_TEST_SUITE(SwLayoutWriter);
 CPPUNIT_TEST(testRedlineFootnotes);
@@ -114,6 +120,7 @@ public:
 CPPUNIT_TEST(testTdf118719);
 CPPUNIT_TEST(testTdf123651);
 CPPUNIT_TEST(testBtlrCell);
+CPPUNIT_TEST(testImageComment);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -2907,6 +2914,41 @@ void SwLayoutWriter::testBtlrCell()
 #endif
 }
 
+void SwLayoutWriter::testImageComment()
+{
+// Load a document that has "aaa" in it, then a commented image (4th char 
is the as-char image,
+// 5th char is the comment anchor).
+SwDoc* pDoc = createDoc("image-comment.odt");
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+// Look up a layout position which is on the right of the image.
+SwRootFrame* pRoot = pWrtShell->GetLayout();
+CPPUNIT_ASSERT(pRoot->GetLower()->IsPageFrame());
+SwPageFrame* pPage = static_cast(pRoot->GetLower());
+CPPUNIT_ASSERT(pPage->GetLower()->IsBodyFrame());
+SwBodyFrame* pBody = static_cast(pPage->GetLower());
+CPPUNIT_ASSERT(pBody->GetLower()->IsTextFrame());
+SwTextFrame* pTextFrame = static_cast(pBody->GetLower());
+CPPUNIT_ASSERT(pTextFrame->GetDrawObjs());
+SwSortedObjs& rDrawObjs = *pTextFrame->GetDrawObjs();
+CPPUNIT_ASSERT_EQUAL(static_cast(1), rDrawObjs.size());
+SwAnchoredObject* pDrawObj = rDrawObjs[0];
+const SwRect& rDrawObjRect = pDrawObj->GetObjRect();
+Point aPoint = rDrawObjRect.Center();
+aPoint.setX(aPoint.getX() + rDrawObjRect.Width() / 2);
+
+// Ask for the doc model pos of this layout point.
+SwPosition aPosition(*pTextFrame->GetTextNodeForFirstText());
+pTextFrame->GetCursorOfst(&aPosition, aPoint);
+
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 5
+// - Actual  : 4
+// i.e. the cursor got positioned between the image and its comment, so 
typing extended the
+// comment, instead of adding content after the commented image.
+CPPUNIT_ASSERT_EQUAL(static_cast(5), 
aPosition.nContent.GetIndex());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwLayoutWriter);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 1aa6a311fc6d..7f862bd02921 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -1254,6 +1254,27 @@ void SwTextCursor::GetCharRect( SwRect* pOrig, 
TextFrameIndex cons

[Libreoffice-commits] online.git: test/fakesockettest.cpp

2019-08-02 Thread Miklos Vajna (via logerrit)
 test/fakesockettest.cpp |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 003c98ff9389156e72e8ab5853c84c9bbf4d8051
Author: Miklos Vajna 
AuthorDate: Fri Aug 2 09:57:16 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Aug 2 09:57:20 2019 +0200

fakesockettest: respect CPPUNIT_TEST_NAME

This was running unconditionally.

Change-Id: I3de4241230d0f06f7836756e2d9b7fdf84d3477f

diff --git a/test/fakesockettest.cpp b/test/fakesockettest.cpp
index e425b4d4d..c3243570f 100644
--- a/test/fakesockettest.cpp
+++ b/test/fakesockettest.cpp
@@ -271,6 +271,17 @@ CPPUNIT_TEST_SUITE_REGISTRATION(FakeSocketTest);
 
 int main(int, char**)
 {
+const char* envar = std::getenv("CPPUNIT_TEST_NAME");
+std::string testName;
+if (envar)
+{
+testName = std::string(envar);
+}
+if (!testName.empty() && testName != "FakeSocketTest")
+{
+return 0;
+}
+
 CPPUNIT_NS::TestResult controller;
 CPPUNIT_NS::TestResultCollector result;
 controller.addListener(&result);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: dbaccess/source dbaccess/uiconfig

2019-08-02 Thread Caolán McNamara (via logerrit)
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx |   58 --
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx |   15 ++---
 dbaccess/source/ui/dlg/adminpages.cxx |   46 -
 dbaccess/source/ui/dlg/adminpages.hxx |2 
 dbaccess/uiconfig/ui/authentificationpage.ui  |   17 ++
 5 files changed, 36 insertions(+), 102 deletions(-)

New commits:
commit 620fff54ca9cd04459cc5d963ef94d4438129fe4
Author: Caolán McNamara 
AuthorDate: Thu Aug 1 21:50:50 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 09:45:11 2019 +0200

weld OAuthentificationPageSetup

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

diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx 
b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index d3f3d88205f5..c8a57500875e 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -709,53 +709,39 @@ using namespace ::com::sun::star;
 return bChangedSomething;
 }
 
-VclPtr 
OAuthentificationPageSetup::CreateAuthentificationTabPage( vcl::Window* 
pParent, const SfxItemSet& _rAttrSet )
+VclPtr 
OAuthentificationPageSetup::CreateAuthentificationTabPage(TabPageParent 
pParent, const SfxItemSet& _rAttrSet)
 {
 return VclPtr::Create( pParent, _rAttrSet);
 }
 
-
-OAuthentificationPageSetup::OAuthentificationPageSetup( vcl::Window* 
pParent, const SfxItemSet& _rCoreAttrs )
-:OGenericAdministrationPage(pParent, "AuthentificationPage", 
"dbaccess/ui/authentificationpage.ui", _rCoreAttrs )
+OAuthentificationPageSetup::OAuthentificationPageSetup(TabPageParent 
pParent, const SfxItemSet& _rCoreAttrs)
+: OGenericAdministrationPage(pParent, 
"dbaccess/ui/authentificationpage.ui", "AuthentificationPage", _rCoreAttrs)
+, m_xFTHelpText(m_xBuilder->weld_label("helptext"))
+, m_xFTUserName(m_xBuilder->weld_label("generalUserNameLabel"))
+, m_xETUserName(m_xBuilder->weld_entry("generalUserNameEntry"))
+, 
m_xCBPasswordRequired(m_xBuilder->weld_check_button("passRequiredCheckbutton"))
+, m_xPBTestConnection(m_xBuilder->weld_button("testConnectionButton"))
 {
-get(m_pFTHelpText, "helptext");
-get(m_pFTUserName, "generalUserNameLabel");
-get(m_pETUserName, "generalUserNameEntry");
-get(m_pCBPasswordRequired, "passRequiredCheckbutton");
-get(m_pPBTestConnection, "testConnectionButton");
-
m_pETUserName->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlEditModifyHdl));
-
m_pCBPasswordRequired->SetClickHdl(LINK(this,OGenericAdministrationPage,OnControlModifiedClick));
-
m_pPBTestConnection->SetClickHdl(LINK(this,OGenericAdministrationPage,OnTestConnectionClickHdl));
-
-LayoutHelper::fitSizeRightAligned( *m_pPBTestConnection );
+
m_xETUserName->connect_changed(LINK(this,OGenericAdministrationPage,OnControlEntryModifyHdl));
+
m_xCBPasswordRequired->connect_toggled(LINK(this,OGenericAdministrationPage,OnControlModifiedButtonClick));
+
m_xPBTestConnection->connect_clicked(LINK(this,OGenericAdministrationPage,OnTestConnectionButtonClickHdl));
 }
 
 OAuthentificationPageSetup::~OAuthentificationPageSetup()
 {
-disposeOnce();
-}
-
-void OAuthentificationPageSetup::dispose()
-{
-m_pFTHelpText.clear();
-m_pFTUserName.clear();
-m_pETUserName.clear();
-m_pCBPasswordRequired.clear();
-m_pPBTestConnection.clear();
-OGenericAdministrationPage::dispose();
 }
 
 void OAuthentificationPageSetup::fillWindows(std::vector< 
std::unique_ptr >& _rControlList)
 {
-_rControlList.emplace_back(new 
ODisableWrapper(m_pFTHelpText));
-_rControlList.emplace_back(new 
ODisableWrapper(m_pFTUserName));
-_rControlList.emplace_back(new 
ODisableWrapper(m_pPBTestConnection));
+_rControlList.emplace_back(new 
ODisableWidgetWrapper(m_xFTHelpText.get()));
+_rControlList.emplace_back(new 
ODisableWidgetWrapper(m_xFTUserName.get()));
+_rControlList.emplace_back(new 
ODisableWidgetWrapper(m_xPBTestConnection.get()));
 }
 
 void OAuthentificationPageSetup::fillControls(std::vector< 
std::unique_ptr >& _rControlList)
 {
-_rControlList.emplace_back(new OSaveValueWrapper(m_pETUserName));
-_rControlList.emplace_back(new 
OSaveValueWrapper(m_pCBPasswordRequired));
+_rControlList.emplace_back(new 
OSaveValueWidgetWrapper(m_xETUserName.get()));
+_rControlList.emplace_back(new 
OSaveValueWidgetWrapper(m_xCBPasswordRequired.get()));
 }
 
 void OAuthentificationPageSetup::implInitControls(const SfxItemSet& _rSet, 
bool /*_bSaveValue*/)
@@ -766,23 +752,23 @@ using namespace 

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

2019-08-02 Thread Caolán McNamara (via logerrit)
 include/vcl/decoview.hxx  |6 +
 vcl/source/control/button.cxx |   50 ++
 2 files changed, 24 insertions(+), 32 deletions(-)

New commits:
commit 6aaf6c4c5ad096ed11fc524ebe0540ba0a41c053
Author: Caolán McNamara 
AuthorDate: Thu Aug 1 21:28:17 2019 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 2 09:44:54 2019 +0200

DrawButtonFlags::NoText never set

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

diff --git a/include/vcl/decoview.hxx b/include/vcl/decoview.hxx
index 51eb1b75afa0..5bcdcc1a208a 100644
--- a/include/vcl/decoview.hxx
+++ b/include/vcl/decoview.hxx
@@ -87,12 +87,11 @@ enum class DrawButtonFlags
 Disabled= 0x0040,
 Highlight   = 0x0100,
 Flat= 0x0200,
-NoLeftLightBorder   = 0x1000,
-NoText  = 0x2000
+NoLeftLightBorder   = 0x1000
 };
 namespace o3tl
 {
-template<> struct typed_flags : 
is_typed_flags {};
+template<> struct typed_flags : 
is_typed_flags {};
 }
 
 class VCL_DLLPUBLIC DecorationView
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index a46ab29fc08a..7240f7ce1b87 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -219,7 +219,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, 
Point& rPos,
 {
 OUString aText(GetText());
 bool bDrawImage = HasImage();
-bool bDrawText  = !aText.isEmpty() && ! (ImplGetButtonState() & 
DrawButtonFlags::NoText);
+bool bDrawText  = !aText.isEmpty();
 bool bHasSymbol = pSymbolRect != nullptr;
 
 // No text and no image => nothing to do => return
@@ -839,23 +839,19 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* 
pDev, DrawFlags nDrawFl
 {
 long nSeparatorX = 0;
 tools::Rectangle aSymbolRect = aInRect;
-if (!(ImplGetButtonState() & DrawButtonFlags::NoText))
-{
-// calculate symbol size
-long nSymbolSize= pDev->GetTextHeight() / 2 + 1;
 
-nSeparatorX = aInRect.Right() - 2*nSymbolSize;
-aSize.AdjustWidth( -(2*nSymbolSize) );
+// calculate symbol size
+long nSymbolSize= pDev->GetTextHeight() / 2 + 1;
 
-// center symbol rectangle in the separated area
-aSymbolRect.AdjustRight( -(nSymbolSize/2) );
-aSymbolRect.SetLeft( aSymbolRect.Right() - nSymbolSize );
+nSeparatorX = aInRect.Right() - 2*nSymbolSize;
+aSize.AdjustWidth( -(2*nSymbolSize) );
 
-ImplDrawAlignedImage( pDev, aPos, aSize, nImageSep,
-  nTextStyle, nullptr, true );
-}
-else
-ImplCalcSymbolRect( aSymbolRect );
+// center symbol rectangle in the separated area
+aSymbolRect.AdjustRight( -(nSymbolSize/2) );
+aSymbolRect.SetLeft( aSymbolRect.Right() - nSymbolSize );
+
+ImplDrawAlignedImage( pDev, aPos, aSize, nImageSep,
+  nTextStyle, nullptr, true );
 
 long nDistance = (aSymbolRect.GetHeight() > 10) ? 2 : 1;
 DecorationView aDecoView( pDev );
@@ -1626,7 +1622,7 @@ Size PushButton::CalcMinimumSize() const
 long nSymbolSize = GetTextHeight() / 2 + 1;
 aSize.AdjustWidth(2*nSymbolSize );
 }
-if ( !PushButton::GetText().isEmpty() && ! (ImplGetButtonState() & 
DrawButtonFlags::NoText) )
+if (!PushButton::GetText().isEmpty())
 {
 Size textSize = GetTextRect( tools::Rectangle( Point(), Size( 
0x7fff, 0x7fff ) ),
  PushButton::GetText(), ImplGetTextStyle( 
DrawFlags::NONE ) ).GetSize();
@@ -2015,8 +2011,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags 
nDrawFlags,
 // no image radio button
 if ( !maImage )
 {
-if ( ( !aText.isEmpty() && ! (ImplGetButtonState() & 
DrawButtonFlags::NoText) ) ||
- HasImage() )
+if (!aText.isEmpty() || HasImage())
 {
 DrawTextFlags nTextStyle = Button::ImplGetTextStyle( nWinStyle, 
nDrawFlags );
 
@@ -2085,7 +2080,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags 
nDrawFlags,
 longnTextWidth  = pDev->GetCtrlTextWidth( aText );
 
 // calculate position and sizes
-if ( !aText.isEmpty() && ! (ImplGetButtonState() & 
DrawButtonFlags::NoText) )
+if (!aText.isEmpty())
 {
 Size aTmpSize( (aImageSize.Width()+8), (aImageSize.Height()+8) );
 if ( bTopImage )
@@ -2855,7 +2850,7 @@ Size RadioButton::CalcMinimumSize() const
 }
 
 OUString aText = GetText();
-if ( !aText.isEmpty() && ! (ImplGetButtonState() & 
DrawButtonFlags::NoText) )
+if (!aText.isEmpty())
 {
 bool bTopImage = (GetStyle() & WB_TOP) != 0

[Libreoffice-commits] online.git: test/httpwstest.cpp

2019-08-02 Thread Miklos Vajna (via logerrit)
 test/httpwstest.cpp |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 773080eb7400117c45f01553bf5f955ae2537da8
Author: Miklos Vajna 
AuthorDate: Fri Aug 2 09:35:20 2019 +0200
Commit: Miklos Vajna 
CommitDate: Fri Aug 2 09:35:20 2019 +0200

Fix failing HTTPWSTest::testInactiveClient()

It seems to me that in this case the test was poor, if other
invalidation types are expected, then this one should be fine, too.

Change-Id: Iae7597eef081acdfb5d6f9152747204a71bd2b66

diff --git a/test/httpwstest.cpp b/test/httpwstest.cpp
index 3c36380fc..898d1b169 100644
--- a/test/httpwstest.cpp
+++ b/test/httpwstest.cpp
@@ -1389,6 +1389,9 @@ void HTTPWSTest::testInactiveClient()
 SocketProcessor("Second ", socket2, [&](const std::string& msg)
 {
 const auto token = LOOLProtocol::getFirstToken(msg);
+// 'window:' is e.g. 'window: 
{"id":"4","action":"invalidate","rectangle":"0, 0,
+// 0, 0"}', which is probably fine, given that other 
invalidations are also
+// expected.
 CPPUNIT_ASSERT_MESSAGE("unexpected message: " + msg,
 token == "cursorvisible:" ||
 token == "graphicselection:" ||
@@ -1405,7 +1408,8 @@ void HTTPWSTest::testInactiveClient()
 token == "viewcursorvisible:" ||
 token == "viewinfo:" ||
 token == "editor:" ||
-token == "context:");
+token == "context:" ||
+token == "window:");
 
 // End when we get state changed.
 return (token != "statechanged:");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits