[Libreoffice-commits] core.git: 2 commits - accessibility/source external/frozen

2023-07-23 Thread Caolán McNamara (via logerrit)
 accessibility/source/extended/accessibletablistboxtable.cxx |6 ++--
 external/frozen/UnpackedTarball_frozen.mk   |1 
 external/frozen/cid1538304_reference_ctor.0 |   16 
 3 files changed, 20 insertions(+), 3 deletions(-)

New commits:
commit a7181c0b3898d32bae0deaf12ebcadd3de30a50e
Author: Caolán McNamara 
AuthorDate: Sat Jul 22 20:27:25 2023 +0100
Commit: Caolán McNamara 
CommitDate: Sun Jul 23 11:54:08 2023 +0200

cid#1538304 Big parameter passed by value

and

cid#1538309 Big parameter passed by value

Change-Id: I6c3f86c3c57f561b71809d0193ab663d2f92a4b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154794
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/external/frozen/UnpackedTarball_frozen.mk 
b/external/frozen/UnpackedTarball_frozen.mk
index 196cf1e00fdc..b33a05c7dbd8 100644
--- a/external/frozen/UnpackedTarball_frozen.mk
+++ b/external/frozen/UnpackedTarball_frozen.mk
@@ -14,6 +14,7 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,frozen,$(FROZEN_TARBALL)))
 $(eval $(call gb_UnpackedTarball_add_patches,frozen,\
external/frozen/defines_h_constexpr_string.patch.0 \
external/frozen/cid1532449_use_move_ctor.0 \
+   external/frozen/cid1538304_reference_ctor.0 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/frozen/cid1538304_reference_ctor.0 
b/external/frozen/cid1538304_reference_ctor.0
new file mode 100644
index ..8ed0a7533fd4
--- /dev/null
+++ b/external/frozen/cid1538304_reference_ctor.0
@@ -0,0 +1,16 @@
+--- include/frozen/map.h   2023-07-22 20:20:19.580400347 +0100
 include/frozen/map.h   2023-07-22 20:25:44.893704485 +0100
+@@ -94,11 +94,11 @@
+ 
+ public:
+   /* constructors */
+-  constexpr map(container_type items, Compare const )
++  constexpr map(const container_type& items, Compare const )
+   : less_than_{compare}
+   , items_{bits::quicksort(items, less_than_)} {}
+ 
+-  explicit constexpr map(container_type items)
++  explicit constexpr map(const container_type& items)
+   : map{items, Compare{}} {}
+ 
+   constexpr map(std::initializer_list items, Compare const 
)
commit cb78012a9ba17e264605e10c49303d2bf5e1460d
Author: Caolán McNamara 
AuthorDate: Sat Jul 22 20:06:25 2023 +0100
Commit: Caolán McNamara 
CommitDate: Sun Jul 23 11:53:59 2023 +0200

cid#1539071 Division or modulo by zero

Change-Id: Icc730f5097609a845e287e580881a8466b0b128d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154793
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/accessibility/source/extended/accessibletablistboxtable.cxx 
b/accessibility/source/extended/accessibletablistboxtable.cxx
index 7157febc3ea3..fe2d51b0ee3f 100644
--- a/accessibility/source/extended/accessibletablistboxtable.cxx
+++ b/accessibility/source/extended/accessibletablistboxtable.cxx
@@ -320,11 +320,11 @@ namespace accessibility
 
 ensureIsAlive();
 
-sal_Int32 nRows = implGetSelRowCount();
-if ( nRows == 0 )
+const sal_Int32 nColCount = implGetColumnCount();
+
+if (nColCount == 0)
 throw IndexOutOfBoundsException();
 
-const sal_Int32 nColCount = implGetColumnCount();
 const sal_Int32 nRow = implGetSelRow(nSelectedChildIndex / nColCount);
 const sal_Int32 nColumn = nSelectedChildIndex % nColCount;
 return getAccessibleCellAt( nRow, nColumn );


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

2023-07-21 Thread Michael Weghorn (via logerrit)
 accessibility/source/extended/accessiblelistboxentry.cxx |   54 ++-
 1 file changed, 24 insertions(+), 30 deletions(-)

New commits:
commit 0e3d0612a0942b3627a8dca61a072fc04f59d161
Author: Michael Weghorn 
AuthorDate: Fri Jul 21 18:20:25 2023 +0200
Commit: Michael Weghorn 
CommitDate: Fri Jul 21 22:47:53 2023 +0200

a11y: Don't look for grandparent when asked for parent

`AccessibleListBoxEntry::implGetParentAccessible` was first
retrieving the parent, and then that one's parent, which
was failing (and thus returning an empty reference) e.g.
for the 2nd level items (like "2nd Reminder") in Writer's
AutoText Dialog (Ctrl+F3).

This resulted in Orca not announcing any such item when
focused with the qt6 VCL plugin in use, because Orca
considers the object a zombie due to it reporting
an index of -1 in the parent.

Since the parent is requested, drop one level of
finding the parent (don't look for the grandparent).

Also convert an `OSL_ENSURE` to a real assert so
this triggers if there are still any remaining
issues that need to be addressed.

This makes Orca announce the item just fine and the
hierarchy now looks good in Accerciser, too.
(Orca announces the item's text twice for qt6 now
instead of not at all, which matches the behaviour
with gtk3 that's using native Gtk widgets.)

With the "2nd Reminder" item selected in Accerciser's
treeview of the LO a11y hierarchy:

Before:

In [7]: acc.get_index_in_parent()
Out[7]: -1
In [8]: acc.parent
In [9]: acc.parent == None
Out[9]: True

With the fix in place:

In [11]: acc.get_index_in_parent()
Out[11]: 1
In [12]: acc.parent
Out[12]: 
In [13]: acc.parent.name
Out[13]: 'Standard'

Change-Id: I2994211368508c74093b73eb8c330aa293411e0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154746
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx 
b/accessibility/source/extended/accessiblelistboxentry.cxx
index 63d808b39cd2..de291fe529cb 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -335,10 +335,7 @@ namespace accessibility
 
 // get the entry for this shortened access path
 SvTreeListEntry* pParentEntry = m_pTreeListBox->GetEntryFromPath( 
aParentPath );
-OSL_ENSURE( pParentEntry, 
"AccessibleListBoxEntry::implGetParentAccessible: could not obtain a parent 
entry!" );
-
-if ( pParentEntry )
-pParentEntry = m_pTreeListBox->GetParent(pParentEntry);
+assert(pParentEntry && 
"AccessibleListBoxEntry::implGetParentAccessible: could not obtain a parent 
entry!");
 if ( pParentEntry )
 {
 uno::Reference xListBox(m_wListBox);
commit ef9bfcdbc67667f217ea01886ee728f8d1cbeb19
Author: Michael Weghorn 
AuthorDate: Fri Jul 21 18:12:14 2023 +0200
Commit: Michael Weghorn 
CommitDate: Fri Jul 21 22:47:44 2023 +0200

a11y: Drop obsolete check for empty Reference

The default Reference ctor always creates an
empty Reference, so checking for that here doesn't
make any more sense here since

commit 77ea0535271d3fb3d49c8d916ecf80e0a7f70653
Date:   Wed Sep 18 15:54:23 2019 +0200

accessibility: fix leak of AccessibleListBoxEntry

(`git -w shows it's only the check that was dropped besides
adapting indendation accordingly.)

Change-Id: I18cda45f8730b0234eed0edf31fc6e0a32b1cb9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154745
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx 
b/accessibility/source/extended/accessiblelistboxentry.cxx
index 189cb60d56a8..63d808b39cd2 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -319,36 +319,33 @@ namespace accessibility
 Reference< XAccessible > AccessibleListBoxEntry::implGetParentAccessible( 
) const
 {
 Reference< XAccessible > xParent;
-if ( !xParent.is() )
-{
-assert( m_aEntryPath.size() ); // invalid path
-if ( m_aEntryPath.size() == 1 )
-{   // we're a top level entry
-// -> our parent is the tree listbox itself
-if ( m_pTreeListBox )
-xParent = m_pTreeListBox->GetAccessible( );
-}
-else
-{   // we have an entry as parent -> get its accessible
-
-// shorten our access path by one
-std::deque< sal_Int32 > aParentPath( m_aEntryPath );
-aParentPath.pop_back();
-
- 

[Libreoffice-commits] core.git: 2 commits - accessibility/source chart2/source editeng/source include/editeng offapi/com sc/source sd/source svx/source sw/source vcl/unx

2023-05-04 Thread Noel Grandin (via logerrit)
 accessibility/source/extended/accessiblelistboxentry.cxx|2 
 accessibility/source/extended/textwindowaccessibility.cxx   |2 
 chart2/source/controller/accessibility/AccessibleBase.cxx   |2 
 editeng/source/accessibility/AccessibleContextBase.cxx  |   16 ++--
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |2 
 editeng/source/accessibility/AccessibleImageBullet.cxx  |2 
 include/editeng/AccessibleContextBase.hxx   |3 
 offapi/com/sun/star/accessibility/AccessibleEventObject.idl |7 ++
 sc/source/ui/Accessibility/AccessibleDocument.cxx   |2 
 sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx   |4 -
 sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx   |4 -
 sd/source/ui/accessibility/AccessibleOutlineView.cxx|2 
 svx/source/accessibility/AccessibleShape.cxx|6 -
 svx/source/accessibility/AccessibleTextHelper.cxx   |4 -
 svx/source/accessibility/ChildrenManagerImpl.cxx|   21 +++---
 svx/source/accessibility/GraphCtlAccessibleContext.cxx  |4 -
 svx/source/svdraw/svdedtv2.cxx  |3 
 svx/source/table/accessiblecell.cxx |2 
 svx/source/table/accessibletableshape.cxx   |8 +-
 sw/source/core/access/accmap.cxx|4 -
 vcl/unx/gtk3/a11y/atklistener.cxx   |   41 
 vcl/unx/gtk3/a11y/atklistener.hxx   |6 +
 22 files changed, 91 insertions(+), 56 deletions(-)

New commits:
commit d548d283f0ce369fa03d6f2c1ddf0f8e988bc65a
Author: Noel Grandin 
AuthorDate: Thu May 4 10:07:01 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu May 4 13:56:55 2023 +0200

tdf#105404 lock model while updating

to reduce broadcasting while we are doing a "break" operation on a
vector shape, shaves 50% off the time here

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

diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index e9cb2be04633..138d74058268 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1733,6 +1733,8 @@ void SdrEditView::DismantleMarkedObjects(bool bMakeLines)
 }
 
 SdrObjList* pOL0=nullptr;
+const bool bWasLocked = GetModel().isLocked();
+GetModel().setLock(true);
 for (size_t nm=GetMarkedObjectCount(); nm>0;) {
 --nm;
 SdrMark* pM=GetSdrMarkByIndex(nm);
@@ -1759,6 +1761,7 @@ void SdrEditView::DismantleMarkedObjects(bool bMakeLines)
 pOL->RemoveObject(nPos0);
 }
 }
+GetModel().setLock(bWasLocked);
 
 if( bUndo )
 {
commit 3b7db802731826b6cc3b55100470b0c61c1f2dfa
Author: Noel Grandin 
AuthorDate: Thu May 4 10:06:14 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu May 4 13:56:46 2023 +0200

tdf#105404 [API CHANGE] add index to accessiblity change event

Which shaves 80% off the time off breaking up a vector image on Linux.

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

diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx 
b/accessibility/source/extended/accessiblelistboxentry.cxx
index 826d9f54cb1e..013bb940ca80 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -116,7 +116,7 @@ namespace accessibility
const css::uno::Any& 
_aNewValue )
 {
 Reference< uno::XInterface > xSource( *this );
-AccessibleEventObject aEventObj( xSource, _nEventId, _aNewValue, 
_aOldValue );
+AccessibleEventObject aEventObj( xSource, _nEventId, _aNewValue, 
_aOldValue, -1 );
 
 if (m_nClientId)
 comphelper::AccessibleEventNotifier::addEvent( m_nClientId, 
aEventObj );
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx 
b/accessibility/source/extended/textwindowaccessibility.cxx
index eedf5e5eb393..ab24cc6a0cf8 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -119,7 +119,7 @@ void Paragraph::notifyEvent(::sal_Int16 nEventId,
 if (m_nClientId)
 comphelper::AccessibleEventNotifier::addEvent( m_nClientId, 
css::accessibility::AccessibleEventObject(
  getXWeak(),
- nEventId, rNewValue, rOldValue) );
+ nEventId, rNewValue, rOldValue, -1) );
 }
 
 // virtual
diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx 
b/chart2/source/controller/accessibility/AccessibleBase.cxx
index 

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

2023-04-29 Thread Mike Kaganski (via logerrit)
 accessibility/source/extended/accessibleiconchoicectrl.cxx |2 
 accessibility/source/extended/accessibletablistbox.cxx |2 
 accessibility/source/extended/textwindowaccessibility.cxx  |   30 ++---
 accessibility/source/standard/vclxaccessiblebox.cxx|2 
 avmedia/source/framework/soundhandler.cxx  |2 
 avmedia/source/gtk/gtkplayer.cxx   |4 -
 6 files changed, 21 insertions(+), 21 deletions(-)

New commits:
commit 1df99a2155751a1874f45b57a637ee9ecc4dc110
Author: Mike Kaganski 
AuthorDate: Sun Apr 23 20:12:49 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sat Apr 29 21:35:24 2023 +0200

Use getXWeak in avmedia

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

diff --git a/avmedia/source/framework/soundhandler.cxx 
b/avmedia/source/framework/soundhandler.cxx
index 2392c3dd1ae1..14870c9ee9be 100644
--- a/avmedia/source/framework/soundhandler.cxx
+++ b/avmedia/source/framework/soundhandler.cxx
@@ -195,7 +195,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const 
css::util::URL&
 m_xPlayer.set( avmedia::MediaWindow::createPlayer( aURL.Complete, 
aDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_REFERRER, 
OUString()) ), css::uno::UNO_SET_THROW );
 // OK- we can start async playing ...
 // Count this request and initialize self-holder against dying by uno 
ref count ...
-m_xSelfHold.set(static_cast< ::cppu::OWeakObject* >(this), 
css::uno::UNO_QUERY);
+m_xSelfHold.set(getXWeak());
 m_xPlayer->start();
 m_aUpdateIdle.SetPriority( TaskPriority::HIGH_IDLE );
 m_aUpdateIdle.Start();
diff --git a/avmedia/source/gtk/gtkplayer.cxx b/avmedia/source/gtk/gtkplayer.cxx
index 51978c3e5b45..47a57e3a4cd2 100644
--- a/avmedia/source/gtk/gtkplayer.cxx
+++ b/avmedia/source/gtk/gtkplayer.cxx
@@ -163,7 +163,7 @@ void GtkPlayer::notifyListeners()
 return;
 
 css::lang::EventObject aEvent;
-aEvent.Source = static_cast(this);
+aEvent.Source = getXWeak();
 
 comphelper::OInterfaceIteratorHelper2 pIterator(*pContainer);
 while (pIterator.hasMoreElements())
@@ -374,7 +374,7 @@ GtkPlayer::addPlayerListener(const 
css::uno::Reference(this);
+aEvent.Source = getXWeak();
 rListener->preferredPlayerWindowSizeAvailable(aEvent);
 }
 else
commit 32122e89310bd1d72aa796823965eadd766a84fc
Author: Mike Kaganski 
AuthorDate: Sun Apr 23 20:12:43 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sat Apr 29 21:35:10 2023 +0200

Use getXWeak in accessibility

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

diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx 
b/accessibility/source/extended/accessibleiconchoicectrl.cxx
index 1d0dbbe68a7d..032c9dae95bc 100644
--- a/accessibility/source/extended/accessibleiconchoicectrl.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx
@@ -164,7 +164,7 @@ namespace accessibility
 if ( !pEntry )
 throw RuntimeException("getAccessibleChild: Entry "
+ OUString::number(i) + " not found",
-static_cast(this));
+getXWeak());
 
 return new AccessibleIconChoiceCtrlEntry( *pCtrl, i, this );
 }
diff --git a/accessibility/source/extended/accessibletablistbox.cxx 
b/accessibility/source/extended/accessibletablistbox.cxx
index f4bffa6e7442..88bffdc1b4e5 100644
--- a/accessibility/source/extended/accessibletablistbox.cxx
+++ b/accessibility/source/extended/accessibletablistbox.cxx
@@ -100,7 +100,7 @@ namespace accessibility
 xRet = implGetTable();
 
 if ( !xRet.is() )
-throw RuntimeException("getAccessibleChild called with NULL 
xRet",static_cast< cppu::OWeakObject * >(this));
+throw RuntimeException("getAccessibleChild called with NULL 
xRet",getXWeak());
 
 return xRet;
 }
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx 
b/accessibility/source/extended/textwindowaccessibility.cxx
index 2e1cf87fa10f..eedf5e5eb393 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -118,7 +118,7 @@ void Paragraph::notifyEvent(::sal_Int16 nEventId,
 {
 if (m_nClientId)
 comphelper::AccessibleEventNotifier::addEvent( m_nClientId, 
css::accessibility::AccessibleEventObject(
- static_cast< ::cppu::OWeakObject * >(this),
+ getXWeak(),
  nEventId, rNewValue, rOldValue) );
 }
 
@@ -145,7 +145,7 @@ Paragraph::getAccessibleChild(sal_Int64)
 throw 

[Libreoffice-commits] core.git: 2 commits - accessibility/source dbaccess/source include/vcl sfx2/source vcl/Library_vcl.mk vcl/qa vcl/source

2022-08-25 Thread Chris Sherlock (via logerrit)
 accessibility/source/standard/accessiblemenuitemcomponent.cxx |5 
 accessibility/source/standard/vclxaccessibleedit.cxx  |3 
 accessibility/source/standard/vclxaccessibletabpage.cxx   |3 
 accessibility/source/standard/vclxaccessibletextcomponent.cxx |5 
 dbaccess/source/ui/misc/datasourceconnector.cxx   |3 
 include/vcl/mnemonic.hxx  |2 
 include/vcl/outdev.hxx|5 
 include/vcl/window.hxx|2 
 sfx2/source/control/thumbnailviewitem.cxx |3 
 vcl/Library_vcl.mk|1 
 vcl/qa/cppunit/mnemonic.cxx   |   70 ++
 vcl/source/control/ctrl.cxx   |5 
 vcl/source/control/tabctrl.cxx|3 
 vcl/source/gdi/pdfwriter_impl.cxx |3 
 vcl/source/outdev/text.cxx|   46 --
 vcl/source/text/mnemonic.cxx  |   53 +++
 vcl/source/window/accessibility.cxx   |3 
 vcl/source/window/menu.cxx|3 
 vcl/source/window/menuitemlist.cxx|4 
 19 files changed, 160 insertions(+), 62 deletions(-)

New commits:
commit 83e53d664f3c4a476e6e855119b019a2ae691a7c
Author: Chris Sherlock 
AuthorDate: Tue Aug 23 22:25:28 2022 +1000
Commit: Tomaž Vajngerl 
CommitDate: Thu Aug 25 13:05:39 2022 +0200

vcl: test removeMnemonicsFromString()

Change-Id: Id0a84fb5cb9fa2f6f286ffeab1e1baea641d677a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138728
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/qa/cppunit/mnemonic.cxx b/vcl/qa/cppunit/mnemonic.cxx
index 5a2131da2e3b..fc95fc527068 100644
--- a/vcl/qa/cppunit/mnemonic.cxx
+++ b/vcl/qa/cppunit/mnemonic.cxx
@@ -24,9 +24,23 @@ public:
 }
 
 void testMnemonic();
+void testRemoveMnemonicFromString();
+void testRemoveDoubleMarkedMnemonicFromString();
+void testRemoveMultipleMnemonicsFromString();
+void testRemoveDoubleMarkingsThenMnemonicFromString();
+void testRemoveMnemonicThenDoubleMarkingsFromString();
+void testRemoveMnemonicFromEndOfString();
+void testRemoveNoMnemonicFromString();
 
 CPPUNIT_TEST_SUITE(VclMnemonicTest);
 CPPUNIT_TEST(testMnemonic);
+CPPUNIT_TEST(testRemoveMnemonicFromString);
+CPPUNIT_TEST(testRemoveDoubleMarkedMnemonicFromString);
+CPPUNIT_TEST(testRemoveMultipleMnemonicsFromString);
+CPPUNIT_TEST(testRemoveDoubleMarkingsThenMnemonicFromString);
+CPPUNIT_TEST(testRemoveMnemonicThenDoubleMarkingsFromString);
+CPPUNIT_TEST(testRemoveMnemonicFromEndOfString);
+CPPUNIT_TEST(testRemoveNoMnemonicFromString);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -54,6 +68,62 @@ void VclMnemonicTest::testMnemonic()
 }
 }
 
+void VclMnemonicTest::testRemoveMnemonicFromString()
+{
+sal_Int32 nMnemonicIndex;
+OUString sNonMnemonicString = removeMnemonicFromString("this is a ~test", 
nMnemonicIndex);
+CPPUNIT_ASSERT_EQUAL(OUString("this is a test"), sNonMnemonicString);
+CPPUNIT_ASSERT_EQUAL(static_cast(10), nMnemonicIndex);
+}
+
+void VclMnemonicTest::testRemoveDoubleMarkedMnemonicFromString()
+{
+sal_Int32 nMnemonicIndex;
+OUString sNonMnemonicString = removeMnemonicFromString("this ~~is a test", 
nMnemonicIndex);
+CPPUNIT_ASSERT_EQUAL(OUString("this ~is a test"), sNonMnemonicString);
+CPPUNIT_ASSERT_EQUAL(static_cast(-1), nMnemonicIndex);
+}
+
+void VclMnemonicTest::testRemoveMultipleMnemonicsFromString()
+{
+sal_Int32 nMnemonicIndex;
+OUString sNonMnemonicString = removeMnemonicFromString("t~his is a ~test", 
nMnemonicIndex);
+CPPUNIT_ASSERT_EQUAL(OUString("this is a test"), sNonMnemonicString);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), nMnemonicIndex);
+}
+
+void VclMnemonicTest::testRemoveDoubleMarkingsThenMnemonicFromString()
+{
+sal_Int32 nMnemonicIndex;
+OUString sNonMnemonicString = removeMnemonicFromString("t~~his is a 
~test", nMnemonicIndex);
+CPPUNIT_ASSERT_EQUAL(OUString("t~his is a test"), sNonMnemonicString);
+CPPUNIT_ASSERT_EQUAL(static_cast(11), nMnemonicIndex);
+}
+
+void VclMnemonicTest::testRemoveMnemonicThenDoubleMarkingsFromString()
+{
+sal_Int32 nMnemonicIndex;
+OUString sNonMnemonicString = removeMnemonicFromString("t~his is a 
~~test", nMnemonicIndex);
+CPPUNIT_ASSERT_EQUAL(OUString("this is a ~test"), sNonMnemonicString);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), nMnemonicIndex);
+}
+
+void VclMnemonicTest::testRemoveMnemonicFromEndOfString()
+{
+sal_Int32 nMnemonicIndex;
+OUString sNonMnemonicString = removeMnemonicFromString("this is a test~", 
nMnemonicIndex);
+CPPUNIT_ASSERT_EQUAL(OUString("this is a test~"), sNonMnemonicString);

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

2022-03-03 Thread Michael Weghorn (via logerrit)
 accessibility/source/extended/AccessibleGridControlHeader.cxx |2 ++
 accessibility/source/extended/AccessibleGridControlTable.cxx  |2 ++
 2 files changed, 4 insertions(+)

New commits:
commit a9c57e6ac6bc46ad78b66409a964f5b717878931
Author: Michael Weghorn 
AuthorDate: Thu Mar 3 11:49:01 2022 +0100
Commit: Michael Weghorn 
CommitDate: Fri Mar 4 08:05:01 2022 +0100

tdf#147742 a11y: AccessibleGridControlTable needs SolarMutex

... in `AccessibleGridControlTable::getAccessibleIndexInParent`,
just like in the implementation of the other a11y UNO API methods.

Change-Id: I4ab7a2626db09398c79fe53d85c9802136decbf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130925
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx 
b/accessibility/source/extended/AccessibleGridControlTable.cxx
index da634269b049..75a17f0bcb00 100644
--- a/accessibility/source/extended/AccessibleGridControlTable.cxx
+++ b/accessibility/source/extended/AccessibleGridControlTable.cxx
@@ -69,6 +69,8 @@ AccessibleGridControlTable::getAccessibleChild( sal_Int32 
nChildIndex )
 
 sal_Int32 SAL_CALL AccessibleGridControlTable::getAccessibleIndexInParent()
 {
+SolarMutexGuard aSolarGuard;
+
 ensureIsAlive();
 if(m_aTable.HasRowHeader() && m_aTable.HasColHeader())
 return 0;
commit 1ccb6dc5bd2aa67f151d590b1aad20cecefaa28c
Author: Michael Weghorn 
AuthorDate: Thu Mar 3 11:43:06 2022 +0100
Commit: Michael Weghorn 
CommitDate: Fri Mar 4 08:04:48 2022 +0100

tdf#147742 a11y: AccessibleGridControlHeader needs SolarMutex

... in `AccessibleGridControlHeader::getAccessibleIndexInParent`,
just like in the implementation of the other a11y UNO API methods.

Change-Id: Ib3bd44e73ae54bb1df05dc2714ce1f793f7222db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130924
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/accessibility/source/extended/AccessibleGridControlHeader.cxx 
b/accessibility/source/extended/AccessibleGridControlHeader.cxx
index 122e6ab50575..d88b3421812d 100644
--- a/accessibility/source/extended/AccessibleGridControlHeader.cxx
+++ b/accessibility/source/extended/AccessibleGridControlHeader.cxx
@@ -74,6 +74,8 @@ AccessibleGridControlHeader::getAccessibleChild( sal_Int32 
nChildIndex )
 
 sal_Int32 SAL_CALL AccessibleGridControlHeader::getAccessibleIndexInParent()
 {
+SolarMutexGuard aSolarGuard;
+
 ensureIsAlive();
 if(m_eObjType == vcl::table::TCTYPE_ROWHEADERBAR && 
m_aTable.HasColHeader())
 return 1;


[Libreoffice-commits] core.git: 2 commits - accessibility/source animations/source basctl/source chart2/source comphelper/source configmgr/source connectivity/source dbaccess/source editeng/source fil

2021-09-14 Thread Mike Kaganski (via logerrit)
 accessibility/source/standard/vclxaccessibletoolbox.cxx   |6 
 animations/source/animcore/animcore.cxx   |4 
 basctl/source/basicide/basicrenderable.cxx|2 
 chart2/source/controller/accessibility/AccessibleBase.cxx |2 
 chart2/source/controller/accessibility/AccessibleChartView.cxx|2 
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx |2 
 chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx  |2 
 chart2/source/controller/main/ChartController.cxx |2 
 chart2/source/controller/main/ChartController_Position.cxx|2 
 chart2/source/controller/main/ChartController_Properties.cxx  |2 
 chart2/source/controller/main/ChartController_Window.cxx  |8 
 chart2/source/controller/uitest/uiobject.cxx  |2 
 chart2/source/model/main/ChartModel.cxx   |2 
 chart2/source/tools/NumberFormatterWrapper.cxx|2 
 chart2/source/view/axes/VCartesianAxis.cxx|2 
 chart2/source/view/main/ChartView.cxx |8 
 comphelper/source/misc/accimplaccess.cxx  |2 
 configmgr/source/childaccess.cxx  |2 
 connectivity/source/commontools/ConnectionWrapper.cxx |2 
 connectivity/source/commontools/TConnection.cxx   |2 
 connectivity/source/drivers/ado/AColumn.cxx   |2 
 connectivity/source/drivers/ado/AColumns.cxx  |2 
 connectivity/source/drivers/ado/AConnection.cxx   |2 
 connectivity/source/drivers/ado/AGroup.cxx|2 
 connectivity/source/drivers/ado/AGroups.cxx   |2 
 connectivity/source/drivers/ado/AIndex.cxx|2 
 connectivity/source/drivers/ado/AIndexes.cxx  |2 
 connectivity/source/drivers/ado/AKey.cxx  |2 
 connectivity/source/drivers/ado/AKeys.cxx |2 
 connectivity/source/drivers/ado/ATable.cxx|4 
 connectivity/source/drivers/ado/ATables.cxx   |2 
 connectivity/source/drivers/ado/AUser.cxx |2 
 connectivity/source/drivers/ado/AUsers.cxx|2 
 connectivity/source/drivers/ado/AView.cxx |2 
 connectivity/source/drivers/ado/AViews.cxx|2 
 connectivity/source/drivers/calc/CTable.cxx   |2 
 connectivity/source/drivers/dbase/DDatabaseMetaData.cxx   |2 
 connectivity/source/drivers/dbase/DIndex.cxx  |2 
 connectivity/source/drivers/dbase/DIndexes.cxx|2 
 connectivity/source/drivers/dbase/DResultSet.cxx  |2 
 connectivity/source/drivers/dbase/DTable.cxx  |2 
 connectivity/source/drivers/dbase/DTables.cxx |2 
 connectivity/source/drivers/file/FConnection.cxx  |2 
 connectivity/source/drivers/file/FDatabaseMetaData.cxx|2 
 connectivity/source/drivers/file/FDriver.cxx  |2 
 connectivity/source/drivers/file/FResultSet.cxx   |2 
 connectivity/source/drivers/file/FTable.cxx   |2 
 connectivity/source/drivers/firebird/Connection.cxx   |2 
 connectivity/source/drivers/firebird/Driver.cxx   |2 
 connectivity/source/drivers/flat/ETable.cxx   |2 
 connectivity/source/drivers/hsqldb/HDriver.cxx|2 
 connectivity/source/drivers/hsqldb/HTable.cxx |2 
 connectivity/source/drivers/mysql_jdbc/YDriver.cxx|5 
 connectivity/source/drivers/mysql_jdbc/YTable.cxx |4 
 connectivity/source/drivers/writer/WTable.cxx |4 
 connectivity/source/sdbcx/VCollection.cxx |2 
 connectivity/source/sdbcx/VDescriptor.cxx |4 
 dbaccess/source/core/api/RowSet.cxx   |8 
 dbaccess/source/core/api/TableDeco.cxx|2 
 dbaccess/source/core/api/querydescriptor.cxx  |2 
 dbaccess/source/core/api/table.cxx|2 
 dbaccess/source/core/dataaccess/ContentHelper.cxx |2 
 dbaccess/source/core/dataaccess/databasecontext.cxx   |2 
 dbaccess/source/core/dataaccess/definitioncontainer.cxx   |4 
 dbaccess/source/core/dataaccess/documentcontainer.cxx |2 
 dbaccess/source/ui/browser/brwview.cxx|2 
 dbaccess/source/ui/browser/sbagrid.cxx  

[Libreoffice-commits] core.git: 2 commits - accessibility/source chart2/inc compilerplugins/clang connectivity/inc cppcanvas/inc cppuhelper/inc dbaccess/inc dbaccess/source desktop/inc drawinglayer/in

2020-08-27 Thread Caolán McNamara (via logerrit)
 accessibility/source/extended/accessibleiconchoicectrl.cxx  |2 
 accessibility/source/extended/accessibleiconchoicectrlentry.cxx |2 
 chart2/inc/pch/precompiled_chartcore.hxx|4 
 compilerplugins/clang/unusedenumconstants.writeonly.results |4 
 connectivity/inc/pch/precompiled_ado.hxx|2 
 connectivity/inc/pch/precompiled_dbtools.hxx|3 
 cppcanvas/inc/pch/precompiled_cppcanvas.hxx |2 
 cppuhelper/inc/pch/precompiled_cppuhelper.hxx   |3 
 dbaccess/inc/pch/precompiled_dba.hxx|2 
 dbaccess/inc/pch/precompiled_dbu.hxx|5 -
 dbaccess/source/ui/control/sqledit.cxx  |3 
 dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx|1 
 desktop/inc/pch/precompiled_deploymentmisc.hxx  |2 
 desktop/inc/pch/precompiled_sofficeapp.hxx  |4 
 drawinglayer/inc/pch/precompiled_drawinglayer.hxx   |3 
 external/skia/inc/pch/precompiled_skia.hxx  |9 +-
 forms/source/solar/control/navtoolbar.cxx   |1 
 include/vcl/toolkit/ivctrl.hxx  |9 +-
 sd/source/filter/html/htmlattr.cxx  |2 
 sfx2/inc/pch/precompiled_sfx.hxx|6 +
 slideshow/inc/pch/precompiled_slideshow.hxx |   45 
+-
 solenv/clang-format/excludelist |2 
 sot/inc/pch/precompiled_sot.hxx |2 
 svl/inc/pch/precompiled_svl.hxx |2 
 svx/inc/pch/precompiled_svxcore.hxx |3 
 sw/inc/pch/precompiled_vbaswobj.hxx |3 
 uui/inc/pch/precompiled_uui.hxx |3 
 vcl/inc/verticaltabctrl.hxx |2 
 vcl/source/app/salvtables.cxx   |2 
 vcl/source/control/imivctl.hxx  |2 
 vcl/source/control/imivctl1.cxx |2 
 vcl/source/control/ivctrl.cxx   |2 
 vcl/source/uitest/uiobject.cxx  |2 
 vcl/source/window/builder.cxx   |2 
 writerfilter/inc/pch/precompiled_writerfilter.hxx   |5 -
 xmlsecurity/inc/pch/precompiled_xsec_xmlsec.hxx |2 
 36 files changed, 100 insertions(+), 50 deletions(-)

New commits:
commit 98b47440d2f95504f6bca82d2081343bdc183cde
Author: Caolán McNamara 
AuthorDate: Thu Aug 27 16:27:32 2020 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 27 20:14:43 2020 +0200

remove some unused includes and update pches

Change-Id: I786548bef39fa711aabcff32b592b3fdc4a6f9fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101486
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/chart2/inc/pch/precompiled_chartcore.hxx 
b/chart2/inc/pch/precompiled_chartcore.hxx
index 194a3678e2e7..b66d37067306 100644
--- a/chart2/inc/pch/precompiled_chartcore.hxx
+++ b/chart2/inc/pch/precompiled_chartcore.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2020-08-12 11:04:23 using:
+ Generated on 2020-08-27 16:25:53 using:
  ./bin/update_pch chart2 chartcore --cutoff=3 --exclude:system 
--exclude:module --include:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -74,6 +74,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -188,6 +189,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/connectivity/inc/pch/precompiled_ado.hxx 
b/connectivity/inc/pch/precompiled_ado.hxx
index 06f10addb04f..821b53a60b24 100644
--- a/connectivity/inc/pch/precompiled_ado.hxx
+++ b/connectivity/inc/pch/precompiled_ado.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2020-08-18 21:25:46 using:
+ Generated on 2020-08-27 17:03:22 using:
  ./bin/update_pch connectivity ado --cutoff=2 --exclude:system 
--exclude:module --exclude:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
diff --git a/connectivity/inc/pch/precompiled_dbtools.hxx 
b/connectivity/inc/pch/precompiled_dbtools.hxx
index 8eddcad7e521..dcb2db38efbd 100644
--- a/connectivity/inc/pch/precompiled_dbtools.hxx
+++ b/connectivity/inc/pch/precompiled_dbtools.hxx
@@ -13,7 +13,7 @@
  manual changes will be 

[Libreoffice-commits] core.git: 2 commits - accessibility/source dbaccess/source include/vcl solenv/clang-format toolkit/source vcl/inc vcl/source

2020-08-12 Thread Caolán McNamara (via logerrit)
 accessibility/source/extended/accessiblelistboxentry.cxx |2 
 dbaccess/source/ui/app/AppController.cxx |1 
 dbaccess/source/ui/app/AppDetailPageHelper.hxx   |1 
 dbaccess/source/ui/browser/dbtreeview.cxx|5 
 dbaccess/source/ui/browser/dsEntriesNoExp.cxx|1 
 dbaccess/source/ui/browser/dsbrowserDnD.cxx  |1 
 dbaccess/source/ui/browser/unodatbr.cxx  |2 
 dbaccess/source/ui/control/dbtreelistbox.cxx |  475 ---
 dbaccess/source/ui/inc/dbtreelistbox.hxx |   87 --
 dbaccess/source/ui/inc/tabletree.hxx |   29 
 include/vcl/toolkit/svlbitm.hxx  |8 
 solenv/clang-format/excludelist  |2 
 toolkit/source/controls/tree/treecontrolpeer.cxx |2 
 vcl/inc/pch/precompiled_vcl.hxx  |5 
 vcl/source/app/salvtables.cxx|2 
 vcl/source/treelist/svimpbox.cxx |2 
 vcl/source/treelist/svlbitm.cxx  |2 
 vcl/source/treelist/svtabbx.cxx  |2 
 vcl/source/treelist/treelistbox.cxx  |2 
 vcl/source/treelist/uiobject.cxx |2 
 20 files changed, 15 insertions(+), 618 deletions(-)

New commits:
commit 4ddafa14d70567a4e4581310a7cc83eafc1b776f
Author: Caolán McNamara 
AuthorDate: Mon Aug 10 21:11:30 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Aug 12 20:22:57 2020 +0200

svlbitm.hxx can be toolkit only now

Change-Id: Ie5ad0febca0747fa66c2caede619d14e468da032
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100498
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx 
b/accessibility/source/extended/accessiblelistboxentry.cxx
index c742e454b16f..40729de1bcb8 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -21,7 +21,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
diff --git a/include/vcl/svlbitm.hxx b/include/vcl/toolkit/svlbitm.hxx
similarity index 98%
rename from include/vcl/svlbitm.hxx
rename to include/vcl/toolkit/svlbitm.hxx
index abe2446ade11..e4e6fbc57a7d 100644
--- a/include/vcl/svlbitm.hxx
+++ b/include/vcl/toolkit/svlbitm.hxx
@@ -17,9 +17,11 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#pragma once
 
-#ifndef INCLUDED_VCL_SVLBITM_HXX
-#define INCLUDED_VCL_SVLBITM_HXX
+#if !defined(VCL_DLLIMPLEMENTATION) && !defined(TOOLKIT_DLLIMPLEMENTATION) && 
!defined(VCL_INTERNALS)
+#error "don't use this in new code"
+#endif
 
 #include 
 #include 
@@ -283,6 +285,4 @@ inline const Image& SvLBoxContextBmp::GetBitmap2() const
 return rImage;
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 3d1ab760..e8fb15c70220 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -7410,7 +7410,6 @@ include/vcl/splitwin.hxx
 include/vcl/status.hxx
 include/vcl/stdtext.hxx
 include/vcl/svapp.hxx
-include/vcl/svlbitm.hxx
 include/vcl/svtaccessiblefactory.hxx
 include/vcl/syschild.hxx
 include/vcl/sysdata.hxx
@@ -7444,6 +7443,7 @@ include/vcl/toolkit/prgsbar.hxx
 include/vcl/toolkit/roadmap.hxx
 include/vcl/toolkit/spin.hxx
 include/vcl/toolkit/spinfld.hxx
+include/vcl/toolkit/svlbitm.hxx
 include/vcl/toolkit/svtabbx.hxx
 include/vcl/toolkit/tabdlg.hxx
 include/vcl/toolkit/throbber.hxx
diff --git a/toolkit/source/controls/tree/treecontrolpeer.cxx 
b/toolkit/source/controls/tree/treecontrolpeer.cxx
index cefb7d4762ea..00423e7a2a2f 100644
--- a/toolkit/source/controls/tree/treecontrolpeer.cxx
+++ b/toolkit/source/controls/tree/treecontrolpeer.cxx
@@ -38,7 +38,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 
diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index b8c52378da0e..966e842b43bc 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -13,7 +13,7 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2020-07-23 15:08:45 using:
+ Generated on 2020-08-10 21:11:12 using:
  ./bin/update_pch vcl vcl --cutoff=6 --exclude:system --include:module 
--include:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
@@ -205,7 +205,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -309,7 +308,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -322,6 +320,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 

[Libreoffice-commits] core.git: 2 commits - accessibility/source include/vcl osx/soffice.xcodeproj solenv/clang-format vcl/Library_vcl.mk vcl/qt5 vcl/source

2020-06-12 Thread Caolán McNamara (via logerrit)
 accessibility/source/helper/acc_factory.cxx |   15 -
 include/vcl/button.hxx  |   32 
 include/vcl/popupmenuwindow.hxx |   46 -
 include/vcl/toolkit/button.hxx  |   32 
 osx/soffice.xcodeproj/project.pbxproj   |2 
 solenv/clang-format/blacklist   |2 
 vcl/Library_vcl.mk  |1 
 vcl/qt5/Qt5AccessibleWidget.cxx |1 
 vcl/source/window/accessibility.cxx |   10 ---
 vcl/source/window/popupmenuwindow.cxx   |   74 
 10 files changed, 35 insertions(+), 180 deletions(-)

New commits:
commit a854500861e469835b8d1fd37ac86b1b514c43a6
Author: Caolán McNamara 
AuthorDate: Fri Jun 12 15:16:52 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jun 12 20:13:46 2020 +0200

PopupMenuFloatingWindow is now unused

Change-Id: Ie8fa026becb1899e466fb0e7dbb987290788aaf2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96207
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/accessibility/source/helper/acc_factory.cxx 
b/accessibility/source/helper/acc_factory.cxx
index 02d75771fb98..3ede3d7157df 100644
--- a/accessibility/source/helper/acc_factory.cxx
+++ b/accessibility/source/helper/acc_factory.cxx
@@ -57,7 +57,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 
@@ -328,19 +327,7 @@ Reference< XAccessibleContext > 
AccessibleFactory::createAccessibleContext( VCLX
 
 else if ( nType == WindowType::BORDERWINDOW && hasFloatingChild( 
pWindow ) )
 {
-// The logic here has to match that of 
Window::GetAccessibleParentWindow in
-// vcl/source/window/window.cxx to avoid PopupMenuFloatingWindow
-// becoming a11y parents of themselves
-vcl::Window* pChild = pWindow->GetAccessibleChildWindow(0);
-if (PopupMenuFloatingWindow::isPopupMenu(pChild))
-{
-// Get the accessible context from the child window.
-Reference xAccessible = 
pChild->CreateAccessible();
-if (xAccessible.is())
-xContext = xAccessible->getAccessibleContext();
-}
-else
-xContext = new FloatingWindowAccessible( _pXWindow );
+xContext = new FloatingWindowAccessible( _pXWindow );
 }
 
 else if ( ( nType == WindowType::HELPTEXTWINDOW ) || ( nType == 
WindowType::FIXEDLINE ) )
diff --git a/include/vcl/popupmenuwindow.hxx b/include/vcl/popupmenuwindow.hxx
deleted file mode 100644
index 42488c2ee206..
--- a/include/vcl/popupmenuwindow.hxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_VCL_POPUPMENUWINDOW_HXX
-#define INCLUDED_VCL_POPUPMENUWINDOW_HXX
-
-#include 
-#include 
-
-class VCL_DLLPUBLIC PopupMenuFloatingWindow : public FloatingWindow
-{
-private:
-struct SAL_DLLPRIVATE ImplData;
-std::unique_ptr mpImplData;
-public:
-PopupMenuFloatingWindow( vcl::Window* pParent );
-virtual ~PopupMenuFloatingWindow() override;
-virtual void dispose() override;
-
-sal_uInt16  GetMenuStackLevel() const;
-voidSetMenuStackLevel( sal_uInt16 nLevel );
-boolIsPopupMenu() const;
-
-//determine if a given window is an activated PopupMenuFloatingWindow
-static bool isPopupMenu(const vcl::Window *pWindow);
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/osx/soffice.xcodeproj/project.pbxproj 
b/osx/soffice.xcodeproj/project.pbxproj
index 98cf4cd9096a..42f20e8847ea 100644
--- a/osx/soffice.xcodeproj/project.pbxproj
+++ b/osx/soffice.xcodeproj/project.pbxproj
@@ -133,7 +133,6 @@
BE2DAD11182FAB5200A4D2F7 /* mnemonicengine.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = 
mnemonicengine.cxx; path = ../vcl/source/window/mnemonicengine.cxx; sourceTree 
= ""; };
BE2DAD12182FAB5200A4D2F7 /* mouseevent.cxx */ = {isa = 
PBXFileReference; lastKnownFileType = 

[Libreoffice-commits] core.git: 2 commits - accessibility/source basctl/source basegfx/source chart2/source comphelper/source connectivity/source

2019-08-19 Thread Noel Grandin (via logerrit)
 accessibility/source/extended/accessibletabbar.cxx|2 -
 accessibility/source/extended/accessibletabbarpagelist.cxx|4 +--
 accessibility/source/standard/accessiblemenubasecomponent.cxx |8 +++---
 accessibility/source/standard/vclxaccessiblelist.cxx  |4 +--
 accessibility/source/standard/vclxaccessiblestatusbar.cxx |4 +--
 accessibility/source/standard/vclxaccessibletabcontrol.cxx|6 ++---
 basctl/source/accessibility/accessibledialogwindow.cxx|   10 

 basctl/source/basicide/bastype3.cxx   |4 +--
 basctl/source/basicide/breakpoint.cxx |2 -
 basegfx/source/polygon/b2dpolygonclipper.cxx  |2 -
 basegfx/source/polygon/b2dpolygoncutandtouch.cxx  |2 -
 basegfx/source/polygon/b2dpolypolygoncutter.cxx   |2 -
 basegfx/source/polygon/b2dtrapezoid.cxx   |2 -
 basegfx/source/tools/systemdependentdata.cxx  |2 -
 chart2/source/controller/uitest/uiobject.cxx  |2 -
 chart2/source/model/main/BaseCoordinateSystem.cxx |2 -
 chart2/source/tools/InternalDataProvider.cxx  |4 +--
 chart2/source/view/main/ChartView.cxx |   12 
+-
 comphelper/source/misc/backupfilehelper.cxx   |2 -
 comphelper/source/misc/lok.cxx|2 -
 comphelper/source/property/MasterPropertySet.cxx  |2 -
 comphelper/source/property/MasterPropertySetInfo.cxx  |2 -
 comphelper/source/property/propertycontainerhelper.cxx|2 -
 connectivity/source/drivers/evoab2/NDriver.cxx|2 -
 connectivity/source/drivers/file/fcode.cxx|2 -
 connectivity/source/drivers/hsqldb/HDriver.cxx|6 ++---
 connectivity/source/drivers/mork/MDatabaseMetaData.cxx|4 +--
 connectivity/source/drivers/postgresql/pq_preparedstatement.cxx   |4 +--
 connectivity/source/drivers/postgresql/pq_updateableresultset.cxx |2 -
 29 files changed, 52 insertions(+), 52 deletions(-)

New commits:
commit 9c10e29287740f473fa4f33ac6188b8c8543bfbb
Author: Noel Grandin 
AuthorDate: Mon Aug 19 15:10:37 2019 +0200
Commit: Noel Grandin 
CommitDate: Mon Aug 19 19:28:03 2019 +0200

loplugin:constvars in chart2..connectivity

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

diff --git a/chart2/source/controller/uitest/uiobject.cxx 
b/chart2/source/controller/uitest/uiobject.cxx
index 0672b1bc26a7..0f3ec51b1bf8 100644
--- a/chart2/source/controller/uitest/uiobject.cxx
+++ b/chart2/source/controller/uitest/uiobject.cxx
@@ -158,7 +158,7 @@ void recursiveAdd(chart::ObjectIdentifier const & rID, 
std::set& rChil
 }
 );
 
-for (chart::ObjectIdentifier& ID: aChildIndentifiers)
+for (const chart::ObjectIdentifier& ID: aChildIndentifiers)
 recursiveAdd(ID, rChildren, rHierarchy);
 }
 
diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx 
b/chart2/source/model/main/BaseCoordinateSystem.cxx
index 94fa8592c1aa..a343cc614a91 100644
--- a/chart2/source/model/main/BaseCoordinateSystem.cxx
+++ b/chart2/source/model/main/BaseCoordinateSystem.cxx
@@ -169,7 +169,7 @@ BaseCoordinateSystem::~BaseCoordinateSystem()
 {
 try
 {
-for(tAxisVecVecType::value_type & i : m_aAllAxis)
+for(const tAxisVecVecType::value_type & i : m_aAllAxis)
 ModifyListenerHelper::removeListenerFromAllElements( i, 
m_xModifyEventForwarder );
 ModifyListenerHelper::removeListenerFromAllElements( m_aChartTypes, 
m_xModifyEventForwarder );
 }
diff --git a/chart2/source/tools/InternalDataProvider.cxx 
b/chart2/source/tools/InternalDataProvider.cxx
index acce76d5ea19..0fa8a4bff815 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -569,7 +569,7 @@ InternalDataProvider::createDataSequenceFromArray( const 
OUString& rArrayStr, co
 
 std::vector aValues;
 aValues.reserve(aRawElems.size());
-for (OUString & aRawElem : aRawElems)
+for (const OUString & aRawElem : aRawElems)
 {
 if (aRawElem.isEmpty())
 aValues.push_back(NAN);
@@ -590,7 +590,7 @@ InternalDataProvider::createDataSequenceFromArray( const 
OUString& rArrayStr, co
 aValues.reserve(aRawElems.size());
 if (bAllNumeric)
 {
-for (OUString & aRawElem : aRawElems)
+for (const OUString & aRawElem : aRawElems)
 aValues.push_back(aRawElem.toDouble());
 }
 else
diff --git 

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

2019-07-23 Thread Caolán McNamara (via logerrit)
 accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx |6 +++---
 sw/source/core/layout/flowfrm.cxx  |1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit e468a063ceafc3941c9570bf67a5dcdaec84254e
Author: Caolán McNamara 
AuthorDate: Mon Jul 22 12:05:37 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 23 09:33:28 2019 +0200

cid#1448398 Dereference before null check

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

diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx 
b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
index d622f38f0ab7..193463df6648 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
@@ -119,13 +119,13 @@ namespace accessibility
 SolarMethodGuard aGuard(getMutex());
 ensureIsAlive();
 
-if ( !implIsValidIndex( nIndex, implGetText().getLength() ) )
-throw IndexOutOfBoundsException();
-
 css::awt::Rectangle aRect;
 
 if ( mpBrowseBox )
 {
+if ( !implIsValidIndex( nIndex, implGetText().getLength() ) )
+throw IndexOutOfBoundsException();
+
 aRect = AWTRectangle( mpBrowseBox->GetFieldCharacterBounds( 
getRowPos(), getColumnPos(), nIndex ) );
 }
 
commit 6e207aeb485e2c9580741b0ecf5da73ed79b6d90
Author: Caolán McNamara 
AuthorDate: Mon Jul 22 12:07:33 2019 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jul 23 09:33:13 2019 +0200

cid#1448404 Dereference null return value

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

diff --git a/sw/source/core/layout/flowfrm.cxx 
b/sw/source/core/layout/flowfrm.cxx
index 6e1b40986f73..20ba1d50420d 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -146,6 +146,7 @@ void SwFlowFrame::CheckKeep()
 // Kick off the "last" predecessor with a 'keep' attribute, because
 // it's possible for the whole troop to move back.
 SwFrame *pPre = m_rThis.GetIndPrev();
+assert(pPre);
 if( pPre->IsSctFrame() )
 {
 SwFrame *pLast = static_cast(pPre)->FindLastContent();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: 2 commits - accessibility/source basctl/source chart2/source compilerplugins/clang connectivity/source cppu/qa cui/source desktop/source drawinglayer/source editeng/sou

2019-04-15 Thread Noel Grandin (via logerrit)
 accessibility/source/standard/vclxaccessibletoolbox.cxx |2 
 basctl/source/basicide/scriptdocument.cxx   |2 
 basctl/source/dlged/managelang.cxx  |4 -
 chart2/source/controller/main/ChartController_Insert.cxx|4 -
 chart2/source/controller/main/ChartController_Properties.cxx|2 
 chart2/source/model/template/ChartTypeTemplate.cxx  |2 
 chart2/source/tools/LifeTime.cxx|6 -
 chart2/source/tools/MeanValueRegressionCurveCalculator.cxx  |2 
 compilerplugins/clang/sharedvisitor/sharedvisitor.cxx   |5 +
 compilerplugins/clang/simplifyconstruct.cxx |   37 
++
 compilerplugins/clang/test/simplifyconstruct.cxx|   31 

 connectivity/source/commontools/RowFunctionParser.cxx   |2 
 cppu/qa/test_any.cxx|2 
 cui/source/customize/cfg.cxx|4 -
 cui/source/dialogs/screenshotannotationdlg.cxx  |   18 ++--
 desktop/source/app/officeipcthread.cxx  |2 
 drawinglayer/source/tools/converters.cxx|4 -
 editeng/source/items/frmitems.cxx   |2 
 editeng/source/misc/svxacorr.cxx|2 
 filter/source/flash/swfwriter.cxx   |2 
 i18npool/source/indexentry/genindex_data.cxx|2 
 jvmfwk/source/elements.cxx  |   15 +---
 libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx |2 
 linguistic/source/convdic.cxx   |4 -
 linguistic/source/dicimp.cxx|4 -
 linguistic/source/dlistimp.cxx  |2 
 oox/source/export/drawingml.cxx |2 
 sal/osl/unx/file_path_helper.cxx|2 
 sal/osl/unx/uunxapi.cxx |2 
 sc/source/core/data/colorscale.cxx  |2 
 sc/source/core/opencl/formulagroupcl.cxx|2 
 sc/source/filter/excel/xetable.cxx  |2 
 sc/source/ui/app/rfindlst.cxx   |4 -
 sc/source/ui/view/viewdata.cxx  |2 
 sd/qa/unit/export-tests-ooxml2.cxx  |2 
 sd/source/filter/ppt/pptin.cxx  |2 
 sd/source/ui/animations/CustomAnimationDialog.cxx   |2 
 sd/source/ui/dlg/PhotoAlbumDialog.cxx   |2 
 sd/source/ui/slidesorter/view/SlsTheme.cxx  |4 -
 sfx2/source/appl/appserv.cxx|2 
 sfx2/source/appl/newhelp.cxx|2 
 sfx2/source/dialog/backingwindow.cxx|2 
 slideshow/source/engine/slide/userpaintoverlay.cxx  |2 
 slideshow/source/engine/transitions/combtransition.cxx  |2 
 svl/source/fsstor/fsstorage.cxx |3 
 svtools/source/uno/unoiface.cxx |4 -
 svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx   |2 
 svx/source/form/fmpgeimp.cxx|2 
 svx/source/items/algitem.cxx|2 
 svx/source/items/pageitem.cxx   |2 
 sw/qa/core/uwriter.cxx  |4 -
 sw/qa/extras/odfexport/odfexport.cxx|2 
 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx   |2 
 sw/qa/extras/rtfexport/rtfexport.cxx|2 
 sw/qa/extras/uiwriter/uiwriter.cxx  |4 -
 sw/source/core/crsr/DropDownFormFieldButton.cxx |3 
 sw/source/core/doc/doctxm.cxx   |2 
 sw/source/core/edit/autofmt.cxx |   12 +--
 sw/source/core/fields/reffld.cxx|2 
 sw/source/core/text/frmcrsr.cxx |2 
 sw/source/core/text/guess.cxx   |2 
 sw/source/core/text/porlay.cxx  |2 
 sw/source/core/text/pormulti.cxx|4 -
 sw/source/core/txtnode/fntcache.cxx |2 
 

[Libreoffice-commits] core.git: 2 commits - accessibility/source cui/source framework/source include/svtools include/tools include/vcl reportdesign/source vcl/source

2018-04-27 Thread Noel Grandin
 accessibility/source/standard/vclxaccessibleedit.cxx |2 +-
 cui/source/customize/cfg.cxx |3 ++-
 framework/source/uielement/addonstoolbarwrapper.cxx  |3 ++-
 framework/source/uielement/toolbarmanager.cxx|3 ++-
 framework/source/uielement/toolbarwrapper.cxx|3 ++-
 include/svtools/ivctrl.hxx   |2 +-
 include/tools/wintypes.hxx   |2 --
 include/vcl/edit.hxx |6 +-
 include/vcl/toolbox.hxx  |5 -
 reportdesign/source/ui/dlg/AddField.cxx  |2 +-
 reportdesign/source/ui/dlg/Condition.cxx |2 +-
 reportdesign/source/ui/dlg/GroupsSorting.cxx |2 +-
 vcl/source/control/edit.cxx  |   19 +--
 vcl/source/window/accessibility.cxx  |2 +-
 vcl/source/window/toolbox.cxx|   15 ---
 15 files changed, 40 insertions(+), 31 deletions(-)

New commits:
commit 1cf751c787f135597b4151c5a7d9c4afe69ede9c
Author: Noel Grandin 
Date:   Thu Apr 26 14:24:54 2018 +0200

make WB_LINESPACING a bool field on Toolbox

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

diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index fb1195c73b39..6070a7be05ee 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2910,7 +2910,8 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( vcl::Window 
*pWindow,
 aTbSize = pTbSymbol->LogicToPixel(Size(160, 80), 
MapMode(MapUnit::MapAppFont));
 pTbSymbol->set_width_request(aTbSize.Width());
 pTbSymbol->set_height_request(aTbSize.Height());
-pTbSymbol->SetStyle(pTbSymbol->GetStyle() | WB_SCROLL | WB_LINESPACING);
+pTbSymbol->SetStyle(pTbSymbol->GetStyle() | WB_SCROLL);
+pTbSymbol->SetLineSpacing(true);
 
 typedef std::unordered_map< OUString, bool > ImageInfo;
 
diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx 
b/framework/source/uielement/addonstoolbarwrapper.cxx
index 9062c4b72c13..379f2a4d16be 100644
--- a/framework/source/uielement/addonstoolbarwrapper.cxx
+++ b/framework/source/uielement/addonstoolbarwrapper.cxx
@@ -111,9 +111,10 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const 
Sequence< Any >& aArgument
 VclPtr pWindow = VCLUnoHelper::GetWindow( 
xFrame->getContainerWindow() );
 if ( pWindow )
 {
-sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL 
| WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE;
+sal_uLong nStyles = WB_BORDER | WB_SCROLL | WB_MOVEABLE | 
WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE;
 
 pToolBar = VclPtr::Create( pWindow, nStyles );
+pToolBar->SetLineSpacing(true);
 pToolBarManager = new AddonsToolBarManager( m_xContext, 
xFrame, m_aResourceURL, pToolBar );
 m_xToolBarManager.set( static_cast< OWeakObject *>( 
pToolBarManager ), UNO_QUERY );
 }
diff --git a/framework/source/uielement/toolbarmanager.cxx 
b/framework/source/uielement/toolbarmanager.cxx
index ea77c92a70a8..cae4dacd7295 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1552,7 +1552,8 @@ IMPL_LINK( ToolBarManager, MenuButton, ToolBox*, 
pToolBar, void )
 
 assert( !m_aOverflowManager.is() );
 
-VclPtrInstance pOverflowToolBar( pToolBar, WB_LINESPACING | 
WB_BORDER | WB_SCROLL );
+VclPtrInstance pOverflowToolBar( pToolBar, WB_BORDER | WB_SCROLL 
);
+pOverflowToolBar->SetLineSpacing(true);
 pOverflowToolBar->SetOutStyle( pToolBar->GetOutStyle() );
 m_aOverflowManager.set( new ToolBarManager( m_xContext, m_xFrame, 
OUString(), pOverflowToolBar ) );
 m_aOverflowManager->FillOverflowToolbar( pToolBar );
diff --git a/framework/source/uielement/toolbarwrapper.cxx 
b/framework/source/uielement/toolbarwrapper.cxx
index 9d99ea280c14..951fb3bacec7 100644
--- a/framework/source/uielement/toolbarwrapper.cxx
+++ b/framework/source/uielement/toolbarwrapper.cxx
@@ -149,9 +149,10 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< 
Any >& aArguments )
 VclPtr pWindow = VCLUnoHelper::GetWindow( 
xParentWindow );
 if ( pWindow )
 {
-sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL 
| WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE;
+sal_uLong nStyles = WB_BORDER | WB_SCROLL | WB_MOVEABLE | 
WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE;
 
 pToolBar = VclPtr::Create( 

[Libreoffice-commits] core.git: 2 commits - accessibility/source basegfx/test

2018-04-05 Thread Noel Grandin
 accessibility/source/extended/accessiblelistboxentry.cxx |2 +-
 basegfx/test/basegfx2d.cxx   |1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7b0d277e04f178ade10dfd8ee4f1cab2e36dc41b
Author: Noel Grandin 
Date:   Wed Apr 4 16:00:05 2018 +0200

fix bug in b2dpolypolygon::testTrapezoidHelper

ever since
commit 82b56544a7a53528970632d086c3cfd8ef879335
Date:   Wed Jan 1 10:29:40 2014 +
basegfx: accelerate Trapezoid subdivision by avoiding allocations.

found by my new unusedvariablemore plugin

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

diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx
index a840e283132f..82131b417b23 100644
--- a/basegfx/test/basegfx2d.cxx
+++ b/basegfx/test/basegfx2d.cxx
@@ -692,6 +692,7 @@ public:
 {
 B2DPoint aPoint(aPolygon.getB2DPoint(i));
 aPoint += 
B2DPoint(0.5-getRandomOrdinal(1),0.5-getRandomOrdinal(1));
+aPolygonOffset.append(aPoint);
 }
 B2DPolyPolygon aPolyPolygon;
 aPolyPolygon.append(aPolygon);
commit bce3ed11a4838865b53dccdde887d4cba0d48111
Author: Noel Grandin 
Date:   Wed Apr 4 15:32:15 2018 +0200

fix bug in AccessibleListBoxEntry::implGetParentAccessible()

ever since
commit 395d9fb1b1cc3ae3bf8ea722ea8fe25490f62589
Date:   Wed Jun 27 14:32:58 2007 +
INTEGRATION: CWS a11ysep (1.1.2); FILE ADDED

found by my new unusedvariablemore plugin

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

diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx 
b/accessibility/source/extended/accessiblelistboxentry.cxx
index 9868b47c09a9..2c9bafee467c 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -329,7 +329,7 @@ namespace accessibility
 aParentPath.pop_back();
 
 // get the entry for this shortened access path
-SvTreeListEntry* pParentEntry = 
getListBox()->GetEntryFromPath( m_aEntryPath );
+SvTreeListEntry* pParentEntry = 
getListBox()->GetEntryFromPath( aParentPath );
 OSL_ENSURE( pParentEntry, 
"AccessibleListBoxEntry::implGetParentAccessible: could not obtain a parent 
entry!" );
 
 if ( pParentEntry )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - accessibility/source canvas/source chart2/source cui/source desktop/source editeng/source extensions/source sd/qa sw/qa vcl/qa

2018-02-25 Thread Noel Grandin
 accessibility/source/extended/textwindowaccessibility.cxx |4 -
 canvas/source/tools/canvastools.cxx   |2 
 chart2/source/view/main/GL3DRenderer.cxx  |9 +--
 cui/source/options/cfgchart.cxx   |   36 +++---
 cui/source/options/cfgchart.hxx   |2 
 cui/source/options/optchart.cxx   |2 
 desktop/source/splash/splash.cxx  |   16 ++
 editeng/source/items/itemtype.cxx |   12 +---
 extensions/source/propctrlr/standardcontrol.cxx   |2 
 sd/qa/unit/import-tests.cxx   |   24 -
 sw/qa/extras/ww8export/ww8export.cxx  |4 -
 vcl/qa/cppunit/BitmapProcessorTest.cxx|2 
 12 files changed, 55 insertions(+), 60 deletions(-)

New commits:
commit 736ebd9a184752bcb756754e3af6b80cd2f4c480
Author: Noel Grandin 
Date:   Fri Feb 23 15:17:22 2018 +0200

fix alpha computation in chart2 getColorAsVector

The alpha value was not being shifted, and because of associativity, the
alpha color was also not being inverted before being divided by 255.

Found while doing other Color work.

This was introduced in
commit a0842e53b999cee3cddbd209b43e313874760f0b
Date:   Mon May 12 05:22:52 2014 +0200
more sal_Int32 to sal_uInt32 and simplification

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

diff --git a/chart2/source/view/main/GL3DRenderer.cxx 
b/chart2/source/view/main/GL3DRenderer.cxx
index b1b8510347c6..9067553dd588 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -44,10 +44,11 @@ GLfloat texCoords[] = {
 
 glm::vec4 getColorAsVector(sal_uInt32 nColor)
 {
-return glm::vec4(((nColor & 0x00FF) >> 16) / 255.0f,
-((nColor & 0xFF00) >> 8) / 255.0f,
-(nColor & 0x00FF) / 255.0f,
-(0xFF - (nColor & 0xFF00)/255.0));
+auto red   = ((nColor & 0x00FF) >> 16) / 255.0f;
+auto green = ((nColor & 0xFF00) >> 8) / 255.0f;
+auto blue  = (nColor & 0x00FF) / 255.0f;
+auto alpha = (0xFF - ((nColor & 0xFF00) >> 24)) / 255.0;
+return glm::vec4(red, green, blue, alpha);
 }
 
 }
commit ace95cf48ee88d78a17765e5f4f26bb93d5940cf
Author: Noel Grandin 
Date:   Thu Feb 22 13:29:03 2018 +0200

ColorData->Color in various

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

diff --git a/accessibility/source/extended/textwindowaccessibility.cxx 
b/accessibility/source/extended/textwindowaccessibility.cxx
index 5183af524492..3b62c886d7af 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -2360,9 +2360,9 @@ css::uno::Any Document::mapFontColor(::Color const & 
rColor)
 // static
 ::Color Document::mapFontColor(css::uno::Any const & rColor)
 {
-::sal_Int32 nColor = 0;
+::Color nColor;
 rColor >>= nColor;
-return ::Color(static_cast< ::ColorData >(nColor));
+return nColor;
 }
 
 // static
diff --git a/canvas/source/tools/canvastools.cxx 
b/canvas/source/tools/canvastools.cxx
index 477ba03b3703..63f264779b9a 100644
--- a/canvas/source/tools/canvastools.cxx
+++ b/canvas/source/tools/canvastools.cxx
@@ -894,7 +894,7 @@ namespace canvas
 const sal_Int8* pCols( rColor.getConstArray() );
 return ::Color( pCols[3], pCols[0], pCols[1], pCols[2] );
 #else
-return ::Color( *reinterpret_cast< const ::ColorData* 
>(rColor.getConstArray()) );
+return ::Color( *reinterpret_cast< const ::sal_uInt32* 
>(rColor.getConstArray()) );
 #endif
 }
 
diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx
index 678ccb333297..29351cfa7f6a 100644
--- a/cui/source/options/cfgchart.cxx
+++ b/cui/source/options/cfgchart.cxx
@@ -56,7 +56,7 @@ const XColorEntry & SvxChartColorTable::operator[]( size_t 
_nIndex ) const
 return m_aColorEntries[ _nIndex ];
 }
 
-ColorData SvxChartColorTable::getColorData( size_t _nIndex ) const
+Color SvxChartColorTable::getColor( size_t _nIndex ) const
 {
 if ( _nIndex >= m_aColorEntries.size() )
 {
@@ -100,19 +100,19 @@ void SvxChartColorTable::replace( size_t _nIndex, const 
XColorEntry & _rEntry )
 
 void SvxChartColorTable::useDefault()
 {
-ColorData aColors[] = {
-RGB_COLORDATA( 0x00, 0x45, 0x86 ),
-RGB_COLORDATA( 0xff, 0x42, 0x0e ),
-RGB_COLORDATA( 0xff, 0xd3, 0x20 ),
- 

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

2017-07-15 Thread Jochen Nitschke
 accessibility/source/extended/accessibleiconchoicectrl.cxx |   19 --
 accessibility/source/extended/accessiblelistbox.cxx|   19 --
 sc/source/filter/xml/xmlimprt.cxx  |1 
 sc/source/filter/xml/xmlimprt.hxx  |6 -
 sc/source/filter/xml/xmllabri.cxx  |   11 +--
 svx/source/accessibility/charmapacc.cxx|   40 +
 6 files changed, 26 insertions(+), 70 deletions(-)

New commits:
commit 414a907d11d931b68a0b320d646c3ca06e58052c
Author: Jochen Nitschke 
Date:   Fri Jul 14 19:38:14 2017 +0200

use unique_ptr for ScMyLabelRange

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

diff --git a/sc/source/filter/xml/xmlimprt.cxx 
b/sc/source/filter/xml/xmlimprt.cxx
index 8760c189f3fd..cb30edbf7645 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -3168,7 +3168,6 @@ void ScXMLImport::SetLabelRanges()
 xRowRanges->addNew( aLabelRange, aDataRange );
 }
 
-delete *aItr;
 aItr = pMyLabelRanges->erase(aItr);
 }
 }
diff --git a/sc/source/filter/xml/xmlimprt.hxx 
b/sc/source/filter/xml/xmlimprt.hxx
index 945e2abc010f..832dbb395b72 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -774,7 +774,7 @@ struct ScMyLabelRange
 boolbColumnOrientation;
 };
 
-typedef std::list ScMyLabelRanges;
+typedef std::list< std::unique_ptr > ScMyLabelRanges;
 
 struct ScMyImportValidation
 {
@@ -1103,10 +1103,10 @@ public:
 
 void AddNamedExpression(SCTAB nTab, ScMyNamedExpression* pNamedExp);
 
-voidAddLabelRange(const ScMyLabelRange* pMyLabelRange) {
+void AddLabelRange(std::unique_ptr pMyLabelRange) {
 if (!pMyLabelRanges)
 pMyLabelRanges = new ScMyLabelRanges;
-pMyLabelRanges->push_back(pMyLabelRange); }
+pMyLabelRanges->push_back(std::move(pMyLabelRange)); }
 
 void AddValidation(const ScMyImportValidation& rValidation) {
 if (!pValidations)
diff --git a/sc/source/filter/xml/xmllabri.cxx 
b/sc/source/filter/xml/xmllabri.cxx
index 0712a600f35c..d895157866aa 100644
--- a/sc/source/filter/xml/xmllabri.cxx
+++ b/sc/source/filter/xml/xmllabri.cxx
@@ -22,6 +22,8 @@
 #include 
 #include "xmlimprt.hxx"
 
+#include 
+
 using namespace ::com::sun::star;
 using namespace xmloff::token;
 
@@ -109,13 +111,10 @@ void ScXMLLabelRangeContext::EndElement()
 //  Label ranges must be stored as strings until all sheets are loaded
 //  (like named expressions).
 
-ScMyLabelRange* pLabelRange = new ScMyLabelRange;
-
-pLabelRange->sLabelRangeStr = sLabelRangeStr;
-pLabelRange->sDataRangeStr = sDataRangeStr;
-pLabelRange->bColumnOrientation = bColumnOrientation;
+auto pLabelRange = o3tl::make_unique(
+ScMyLabelRange{sLabelRangeStr, sDataRangeStr, 
bColumnOrientation});
 
-GetScImport().AddLabelRange(pLabelRange);
+GetScImport().AddLabelRange(std::move(pLabelRange));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 0d8eae93766dec97b15cde55dea33df50b6d9505
Author: Arnaud Versini 
Date:   Sat Jul 15 13:26:27 2017 +0200

Don't call ensureIsAlive after comphelper::OExternalLockGuard.

comphelper::OExternalLockGuard calls ensureIsAlive, no need to call it 
twice.

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

diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx 
b/accessibility/source/extended/accessibleiconchoicectrl.cxx
index 3ec6e6e29c04..6a2c77955b00 100644
--- a/accessibility/source/extended/accessibleiconchoicectrl.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx
@@ -159,7 +159,6 @@ namespace accessibility
 {
 ::comphelper::OExternalLockGuard aGuard( this );
 
-ensureAlive();
 return getCtrl()->GetEntryCount();
 }
 
@@ -167,7 +166,6 @@ namespace accessibility
 {
 ::comphelper::OExternalLockGuard aGuard( this );
 
-ensureAlive();
 VclPtr pCtrl = getCtrl();
 SvxIconChoiceCtrlEntry* pEntry = pCtrl->GetEntry(i);
 if ( !pEntry )
@@ -194,7 +192,6 @@ namespace accessibility
 {
 ::comphelper::OExternalLockGuard aGuard( this );
 
-ensureAlive();
 return getCtrl()->GetAccessibleDescription();
 }
 
@@ -202,8 +199,6 @@ namespace accessibility
 {
 ::comphelper::OExternalLockGuard aGuard( this );
 
-ensureAlive();
-
 OUString sName 

[Libreoffice-commits] core.git: 2 commits - accessibility/source avmedia/source basctl/source basegfx/source basic/qa basic/source

2017-05-19 Thread Noel Grandin
 accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx  |2 
 accessibility/source/extended/accessibleiconchoicectrlentry.cxx |2 
 accessibility/source/standard/vclxaccessibletabpagewindow.cxx   |4 -
 accessibility/source/standard/vclxaccessibletoolbox.cxx |2 
 avmedia/source/gstreamer/gstplayer.cxx  |2 
 avmedia/source/viewer/mediawindow_impl.cxx  |2 
 basctl/source/dlged/dlgedview.cxx   |2 
 basegfx/source/color/bcolormodifier.cxx |6 +-
 basegfx/source/curve/b2dcubicbezier.cxx |2 
 basegfx/source/matrix/b3dhommatrix.cxx  |2 
 basegfx/source/polygon/b2dlinegeometry.cxx  |4 -
 basegfx/source/polygon/b2dpolygontools.cxx  |   14 ++---
 basegfx/source/polygon/b2dpolypolygoncutter.cxx |4 -
 basegfx/source/polygon/b2dpolypolygontools.cxx  |6 +-
 basegfx/source/polygon/b2dtrapezoid.cxx |4 -
 basegfx/source/tools/gradienttools.cxx  |4 -
 basic/qa/cppunit/basic_coverage.cxx |4 -
 basic/qa/cppunit/basictest.cxx  |6 +-
 basic/source/basmgr/basicmanagerrepository.cxx  |2 
 basic/source/basmgr/basmgr.cxx  |2 
 basic/source/classes/eventatt.cxx   |6 +-
 basic/source/classes/sb.cxx |4 -
 basic/source/classes/sbunoobj.cxx   |4 -
 basic/source/classes/sbxmod.cxx |4 -
 basic/source/comp/codegen.cxx   |2 
 basic/source/comp/exprgen.cxx   |2 
 basic/source/comp/sbcomp.cxx|2 
 basic/source/runtime/methods.cxx|2 
 basic/source/runtime/methods1.cxx   |4 -
 basic/source/runtime/runtime.cxx|   28 
+-
 basic/source/sbx/sbxcoll.cxx|2 
 basic/source/sbx/sbxobj.cxx |6 +-
 basic/source/sbx/sbxvalue.cxx   |   12 ++--
 33 files changed, 77 insertions(+), 77 deletions(-)

New commits:
commit 3d8400a8d938be7b116298d6a79bb49d7cc0cc99
Author: Noel Grandin 
Date:   Fri May 19 10:26:30 2017 +0200

loplugin:comparisonwithconstant in accessibility..basegfx

re-running this plugin on these modules now that sberg has improved
the plugin.

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

diff --git a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx 
b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
index ea8f6694d290..835bd62d6365 100644
--- a/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
+++ b/accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx
@@ -75,7 +75,7 @@ namespace accessibility
 sal_Int32 _nOffset )
 :AccessibleBrowseBoxCell( _rxParent, _rBrowseBox, _xFocusWindow, 
_nRowPos, _nColPos )
 {
-m_nOffset = ( OFFSET_DEFAULT == _nOffset ) ? 
(sal_Int32)BBINDEX_FIRSTCONTROL : _nOffset;
+m_nOffset = ( _nOffset == OFFSET_DEFAULT ) ? 
(sal_Int32)BBINDEX_FIRSTCONTROL : _nOffset;
 sal_Int32 nIndex = getIndex_Impl( _nRowPos, _nColPos, 
_rBrowseBox.GetColumnCount() );
setAccessibleName( _rBrowseBox.GetAccessibleObjectName( 
BBTYPE_TABLECELL, nIndex ) );
setAccessibleDescription( _rBrowseBox.GetAccessibleObjectDescription( 
BBTYPE_TABLECELL, nIndex ) );
diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx 
b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
index 6be99bec6c93..94816740b8cb 100644
--- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
@@ -92,7 +92,7 @@ namespace accessibility
 if ( _rSource.Source == m_xParent )
 {
 dispose();
-OSL_ENSURE( !m_xParent.is() && ( nullptr == m_pIconCtrl ), "" );
+OSL_ENSURE( !m_xParent.is() && ( m_pIconCtrl == nullptr ), "" );
 }
 }
 
diff --git a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx 
b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
index c8edcab404f8..0b8c2c5f7390 100644
--- a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
+++ b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
@@ 

[Libreoffice-commits] core.git: 2 commits - accessibility/source basic/source compilerplugins/clang dbaccess/source editeng/source filter/source include/editeng include/oox include/svtools include/too

2017-03-30 Thread Noel Grandin
 accessibility/source/extended/AccessibleGridControl.cxx |9 ++---
 basic/source/classes/sbunoobj.cxx   |1 -
 compilerplugins/clang/unusedenumconstants.py|1 +
 dbaccess/source/ui/app/AppControllerDnD.cxx |2 --
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |4 ++--
 editeng/source/items/flditem.cxx|8 
 editeng/source/uno/unofield.cxx |4 ++--
 filter/source/msfilter/svdfppt.cxx  |4 ++--
 include/editeng/flditem.hxx |2 +-
 include/oox/core/binarycodec.hxx|3 +--
 include/svtools/accessibletable.hxx |   11 ---
 include/svtools/fileview.hxx|1 -
 include/tools/errinf.hxx|1 -
 oox/source/core/binarycodec.cxx |3 +--
 sc/source/core/data/attrib.cxx  |2 +-
 sc/source/core/data/stlpool.cxx |2 +-
 sc/source/filter/oox/biffcodec.cxx  |2 +-
 sc/source/ui/pagedlg/scuitphfedit.cxx   |8 
 sc/source/ui/unoobj/fielduno.cxx|4 ++--
 sd/source/ui/app/sdpopup.cxx|8 
 sd/source/ui/dlg/dlgfield.cxx   |6 +++---
 sd/source/ui/view/drviews2.cxx  |2 +-
 sd/source/ui/view/outlnvs2.cxx  |2 +-
 svtools/source/contnr/fileview.cxx  |2 +-
 svtools/source/misc/ehdl.cxx|4 
 25 files changed, 39 insertions(+), 57 deletions(-)

New commits:
commit 90305526ee48c855f9a2b3b4d730ea0bfb079119
Author: Noel Grandin 
Date:   Wed Mar 29 14:11:30 2017 +0200

loplugin:unusedenumconstants

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

diff --git a/accessibility/source/extended/AccessibleGridControl.cxx 
b/accessibility/source/extended/AccessibleGridControl.cxx
index df348e911417..07d108592ff6 100644
--- a/accessibility/source/extended/AccessibleGridControl.cxx
+++ b/accessibility/source/extended/AccessibleGridControl.cxx
@@ -266,13 +266,16 @@ AccessibleGridControl::implGetFixedChild( sal_Int32 
nChildIndex )
 css::uno::Reference< css::accessibility::XAccessible > xRet;
 switch( nChildIndex )
 {
-  case TCINDEX_COLUMNHEADERBAR:
+/** Child index of the column header bar (first row). */
+case 0:
 xRet = implGetHeaderBar( TCTYPE_COLUMNHEADERBAR );
 break;
-case TCINDEX_ROWHEADERBAR:
+/** Child index of the row header bar ("handle column"). */
+case 1:
 xRet = implGetHeaderBar( TCTYPE_ROWHEADERBAR );
 break;
-case TCINDEX_TABLE:
+/** Child index of the data table. */
+case 2:
 xRet = implGetTable();
 break;
 }
diff --git a/basic/source/classes/sbunoobj.cxx 
b/basic/source/classes/sbunoobj.cxx
index 971d7b475d0d..ee16722056b0 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -1503,7 +1503,6 @@ void processAutomationParams( SbxArray* pParams, 
Sequence< Any >& args, bool bOL
 enum class INVOKETYPE
 {
GetProp = 0,
-   SetProp,
Func
 };
 Any invokeAutomationMethod( const OUString& Name, Sequence< Any >& args, 
SbxArray* pParams, sal_uInt32 nParamCount, Reference< XInvocation >& 
rxInvocation, INVOKETYPE invokeType )
diff --git a/compilerplugins/clang/unusedenumconstants.py 
b/compilerplugins/clang/unusedenumconstants.py
index 7835287b82ca..5c360e230e72 100755
--- a/compilerplugins/clang/unusedenumconstants.py
+++ b/compilerplugins/clang/unusedenumconstants.py
@@ -118,6 +118,7 @@ def is_ignore(srcLoc):
  "basic/source/inc/opcodes.hxx", #  SbiOpcode
  "sc/source/filter/inc/flttypes.hxx", # BiffTyp
  "sc/inc/optutil.hxx", # ScOptionsUtil::KeyBindingType
+ "include/sfx2/chalign.hxx", # SfxChildAlignment
 # unit test code
  "cppu/source/uno/check.cxx",
 # general weird nonsense going on
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx 
b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 813ac916746f..7467d59623ae 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -220,8 +220,6 @@ void OApplicationController::deleteObjects( ElementType 
_eType, const std::vecto
 aDlg->EnableAllButton();
 
 eResult = aDlg->Execute();
-if (eResult == 

[Libreoffice-commits] core.git: 2 commits - accessibility/source basic/source comphelper/source compilerplugins/clang connectivity/source cpputools/source cui/source

2017-03-10 Thread Andrea Gelmini
 accessibility/source/extended/accessiblelistboxentry.cxx   |2 
 basic/source/sbx/sbxscan.cxx   |   81 
--
 comphelper/source/misc/backupfilehelper.cxx|   18 +-
 compilerplugins/clang/stringstatic.cxx |4 
 connectivity/source/drivers/evoab2/NResultSetMetaData.hxx  |2 
 connectivity/source/drivers/jdbc/Timestamp.cxx |2 
 connectivity/source/drivers/kab/KResultSetMetaData.hxx |2 
 connectivity/source/drivers/macab/MacabResultSetMetaData.hxx   |2 
 connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx |2 
 connectivity/source/drivers/postgresql/pq_statement.cxx|2 
 connectivity/source/inc/ado/ADatabaseMetaDataResultSetMetaData.hxx |2 
 cpputools/source/unoexe/unoexe.cxx |2 
 cui/source/tabpages/swpossizetabpage.cxx   |8 
 13 files changed, 62 insertions(+), 67 deletions(-)

New commits:
commit 0f0ebddb81a7c5b83bdf8d050bfe38dad26f0bfd
Author: Andrea Gelmini 
Date:   Fri Mar 10 18:55:12 2017 +0100

Fix typos

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

diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx 
b/accessibility/source/extended/accessiblelistboxentry.cxx
index 2eb8f39..8f0b1ec 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -439,7 +439,7 @@ namespace accessibility
 {
 return getListBox()->GetEntryLongDescription( pEntry );
 }
-//want to cout the real column nubmer in the list box.
+//want to cout the real column number in the list box.
 sal_uInt16 iRealItemCount = 0;
 sal_uInt16 iCount = 0;
 sal_uInt16 iTotleItemCount = pEntry->ItemCount();
diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index 5c65dde..7e5c2db 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -1869,7 +1869,7 @@ namespace comphelper
 // ensure dir and file vectors
 fillDirFileInfo();
 
-// proccess all files in question recursively
+// process all files in question recursively
 if (!maDirs.empty() || !maFiles.empty())
 {
 bDidPush = tryPush_Files(
@@ -1911,7 +1911,7 @@ namespace comphelper
 // ensure dir and file vectors
 fillDirFileInfo();
 
-// proccess all files in question recursively
+// process all files in question recursively
 if (!maDirs.empty() || !maFiles.empty())
 {
 bPopPossible = isPopPossible_files(
@@ -1936,7 +1936,7 @@ namespace comphelper
 // ensure dir and file vectors
 fillDirFileInfo();
 
-// proccess all files in question recursively
+// process all files in question recursively
 if (!maDirs.empty() || !maFiles.empty())
 {
 bDidPop = tryPop_files(
@@ -2258,7 +2258,7 @@ namespace comphelper
 bool bDidPush(false);
 osl::Directory::createPath(rTargetURL);
 
-// proccess files
+// process files
 for (const auto& file : rFiles)
 {
 bDidPush |= tryPush_file(
@@ -2268,7 +2268,7 @@ namespace comphelper
 file.second);
 }
 
-// proccess dirs
+// process dirs
 for (const auto& dir : rDirs)
 {
 OUString aNewSourceURL(rSourceURL + "/" + dir);
@@ -2339,7 +2339,7 @@ namespace comphelper
 {
 bool bPopPossible(false);
 
-// proccess files
+// process files
 for (const auto& file : rFiles)
 {
 bPopPossible |= isPopPossible_file(
@@ -2349,7 +2349,7 @@ namespace comphelper
 file.second);
 }
 
-// proccess dirs
+// process dirs
 for (const auto& dir : rDirs)
 {
 OUString aNewSourceURL(rSourceURL + "/" + dir);
@@ -2406,7 +2406,7 @@ namespace comphelper
 {
 bool bDidPop(false);
 
-// proccess files
+// process files
 for (const auto& file : rFiles)
 {
 bDidPop |= tryPop_file(
@@ -2416,7 +2416,7 @@ namespace comphelper
 file.second);
 }
 
-// proccess dirs
+// process dirs
 for (const auto& dir : rDirs)
 {
 OUString aNewSourceURL(rSourceURL + "/" + dir);
diff --git a/compilerplugins/clang/stringstatic.cxx 
b/compilerplugins/clang/stringstatic.cxx
index 

[Libreoffice-commits] core.git: 2 commits - accessibility/source basctl/source basic/source chart2/source codemaker/source comphelper/source connectivity/source cppu/source cui/source

2016-04-01 Thread Wastack
 accessibility/source/extended/AccessibleBrowseBoxTableCell.cxx   |4 ++--
 accessibility/source/extended/AccessibleGridControlTableCell.cxx |2 +-
 basctl/source/basicide/scriptdocument.cxx|2 +-
 basic/source/basmgr/vbahelper.cxx|2 +-
 chart2/source/model/template/PieChartTypeTemplate.cxx|2 +-
 chart2/source/view/main/AbstractShapeFactory.cxx |2 +-
 codemaker/source/cppumaker/cpputype.cxx  |2 +-
 comphelper/source/misc/accessibleeventnotifier.cxx   |6 +++---
 connectivity/source/commontools/FValue.cxx   |4 ++--
 connectivity/source/commontools/dbmetadata.cxx   |   10 
+-
 connectivity/source/commontools/dbtools.cxx  |2 +-
 connectivity/source/drivers/postgresql/pq_databasemetadata.cxx   |2 +-
 connectivity/source/parse/sqliterator.cxx|4 ++--
 cppu/source/uno/lbenv.cxx|6 +++---
 cui/source/customize/cfgutil.cxx |4 ++--
 cui/source/customize/selector.cxx|4 ++--
 cui/source/options/optgdlg.cxx   |4 ++--
 17 files changed, 31 insertions(+), 31 deletions(-)

New commits:
commit 62d1632498d92b6e73b952c9d379edebe3052341
Author: Wastack 
Date:   Thu Mar 31 08:38:10 2016 +0200

tdf#97966  Drop 'static' keywords

Including no keywords from extern "C" blocks

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

diff --git a/connectivity/source/commontools/FValue.cxx 
b/connectivity/source/commontools/FValue.cxx
index 944ebe0..b9d6fc9 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -38,7 +38,7 @@ namespace connectivity
 {
 
 namespace {
-static bool isStorageCompatible(sal_Int32 _eType1, sal_Int32 _eType2)
+bool isStorageCompatible(sal_Int32 _eType1, sal_Int32 _eType2)
 {
 bool bIsCompatible = true;
 
@@ -104,7 +104,7 @@ namespace {
 return bIsCompatible;
 }
 
-static bool isStorageComparable(sal_Int32 _eType1, sal_Int32 _eType2)
+bool isStorageComparable(sal_Int32 _eType1, sal_Int32 _eType2)
 {
 bool bIsComparable = true;
 
diff --git a/connectivity/source/commontools/dbmetadata.cxx 
b/connectivity/source/commontools/dbmetadata.cxx
index f1a66cf..eb7cee3 100644
--- a/connectivity/source/commontools/dbmetadata.cxx
+++ b/connectivity/source/commontools/dbmetadata.cxx
@@ -95,7 +95,7 @@ namespace dbtools
 namespace
 {
 
-static void lcl_construct( DatabaseMetaData_Impl& _metaDataImpl, const 
Reference< XConnection >& _connection )
+void lcl_construct( DatabaseMetaData_Impl& _metaDataImpl, const 
Reference< XConnection >& _connection )
 {
 _metaDataImpl.xConnection = _connection;
 if ( !_metaDataImpl.xConnection.is() )
@@ -107,7 +107,7 @@ namespace dbtools
 }
 
 
-static void lcl_checkConnected( const DatabaseMetaData_Impl& 
_metaDataImpl )
+void lcl_checkConnected( const DatabaseMetaData_Impl& _metaDataImpl )
 {
 if ( !_metaDataImpl.xConnection.is() || 
!_metaDataImpl.xConnectionMetaData.is() )
 {
@@ -118,7 +118,7 @@ namespace dbtools
 }
 
 
-static bool lcl_getDriverSetting( const sal_Char* _asciiName, const 
DatabaseMetaData_Impl& _metaData, Any& _out_setting )
+bool lcl_getDriverSetting( const sal_Char* _asciiName, const 
DatabaseMetaData_Impl& _metaData, Any& _out_setting )
 {
 lcl_checkConnected( _metaData );
 const ::comphelper::NamedValueCollection& rDriverMetaData = 
_metaData.aDriverConfig.getMetaData( _metaData.xConnectionMetaData->getURL() );
@@ -129,7 +129,7 @@ namespace dbtools
 }
 
 
-static bool lcl_getConnectionSetting( const sal_Char* _asciiName, 
const DatabaseMetaData_Impl& _metaData, Any& _out_setting )
+bool lcl_getConnectionSetting( const sal_Char* _asciiName, const 
DatabaseMetaData_Impl& _metaData, Any& _out_setting )
 {
 try
 {
@@ -160,7 +160,7 @@ namespace dbtools
 }
 
 
-static const OUString& lcl_getConnectionStringSetting(
+const OUString& lcl_getConnectionStringSetting(
 const DatabaseMetaData_Impl& _metaData, ::boost::optional< 
OUString >& _cachedSetting,
 OUString (SAL_CALL XDatabaseMetaData::*_getter)() )
 {
diff --git a/connectivity/source/commontools/dbtools.cxx 
b/connectivity/source/commontools/dbtools.cxx
index 0f1ee60..b9eb99f 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ 

[Libreoffice-commits] core.git: 2 commits - accessibility/source basctl/source cui/source dbaccess/source desktop/source include/svtools include/svx sc/source sd/source svtools/source svx/source sw/so

2016-03-19 Thread Noel Grandin
 accessibility/source/extended/accessiblelistbox.cxx  |2 -
 accessibility/source/extended/accessiblelistboxentry.cxx |   18 +-
 basctl/source/basicide/moduldl2.cxx  |6 +--
 cui/source/customize/cfg.cxx |   18 +-
 cui/source/dialogs/hangulhanjadlg.cxx|4 +-
 cui/source/dialogs/multipat.cxx  |8 ++--
 cui/source/dialogs/srchxtra.cxx  |2 -
 cui/source/options/certpath.cxx  |   12 +++---
 cui/source/options/fontsubs.cxx  |   22 +---
 cui/source/options/optfltr.cxx   |   27 +++
 cui/source/options/optjava.cxx   |   10 ++---
 cui/source/options/optlingu.cxx  |4 +-
 cui/source/options/radiobtnbox.cxx   |   10 ++---
 cui/source/tabpages/autocdlg.cxx |   23 ++--
 dbaccess/source/ui/control/marktree.cxx  |   18 +-
 dbaccess/source/ui/control/tabletree.cxx |6 +--
 dbaccess/source/ui/dlg/tablespage.cxx|6 +--
 dbaccess/source/ui/misc/WNameMatch.cxx   |6 +--
 desktop/source/deployment/gui/dp_gui_updatedialog.cxx|   14 +++
 include/svtools/svtabbx.hxx  |4 +-
 include/svtools/treelistbox.hxx  |   14 +++
 include/svx/checklbx.hxx |3 -
 sc/source/ui/cctrl/checklistmenu.cxx |   23 +---
 sc/source/ui/miscdlgs/solveroptions.cxx  |4 +-
 sd/source/ui/dlg/dlgassim.cxx|   10 ++---
 svtools/source/contnr/svlbitm.cxx|   20 +--
 svtools/source/contnr/svtabbx.cxx|4 +-
 svtools/source/contnr/treelistbox.cxx|   14 +++
 svx/source/dialog/checklbx.cxx   |   14 +++
 sw/source/ui/config/optcomp.cxx  |2 -
 30 files changed, 159 insertions(+), 169 deletions(-)

New commits:
commit c91b103930f4f441ab333d6f3026d6c19d4b4d0f
Author: Noel Grandin 
Date:   Fri Mar 18 12:46:20 2016 +0200

convert SvButtonState to scoped enum

Change-Id: I601f9e2fe33e85cf3f7dc52ee20d68202bd2b09d

diff --git a/accessibility/source/extended/accessiblelistbox.cxx 
b/accessibility/source/extended/accessiblelistbox.cxx
index 019c6b5..63c2b5d 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -87,7 +87,7 @@ namespace accessibility
 uno::Any aValue;
 aValue <<= AccessibleStateType::CHECKED;
 
-if ( getListBox()->GetCheckButtonState( 
pCurOpEntry->GetSvLBoxEntry() ) == SV_BUTTON_CHECKED )
+if ( getListBox()->GetCheckButtonState( 
pCurOpEntry->GetSvLBoxEntry() ) == SvButtonState::Checked )
 {
 pCurOpEntry->NotifyAccessibleEvent( 
AccessibleEventId::STATE_CHANGED, uno::Any(), aValue );
 }
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx 
b/accessibility/source/extended/accessiblelistboxentry.cxx
index 97d09a2..7efc72e 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -428,10 +428,10 @@ namespace accessibility
 SvButtonState eState = pBox->GetCheckButtonState( pEntry );
 switch( eState )
 {
-case SV_BUTTON_CHECKED:
-case SV_BUTTON_UNCHECKED:
+case SvButtonState::Checked:
+case SvButtonState::Unchecked:
 return AccessibleRole::CHECK_BOX;
-case SV_BUTTON_TRISTATE:
+case SvButtonState::Tristate:
 default:
 return AccessibleRole::LABEL;
 }
@@ -786,10 +786,10 @@ namespace accessibility
 {
 SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( 
m_aEntryPath );
 SvButtonState state = getListBox()->GetCheckButtonState( 
pEntry );
-if ( state == SV_BUTTON_CHECKED )
-getListBox()->SetCheckButtonState(pEntry, 
SV_BUTTON_UNCHECKED);
-else if (state == SV_BUTTON_UNCHECKED)
-getListBox()->SetCheckButtonState(pEntry, 
SV_BUTTON_CHECKED);
+if ( state == SvButtonState::Checked )
+getListBox()->SetCheckButtonState(pEntry, 
SvButtonState::Unchecked);
+else if (state == SvButtonState::Unchecked)
+getListBox()->SetCheckButtonState(pEntry, 
SvButtonState::Checked);
 }
 }
 else 

[Libreoffice-commits] core.git: 2 commits - accessibility/source avmedia/source basctl/source basic/qa basic/source bridges/test canvas/source canvas/workben chart2/source chart2/workbench editeng/sou

2015-10-30 Thread Noel Grandin
 UnoControls/source/base/basecontainercontrol.cxx  |2 -
 UnoControls/source/base/basecontrol.cxx   |6 
++--
 UnoControls/source/controls/OConnectionPointContainerHelper.cxx   |2 -
 UnoControls/source/controls/OConnectionPointHelper.cxx|2 -
 UnoControls/source/controls/framecontrol.cxx  |2 -
 UnoControls/source/controls/progressmonitor.cxx   |   10 
+++---
 UnoControls/source/controls/statusindicator.cxx   |2 -
 accessibility/source/extended/accessiblelistboxentry.cxx  |5 
+--
 accessibility/source/extended/textwindowaccessibility.cxx |9 
++
 accessibility/source/standard/floatingwindowaccessible.cxx|3 --
 accessibility/source/standard/vclxaccessiblelist.cxx  |3 --
 avmedia/source/framework/soundhandler.cxx |8 
++---
 avmedia/source/gstreamer/gstmanager.cxx   |2 -
 avmedia/source/gstreamer/gstuno.cxx   |2 -
 avmedia/source/macavf/macavfuno.mm|2 -
 avmedia/source/macavf/manager.mm  |2 -
 avmedia/source/opengl/ogluno.cxx  |2 -
 avmedia/source/quicktime/manager.mm   |2 -
 avmedia/source/quicktime/quicktimeuno.mm  |2 -
 avmedia/source/viewer/mediawindow_impl.cxx|2 -
 avmedia/source/vlc/vlcmanager.cxx |2 -
 avmedia/source/vlc/vlcplayer.cxx  |2 -
 avmedia/source/vlc/vlcuno.cxx |2 -
 avmedia/source/win/manager.cxx|2 -
 avmedia/source/win/player.cxx |2 -
 avmedia/source/win/winuno.cxx |2 -
 basctl/source/accessibility/accessibledialogcontrolshape.cxx  |2 -
 basctl/source/basicide/moduldl2.cxx   |   10 
++
 basctl/source/basicide/moduldlg.cxx   |2 -
 basctl/source/dlged/dlgedobj.cxx  |4 +-
 basctl/source/dlged/propbrw.cxx   |4 --
 basic/qa/cppunit/test_vba.cxx |6 
+---
 basic/source/classes/propacc.cxx  |2 -
 basic/source/classes/sbunoobj.cxx |   15 
--
 basic/source/uno/namecont.cxx |2 -
 bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx |5 
+--
 bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx |3 --
 bridges/test/testclient.cxx   |2 -
 bridges/test/testcomp.cxx |2 -
 bridges/test/testsameprocess.cxx  |2 -
 canvas/source/cairo/cairo_canvashelper.cxx|8 
++---
 canvas/source/tools/canvastools.cxx   |4 +-
 canvas/workben/canvasdemo.cxx |3 --
 chart2/source/controller/accessibility/AccessibleChartElement.cxx |3 --
 chart2/source/controller/accessibility/AccessibleChartView.cxx|2 -
 chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx   |4 +-
 chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx |4 +-
 chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx |2 -
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx   |   10 
+++---
 chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx|4 +-
 chart2/source/controller/main/ChartController.cxx |4 +-
 chart2/source/controller/main/ChartController_Tools.cxx   |2 -
 chart2/source/controller/main/ChartFrameloader.cxx|2 -
 chart2/source/controller/main/PositionAndSizeHelper.cxx   |2 -
 chart2/source/tools/DiagramHelper.cxx |2 -
 chart2/source/tools/ExplicitCategoriesProvider.cxx|6 
+---
 chart2/source/tools/InternalDataProvider.cxx  |6 
+---
 chart2/source/tools/LifeTime.cxx  |2 -
 chart2/source/tools/ObjectIdentifier.cxx  |4 +-
 chart2/source/view/charttypes/GL3DBarChart.cxx|2 -
 chart2/source/view/charttypes/PieChart.cxx|2 -
 

[Libreoffice-commits] core.git: 2 commits - accessibility/source basctl/source basic/source connectivity/source editeng/source sc/source sd/source svl/source sw/inc sw/source

2015-06-15 Thread Noel Grandin
 accessibility/source/standard/vclxaccessiblebox.cxx|2 
 basctl/source/basicide/basidesh.cxx|2 
 basic/source/runtime/runtime.cxx   |2 
 connectivity/source/drivers/file/FDatabaseMetaData.cxx |2 
 editeng/source/items/numitem.cxx   |2 
 editeng/source/misc/svxacorr.cxx   |6 +
 sc/source/ui/view/viewfun2.cxx |4 -
 sd/source/ui/annotations/annotationwindow.cxx  |2 
 svl/source/items/stylepool.cxx |3 
 sw/inc/fesh.hxx|   12 ++-
 sw/source/core/frmedt/fecopy.cxx   |   18 ++--
 sw/source/uibase/dochdl/swdtflvr.cxx   |   68 -
 sw/source/uibase/inc/swdtflvr.hxx  |9 +-
 13 files changed, 69 insertions(+), 63 deletions(-)

New commits:
commit 2a6bf436ceb909b37199f7b94f21cdef60356c24
Author: Noel Grandin noelgran...@gmail.com
Date:   Sat Jun 6 19:12:22 2015 +0200

convert SW_PASTESDR to scoped enum

Change-Id: I7c33bb425ea1f32cc810205e025290a957ea68aa

diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 14112a6..c3e5683 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -160,9 +160,13 @@ struct SwGetCurColNumPara
 SwGetCurColNumPara() : pFrameFormat( 0 ), pPrtRect( 0 ), pFrmRect( 0 ) {}
 };
 
-#define SW_PASTESDR_INSERT  1
-#define SW_PASTESDR_REPLACE 2
-#define SW_PASTESDR_SETATTR 3
+enum class SwPasteSdr
+{
+NONE= 0,
+Insert  = 1,
+Replace = 2,
+SetAttr = 3
+};
 
 #define SW_ADD_SELECT   1
 #define SW_ENTER_GROUP  2
@@ -547,7 +551,7 @@ public:
  Return value indicates if it was converted. */
 bool GetDrawObjGraphic( SotClipboardFormatId nFormat, Graphic rGrf ) 
const;
 
-void Paste( SvStream rStm, sal_uInt16 nAction, const Point* pPt = 0 );
+void Paste( SvStream rStm, SwPasteSdr nAction, const Point* pPt = 0 );
 bool Paste( const Graphic rGrf, const OUString rURL );
 bool Paste( SotDataObject rObj, const Point rPt );
 
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index ef1a64a..612f631 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1327,7 +1327,7 @@ static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( 
SdrModel* _pModel )
 }
 }
 
-void SwFEShell::Paste( SvStream rStrm, sal_uInt16 nAction, const Point* pPt )
+void SwFEShell::Paste( SvStream rStrm, SwPasteSdr nAction, const Point* pPt )
 {
 SET_CURR_SHELL( this );
 StartAllAction();
@@ -1361,12 +1361,12 @@ void SwFEShell::Paste( SvStream rStrm, sal_uInt16 
nAction, const Point* pPt )
 SdrObject* pClpObj = pModel-GetPage(0)-GetObj(0);
 SdrObject* pOldObj = pView-GetMarkedObjectList().GetMark( 0 
)-GetMarkedSdrObj();
 
-if( SW_PASTESDR_SETATTR == nAction  pOldObj-ISA(SwVirtFlyDrawObj) )
-nAction = SW_PASTESDR_REPLACE;
+if( SwPasteSdr::SetAttr == nAction  pOldObj-ISA(SwVirtFlyDrawObj) )
+nAction = SwPasteSdr::Replace;
 
 switch( nAction )
 {
-case SW_PASTESDR_REPLACE:
+case SwPasteSdr::Replace:
 {
 const SwFrameFormat* pFormat(0);
 const SwFrm* pAnchor(0);
@@ -1382,7 +1382,7 @@ void SwFEShell::Paste( SvStream rStrm, sal_uInt16 
nAction, const Point* pPt )
 {
 // if there is a textframe in the header/footer:
 // do not replace but insert
-nAction = SW_PASTESDR_INSERT;
+nAction = SwPasteSdr::Insert;
 break;
 }
 }
@@ -1451,7 +1451,7 @@ void SwFEShell::Paste( SvStream rStrm, sal_uInt16 
nAction, const Point* pPt )
 }
 break;
 
-case SW_PASTESDR_SETATTR:
+case SwPasteSdr::SetAttr:
 {
 SfxItemSet aSet( GetAttrPool() );
 const SdrGrafObj* pSdrGrafObj = dynamic_cast const 
SdrGrafObj* (pClpObj);
@@ -1496,14 +1496,14 @@ void SwFEShell::Paste( SvStream rStrm, sal_uInt16 
nAction, const Point* pPt )
 break;
 
 default:
-nAction = SW_PASTESDR_INSERT;
+nAction = SwPasteSdr::Insert;
 break;
 }
 }
 else
-nAction = SW_PASTESDR_INSERT;
+nAction = SwPasteSdr::Insert;
 
-if( SW_PASTESDR_INSERT == nAction )
+if( SwPasteSdr::Insert == nAction )
 {
 ::sw::DrawUndoGuard drawUndoGuard(GetDoc()-GetIDocumentUndoRedo());
 
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index 456be91..08d28b3 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1320,7 +1320,7 @@ bool SwTransferable::PasteData( TransferableDataHelper 
rData,
 {
 case 

[Libreoffice-commits] core.git: 2 commits - accessibility/source animations/source chart2/source

2015-05-02 Thread Caolán McNamara
 accessibility/source/extended/AccessibleToolPanelDeck.cxx   |2 -
 accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx |4 +-
 accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx |2 -
 accessibility/source/extended/textwindowaccessibility.cxx   |5 ++-
 animations/source/animcore/animcore.cxx |4 +-
 chart2/source/view/charttypes/GL3DBarChart.cxx  |   16 
+-
 6 files changed, 18 insertions(+), 15 deletions(-)

New commits:
commit 21773f6d9a06012634716f3af5ccc74b6204a569
Author: Caolán McNamara caol...@redhat.com
Date:   Sat May 2 14:16:44 2015 +0100

cppcheck: noExplicitConstructor

Change-Id: I0b1cac50f9e158004f8c1b8294b7a1b9f21f9628

diff --git a/accessibility/source/extended/AccessibleToolPanelDeck.cxx 
b/accessibility/source/extended/AccessibleToolPanelDeck.cxx
index 85ce154..e1fb62f 100644
--- a/accessibility/source/extended/AccessibleToolPanelDeck.cxx
+++ b/accessibility/source/extended/AccessibleToolPanelDeck.cxx
@@ -106,7 +106,7 @@ namespace accessibility
 class MethodGuard
 {
 public:
-MethodGuard( AccessibleToolPanelDeck_Impl i_rImpl )
+explicit MethodGuard( AccessibleToolPanelDeck_Impl i_rImpl )
 :m_aGuard()
 {
 i_rImpl.checkDisposed();
diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx 
b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
index 50b9cea..11dc730 100644
--- a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
+++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
@@ -68,7 +68,7 @@ namespace accessibility
 class AccessibleWrapper : public AccessibleWrapper_Base
 {
 public:
-AccessibleWrapper( const Reference XAccessibleContext  i_rContext )
+explicit AccessibleWrapper( const Reference XAccessibleContext  
i_rContext )
 :m_xContext( i_rContext )
 {
 }
@@ -258,7 +258,7 @@ namespace accessibility
 class MethodGuard
 {
 public:
-MethodGuard( AccessibleToolPanelTabBar_Impl i_rImpl )
+explicit MethodGuard( AccessibleToolPanelTabBar_Impl i_rImpl )
 :m_aGuard()
 {
 i_rImpl.checkDisposed();
diff --git 
a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx 
b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx
index b8058d6..644b3fa 100644
--- a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx
+++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx
@@ -221,7 +221,7 @@ namespace accessibility
 class ItemMethodGuard
 {
 public:
-ItemMethodGuard( AccessibleToolPanelDeckTabBarItem_Impl i_rImpl )
+explicit ItemMethodGuard( AccessibleToolPanelDeckTabBarItem_Impl 
i_rImpl )
 :m_aGuard()
 {
 i_rImpl.checkDisposed();
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx 
b/accessibility/source/extended/textwindowaccessibility.cxx
index fbe72a0..1a391ce 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -982,7 +982,10 @@ Document::retrieveCharacterBounds(Paragraph const * 
pParagraph,
 struct IndexCompare
 {
 const css::beans::PropertyValue* pValues;
-IndexCompare( const css::beans::PropertyValue* pVals ) : pValues(pVals) {}
+explicit IndexCompare(const css::beans::PropertyValue* pVals)
+: pValues(pVals)
+{
+}
 bool operator() ( const sal_Int32 a, const sal_Int32 b ) const
 {
 return pValues[a].Name  pValues[b].Name;
diff --git a/animations/source/animcore/animcore.cxx 
b/animations/source/animcore/animcore.cxx
index 3fbad43..6a1d338 100644
--- a/animations/source/animcore/animcore.cxx
+++ b/animations/source/animcore/animcore.cxx
@@ -129,8 +129,8 @@ public:
 class AnimationNode : public AnimationNodeBase
 {
 public:
-AnimationNode( sal_Int16 nNodeType );
-AnimationNode( const AnimationNode rNode );
+explicit AnimationNode(sal_Int16 nNodeType);
+explicit AnimationNode(const AnimationNode rNode);
 virtual ~AnimationNode();
 
 // XInterface
commit 5c4955ed4593f529fd902cdf3afab3c8150b3214
Author: Caolán McNamara caol...@redhat.com
Date:   Sat May 2 14:07:15 2015 +0100

cppcheck: unusedScopedObject

Change-Id: If627c5300b3b4acc8351177857fc8fa70e76df00

diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx 
b/chart2/source/view/charttypes/GL3DBarChart.cxx
index ad79ed5..6377202 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -589,7 +589,7 @@ GL3DBarChart::~GL3DBarChart()
 {
 if (mbBenchMarkMode)
 {
-SharedResourceAccess(maCond1, maCond2);
+SharedResourceAccess 

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

2015-02-24 Thread Stephan Bergmann
 accessibility/source/standard/vclxaccessibletoolbox.cxx |   12 ++--
 toolkit/source/awt/vclxwindows.cxx  |7 +--
 2 files changed, 11 insertions(+), 8 deletions(-)

New commits:
commit 11292487db58c3a5e1204ba03d192f01e5e53cc4
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Feb 24 12:52:15 2015 +0100

Avoid unnecessary bad downcasts to ToolBox

Change-Id: I239aee06ce543b6f7c213d845313ca51b3a5502d

diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx 
b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index a8a7cdf..41bf9a0 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -528,12 +528,12 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const 
VclWindowEvent rVclWindow
 // to prevent an early release of the toolbox (VCLEVENT_OBJECT_DYING)
 Reference XAccessibleContext  xTemp = this;
 
-ToolBox* pToolBox = static_cast ToolBox* ( GetWindow() );
 switch ( rVclWindowEvent.GetId() )
 {
 case VCLEVENT_TOOLBOX_CLICK:
 case VCLEVENT_TOOLBOX_SELECT:
 {
+ToolBox* pToolBox = static_cast ToolBox* ( GetWindow() );
 if ( rVclWindowEvent.GetData() )
 {
 UpdateChecked_Impl( 
(sal_Int32)reinterpret_castsal_IntPtr(rVclWindowEvent.GetData()) );
@@ -617,14 +617,14 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const 
VclWindowEvent rVclWindow
 case VCLEVENT_OBJECT_DYING :
 {
 // if this toolbox is a subtoolbox, we have to relese it from its 
parent
-ToolBox* pBox = static_cast ToolBox* ( GetWindow() );
-if ( pBox  pBox-GetParent() 
- pBox-GetParent()-GetType() == WINDOW_TOOLBOX )
+vcl::Window * pWin = GetWindow();
+if ( pWin  pWin-GetParent() 
+ pWin-GetParent()-GetType() == WINDOW_TOOLBOX )
 {
 VCLXAccessibleToolBox* pParent = static_cast 
VCLXAccessibleToolBox* (
-
pBox-GetParent()-GetAccessible()-getAccessibleContext().get() );
+
pWin-GetParent()-GetAccessible()-getAccessibleContext().get() );
 if ( pParent )
-pParent-ReleaseSubToolBox( pBox );
+pParent-ReleaseSubToolBox(static_castToolBox *(pWin));
 }
 
 // dispose all items
commit f02ee5b727e75d850fd054d18dd0e0320002109a
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Feb 24 10:24:48 2015 +0100

Avoid unnecessary bad downcasts to Button

Change-Id: I36baaa1cd46385430474f8a841eafaaba07a18fc

diff --git a/toolkit/source/awt/vclxwindows.cxx 
b/toolkit/source/awt/vclxwindows.cxx
index 6187119..1b51690 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -236,8 +236,7 @@ void VCLXGraphicControl::setProperty( const OUString 
PropertyName, const ::com:
 {
 SolarMutexGuard aGuard;
 
-Button* pButton = static_cast Button* ( GetWindow() );
-if ( !pButton )
+if ( !GetWindow() )
 return;
 sal_uInt16 nPropType = GetPropertyId( PropertyName );
 switch ( nPropType )
@@ -261,7 +260,10 @@ void VCLXGraphicControl::setProperty( const OUString 
PropertyName, const ::com:
 {
 sal_Int16 nAlignment = sal_Int16();
 if ( Value = nAlignment )
+{
+Button* pButton = static_cast Button* ( GetWindow() );
 pButton-SetImageAlign( static_cast ImageAlign ( 
nAlignment ) );
+}
 }
 }
 break;
@@ -275,6 +277,7 @@ void VCLXGraphicControl::setProperty( const OUString 
PropertyName, const ::com:
 {
 sal_Int16 nImagePosition = 2;
 OSL_VERIFY( Value = nImagePosition );
+Button* pButton = static_cast Button* ( GetWindow() );
 pButton-SetImageAlign( ::toolkit::translateImagePosition( 
nImagePosition ) );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-02-22 Thread Julien Nabet
 accessibility/source/standard/vclxaccessiblemenuitem.cxx |2 +-
 sw/inc/lineinfo.hxx  |2 +-
 sw/source/core/layout/flylay.cxx |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 5268d722a2dcc5a20e81444996da6306662de922
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Feb 22 23:19:52 2015 +0100

Typo: resonable-reasonable

Change-Id: Ia6737e7cf88b54be80db39937595105ff0e0d2b3

diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index eeddb29..35532ab 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -390,7 +390,7 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize rSz )
 // Added the aFrmRect.HasArea() hack, because
 // the environment of the ole object does not have to be valid
 // at this moment, or even worse, it does not have to have a
-// resonable size. In this case we do not want to change to
+// reasonable size. In this case we do not want to change to
 // attributes permanentely. Maybe one day somebody dares to 
remove
 // this code.
 if ( aFrmRect.HasArea() 
commit e8064be685b17ae972aee2b0e07aa4e16763fb52
Author: Julien Nabet serval2...@yahoo.fr
Date:   Sun Feb 22 23:19:30 2015 +0100

Typo: aditional-additional

Change-Id: I7db230949a97da28c60101d8cce1e30fbc08535c

diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx 
b/accessibility/source/standard/vclxaccessiblemenuitem.cxx
index cf4d2f3..07ba2cc 100644
--- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx
+++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx
@@ -183,7 +183,7 @@ Sequence OUString  
VCLXAccessibleMenuItem::getSupportedServiceNames() throw (R
 sal_Int16 VCLXAccessibleMenuItem::getAccessibleRole(  ) throw 
(RuntimeException, std::exception)
 {
 OExternalLockGuard aGuard( this );
-// IA2 CWS. MT: We had the aditional roles in UAA for ever, but never used 
them anywhere.
+// IA2 CWS. MT: We had the additional roles in UAA for ever, but never 
used them anywhere.
 // Looks reasonable, but need to verify in Orca and VoiceOver.
 sal_Int16 nRole = AccessibleRole::MENU_ITEM;
 if ( m_pParent )
diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx
index a52a029..f5a6f3c 100644
--- a/sw/inc/lineinfo.hxx
+++ b/sw/inc/lineinfo.hxx
@@ -38,7 +38,7 @@ class SW_DLLPUBLIC SwLineNumberInfo : public SwClient /** 
purpose of derivation
  character style for 
displaying the numbers. */
 {
 SvxNumberType   aType;  /// e.g. roman linenumbers
-OUStringaDivider;   /// String for aditional 
interval (vert. lines user defined)
+OUStringaDivider;   /// String for additional 
interval (vert. lines user defined)
 sal_uInt16  nPosFromLeft;   /// Position for paint
 sal_uInt16  nCountBy;   /// Paint only for every n 
line
 sal_uInt16  nDividerCountBy;/** Interval for display of 
an user defined
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-06-20 Thread Michael Stahl
 accessibility/source/standard/vclxaccessibletabpagewindow.cxx |   10 +-
 svx/source/fmcomp/fmgridcl.cxx|9 -
 2 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 35b45e6915eecfea0e21525249eabe3afd39d09e
Author: Michael Stahl mst...@redhat.com
Date:   Thu Jun 20 16:29:14 2013 +0200

VCLXAccessibleTabPageWindow: unhandled IndexOutOfBoundsException

... due to GetPagePos returning -1, work around that (can be easily
triggered in template manager).

Change-Id: Ic1334b224730d79e533539a24f115dc9aa2e9570

diff --git a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx 
b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
index 3865832..f63e266 100644
--- a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
+++ b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
@@ -114,7 +114,15 @@ Reference XAccessible  
VCLXAccessibleTabPageWindow::getAccessibleParent(  ) th
 {
 Reference XAccessibleContext  xCont( 
xAcc-getAccessibleContext() );
 if ( xCont.is() )
-xParent = xCont-getAccessibleChild( 
m_pTabControl-GetPagePos( m_nPageId ) );
+{
+sal_uInt16 const 
nPagePos(m_pTabControl-GetPagePos(m_nPageId));
+SAL_WARN_IF(TAB_PAGE_NOTFOUND == nPagePos, accessibility,
+getAccessibleParent(): no tab page);
+if (TAB_PAGE_NOTFOUND != nPagePos)
+{
+xParent = xCont-getAccessibleChild(nPagePos);
+}
+}
 }
 }
 
commit 32e2c6456fb3bf3bf75f9b11c90193c537b4ef26
Author: Michael Stahl mst...@redhat.com
Date:   Thu Jun 20 15:02:37 2013 +0200

FmGridControl:  handle non-existing properties

Fix crash with unhandled exception requesting Description.

Change-Id: I6b6cb61273fb042532ab63620729f4129239fe81

diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index ed3b2aa..4ea2577 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1908,7 +1908,14 @@ namespace
 ReferenceXPropertySet xProp;
 xIndex-getByIndex( _nPosition ) = xProp;
 if ( xProp.is() )
-xProp-getPropertyValue( _sPropName ) = sRetText;
+{
+try {
+xProp-getPropertyValue( _sPropName ) = sRetText;
+} catch (UnknownPropertyException const e) {
+SAL_WARN(svx.form,
+exception caught:   e.Message);
+}
+}
 }
 }
 return sRetText;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits