[Libreoffice-commits] core.git: bin/gbuild-to-ide

2014-07-03 Thread Niklas Johansson
 bin/gbuild-to-ide |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit aa7f272d747dfeb1c7e003b7db123fda688fd881
Author: Niklas Johansson 
Date:   Thu Jul 3 17:55:34 2014 +0200

Don't stop on os.makedirs when making vs2012-ide-integration

At the moment it always stops on folders that already exists. See
https://bugs.freedesktop.org/show_bug.cgi?id=70414#c18 and the following
comments for example of the error messages that I face without this patch.

Change-Id: I1a1f337872ce3a817d425ff10255e3ae9a73c1a2
Reviewed-on: https://gerrit.libreoffice.org/10062
Tested-by: Fridrich Strba 
Reviewed-by: Fridrich Strba 

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index 91a3fcf..55bfa37 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -672,7 +672,9 @@ class 
VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
 
 def write_project(self, project_path, target):
 # See info at 
http://blogs.msdn.com/b/visualstudio/archive/2010/05/14/a-guide-to-vcxproj-and-props-file-structure.aspx
-os.makedirs(os.path.dirname(project_path), exist_ok = True)
+folder = os.path.dirname(project_path)
+if not os.path.exists(folder):
+os.makedirs(folder)
 project_guid = str(uuid.uuid4()).upper()
 ns = 'http://schemas.microsoft.com/developer/msbuild/2003'
 ET.register_namespace('', ns)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-04 Thread Niklas Johansson
 accessibility/source/standard/vclxaccessiblelist.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit c6ff6106882494be61425c4cad38f935fca97d47
Author: Niklas Johansson 
Date:   Fri Jul 4 19:25:09 2014 +0200

Notify screen readers when selection changes in listboxes

When you change selections in listboxes without dropdown fuctionality
an accessilble event needs to be sent, this does not happen today.
An example of such listbox is the Suggestions in the Spelling and
Grammar dialog.

Change-Id: I6100c88ae5398d8bf3f511aee7b35e88fbf151f5
Reviewed-on: https://gerrit.libreoffice.org/10087
Tested-by: Norbert Thiebaud 
Reviewed-by: Norbert Thiebaud 

diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx 
b/accessibility/source/standard/vclxaccessiblelist.cxx
index beb252c..d54d515 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -300,8 +300,13 @@ void VCLXAccessibleList::UpdateSelection_Impl_Acc(bool 
b_IsDropDownList)
 }
 else if (m_aBoxType == LISTBOX && !b_IsDropDownList)
 {
-if ( aNewValue.hasValue())
+if ( aNewValue.hasValue() || aOldValue.hasValue() )
 {
+NotifyAccessibleEvent(
+AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
+aOldValue,
+aNewValue );
+
 NotifyListItem(aNewValue);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-06-20 Thread Niklas Johansson
 accessibility/source/standard/vclxaccessiblebox.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 3258c4f7b79ceedace3b4bdc88a818b45c7593ca
Author: Niklas Johansson 
Date:   Thu Jun 19 22:44:29 2014 +0200

Dropdown combo-/listboxes should support accessible action togglePopup

At least VoiceOver needs it to be able to open the dropdown in a native
way (through AXShowMenu). The list still isn't accessible on mac but
that is an other issue.

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

diff --git a/accessibility/source/standard/vclxaccessiblebox.cxx 
b/accessibility/source/standard/vclxaccessiblebox.cxx
index a1281db..d754875 100644
--- a/accessibility/source/standard/vclxaccessiblebox.cxx
+++ b/accessibility/source/standard/vclxaccessiblebox.cxx
@@ -461,11 +461,11 @@ OUString SAL_CALL 
VCLXAccessibleBox::getAccessibleActionDescription (sal_Int32 n
 ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 if (nIndex<0 || nIndex>=getAccessibleActionCount())
 throw ::com::sun::star::lang::IndexOutOfBoundsException();
-//Solution:When combo_box,it should not has action information.
-//return TK_RES_STRING( RID_STR_ACC_ACTION_TOGGLEPOPUP);
-if (m_aBoxType == LISTBOX)
-return ::rtl::OUString();
-return m_bIsDropDownBox?::rtl::OUString():TK_RES_STRING( 
RID_STR_ACC_ACTION_TOGGLEPOPUP);
+
+if (m_bIsDropDownBox)
+TK_RES_STRING( RID_STR_ACC_ACTION_TOGGLEPOPUP);
+else
+::rtl::OUString();
 }
 
 Reference< XAccessibleKeyBinding > 
VCLXAccessibleBox::getAccessibleActionKeyBinding( sal_Int32 nIndex )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dictionaries

2014-07-01 Thread Niklas Johansson
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8f7f2dc7a8aa6639f41c51216a4b54c4bb885fd4
Author: Niklas Johansson 
Date:   Tue Jul 1 14:59:52 2014 +0200

Updated core
Project: dictionaries  49086ee94c0cdef8a83f288919c3b6ae2d41f28d

Update the Swedish spelling dictionary

This update mainly consists of improvments to the handling of
compound words, as well as addition of proper nouns.

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

diff --git a/dictionaries b/dictionaries
index b310c79..49086ee 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit b310c7910565cb1a4beea309ce404bb533ac6f44
+Subproject commit 49086ee94c0cdef8a83f288919c3b6ae2d41f28d
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-08-31 Thread Niklas Johansson
 svtools/source/contnr/svimpbox.cxx |   22 ++
 1 file changed, 18 insertions(+), 4 deletions(-)

New commits:
commit a6f78bf8fd5dc768cc8c37ca717d7bad8fe2dc81
Author: Niklas Johansson 
Date:   Sun Aug 17 20:53:47 2014 +0200

Treeview may lose focus when left/right arrow is used

In a treeview, for example the hierarchal view of the
styles and formatting panel, if your not on a node that is
expandable or collapsable when you press the left or right
arrow key, the focus will move away from the tree view in
a very awkward way. This patch makes the control work more
like a native treeview.

At this point I don't feel confident about the surrounding
code to avoid the code duplication that this patch adds.

Change-Id: Ibd04cf5329b4d226aac102d214a45e45811982e7
Reviewed-on: https://gerrit.libreoffice.org/10956
Reviewed-by: Thomas Arnhold 
Tested-by: Thomas Arnhold 

diff --git a/svtools/source/contnr/svimpbox.cxx 
b/svtools/source/contnr/svimpbox.cxx
index 99ca76f..e0718ac 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2237,8 +2237,13 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
 
 case KEY_RIGHT:
 {
-if( bSubLstOpLR && IsNowExpandable() )
-pView->Expand( pCursor );
+if( bSubLstOpLR )
+{
+// only try to expand if sublist is expandable,
+// otherwise ignore the key press
+if( IsNowExpandable() )
+pView->Expand( pCursor );
+}
 else if ( bIsCellFocusEnabled && pCursor )
 {
 if ( nCurTabPos < ( pView->TabCount() - 1 /*!2*/ ) )
@@ -2304,8 +2309,17 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
 }
 }
 }
-else if( bSubLstOpLR && IsExpandable() )
-pView->Collapse( pCursor );
+else if( bSubLstOpLR )
+{
+if( IsExpandable() && pView->IsExpanded( pCursor ) )
+pView->Collapse( pCursor );
+else
+{
+pNewCursor = pView->GetParent( pCursor );
+if( pNewCursor )
+SetCursor( pNewCursor );
+}
+}
 else
 bKeyUsed = false;
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - svtools/source

2014-09-03 Thread Niklas Johansson
 svtools/source/contnr/svimpbox.cxx |   22 ++
 1 file changed, 18 insertions(+), 4 deletions(-)

New commits:
commit bee7674a602123229b62cad23536f103496a5298
Author: Niklas Johansson 
Date:   Sun Aug 17 20:53:47 2014 +0200

Treeview may lose focus when left/right arrow is used

In a treeview, for example the hierarchal view of the
styles and formatting panel, if your not on a node that is
expandable or collapsable when you press the left or right
arrow key, the focus will move away from the tree view in
a very awkward way. This patch makes the control work more
like a native treeview.

At this point I don't feel confident about the surrounding
code to avoid the code duplication that this patch adds.

Reviewed-on: https://gerrit.libreoffice.org/10956
Reviewed-by: Thomas Arnhold 
Tested-by: Thomas Arnhold 
(cherry picked from commit a6f78bf8fd5dc768cc8c37ca717d7bad8fe2dc81)

Change-Id: Ibd04cf5329b4d226aac102d214a45e45811982e7
Reviewed-on: https://gerrit.libreoffice.org/11255
Reviewed-by: Thomas Arnhold 
Tested-by: Thomas Arnhold 

diff --git a/svtools/source/contnr/svimpbox.cxx 
b/svtools/source/contnr/svimpbox.cxx
index 32c694a..79ae60b 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2237,8 +2237,13 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
 
 case KEY_RIGHT:
 {
-if( bSubLstOpLR && IsNowExpandable() )
-pView->Expand( pCursor );
+if( bSubLstOpLR )
+{
+// only try to expand if sublist is expandable,
+// otherwise ignore the key press
+if( IsNowExpandable() )
+pView->Expand( pCursor );
+}
 else if ( bIsCellFocusEnabled && pCursor )
 {
 if ( nCurTabPos < ( pView->TabCount() - 1 /*!2*/ ) )
@@ -2304,8 +2309,17 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
 }
 }
 }
-else if( bSubLstOpLR && IsExpandable() )
-pView->Collapse( pCursor );
+else if( bSubLstOpLR )
+{
+if( IsExpandable() && pView->IsExpanded( pCursor ) )
+pView->Collapse( pCursor );
+else
+{
+pNewCursor = pView->GetParent( pCursor );
+if( pNewCursor )
+SetCursor( pNewCursor );
+}
+}
 else
 bKeyUsed = false;
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - svtools/source

2014-09-09 Thread Niklas Johansson
 svtools/source/contnr/svimpbox.cxx |   22 ++
 1 file changed, 18 insertions(+), 4 deletions(-)

New commits:
commit f36ca2f32d8f27681b2a1ef9fd7f59db21f67ec6
Author: Niklas Johansson 
Date:   Sun Aug 17 20:53:47 2014 +0200

Treeview may lose focus when left/right arrow is used

In a treeview, for example the hierarchal view of the
styles and formatting panel, if your not on a node that is
expandable or collapsable when you press the left or right
arrow key, the focus will move away from the tree view in
a very awkward way. This patch makes the control work more
like a native treeview.

At this point I don't feel confident about the surrounding
code to avoid the code duplication that this patch adds.

Reviewed-on: https://gerrit.libreoffice.org/10956
Reviewed-by: Thomas Arnhold 
Tested-by: Thomas Arnhold 
(cherry picked from commit a6f78bf8fd5dc768cc8c37ca717d7bad8fe2dc81)

Change-Id: Ibd04cf5329b4d226aac102d214a45e45811982e7
Reviewed-on: https://gerrit.libreoffice.org/11255
Reviewed-by: Thomas Arnhold 
Tested-by: Thomas Arnhold 
(cherry picked from commit bee7674a602123229b62cad23536f103496a5298)
Reviewed-on: https://gerrit.libreoffice.org/11310
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/svtools/source/contnr/svimpbox.cxx 
b/svtools/source/contnr/svimpbox.cxx
index 0099dd2..07ac082 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2223,8 +2223,13 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
 
 case KEY_RIGHT:
 {
-if( bSubLstOpLR && IsNowExpandable() )
-pView->Expand( pCursor );
+if( bSubLstOpLR )
+{
+// only try to expand if sublist is expandable,
+// otherwise ignore the key press
+if( IsNowExpandable() )
+pView->Expand( pCursor );
+}
 else if ( bIsCellFocusEnabled && pCursor )
 {
 if ( nCurTabPos < ( pView->TabCount() - 1 /*!2*/ ) )
@@ -2290,8 +2295,17 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
 }
 }
 }
-else if( bSubLstOpLR && IsExpandable() )
-pView->Collapse( pCursor );
+else if( bSubLstOpLR )
+{
+if( IsExpandable() && pView->IsExpanded( pCursor ) )
+pView->Collapse( pCursor );
+else
+{
+pNewCursor = pView->GetParent( pCursor );
+if( pNewCursor )
+SetCursor( pNewCursor );
+}
+}
 else
 bKeyUsed = false;
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - 23 commits - avmedia/source basebmp/source chart2/qa embeddedobj/source include/oox oox/source RepositoryModule_host.mk sc/source sde

2014-09-16 Thread Niklas Johansson
 RepositoryModule_host.mk  |2 
 avmedia/source/viewer/mediawindow.cxx |9 +-
 basebmp/source/bitmapdevice.cxx   |   13 ++-
 chart2/qa/extras/chart2import.cxx |   53 ++
 chart2/qa/extras/charttest.hxx|   12 +++
 chart2/qa/extras/data/xlsx/number-formats.xlsx|binary
 embeddedobj/source/inc/oleembobj.hxx  |1 
 embeddedobj/source/msole/oleembed.cxx |   14 +--
 include/oox/drawingml/chart/objectformatter.hxx   |3 
 include/oox/drawingml/shape.hxx   |1 
 oox/source/drawingml/chart/axisconverter.cxx  |2 
 oox/source/drawingml/chart/chartconverter.cxx |7 +
 oox/source/drawingml/chart/chartspaceconverter.cxx|   14 ---
 oox/source/drawingml/chart/objectformatter.cxx|   24 +++---
 oox/source/drawingml/chart/seriesconverter.cxx|2 
 oox/source/drawingml/fillproperties.cxx   |8 +-
 oox/source/drawingml/table/tablecell.cxx  |   36 -
 oox/source/export/drawingml.cxx   |5 +
 oox/source/ppt/pptimport.cxx  |2 
 sc/source/core/data/bcaslot.cxx   |3 
 sc/source/core/data/table3.cxx|4 +
 sc/source/filter/oox/workbookhelper.cxx   |2 
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx  |1 
 sc/source/ui/app/scmod.cxx|6 +
 sc/source/ui/docshell/docsh.cxx   |4 -
 sc/source/ui/docshell/docsh3.cxx  |2 
 sc/source/ui/docshell/docsh6.cxx  |   60 +++-
 sc/source/ui/inc/docsh.hxx|2 
 sd/qa/unit/data/pptx/bnc480256.pptx   |binary
 sd/qa/unit/import-tests.cxx   |   65 ++
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |2 
 starmath/source/mathmlexport.cxx  |1 
 svtools/source/contnr/svimpbox.cxx|   22 --
 svtools/source/graphic/transformer.cxx|2 
 svx/source/svdraw/svdoedge.cxx|8 +-
 svx/source/table/cell.cxx |2 
 svx/uiconfig/ui/optgridpage.ui|8 +-
 tools/source/generic/poly2.cxx|8 +-
 vcl/source/gdi/bitmap4.cxx|7 +
 vcl/source/gdi/metaact.cxx|6 +
 wizards/source/access2base/Field.xba  |   10 ++
 41 files changed, 338 insertions(+), 95 deletions(-)

New commits:
commit 29e6e01016a6b2535d7c02f75c6ea1cfc2de3506
Author: Niklas Johansson 
Date:   Mon Sep 15 08:57:01 2014 +0200

fdo#81264 Calc is not accessible to screen readers if sheet is modified 
[a11y]

When the IA2 changes was merged it removed the call to CommitFocusGained
and thereby stopped sending a STATE_CHANGED FOCUSED. A big thank you to
Joanmarie Diggs for noticing the lack of that event.

I only tested the patch on Fedora, but I will have a look at Windows with
NVDA as soon as the patch gets included in the daily builds.

Change-Id: Ic616d1b367ad8b8ed5d243e0ba124764082e96f1
Reviewed-on: https://gerrit.libreoffice.org/11451
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx 
b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 0960a37..5fade8b 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -361,6 +361,7 @@ void ScAccessibleSpreadsheet::LostFocus()
 
 void ScAccessibleSpreadsheet::GotFocus()
 {
+CommitFocusGained();
 AccessibleEventObject aEvent;
 aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
 aEvent.Source = uno::Reference< XAccessibleContext >(this);
commit 2592687ce6b08bb61d333a1879308e171926fac4
Author: Matúš Kukan 
Date:   Thu Sep 11 08:56:22 2014 +0200

bnc#892610: OOXML import: Improve chart number formats.

If sourceLinked is used, do not set "PercentageNumberFormat" even if
showPercent is true. The format string should be used for "NumberFormat".

c8cc89ff802d86b1f3a69afe1b4835b7df7f70c7 unnecessarily disabled
"LinkNumberFormatToSource". Use that for data labels but not for axis.

Also, actually make attaching number format supplier work for Calc.
Previously, non standard formats were added into wrong supplier,
and they were thrown away later because it was attached too late.
(See also ChartModel::attachNumberFormatsSupplier)

(cherry picked from commit d22a4d945ccf1456fbdb2c39802d956afa583a2a)

Conflicts:
chart2/qa/extras/chart2import.cx

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

2014-04-11 Thread Niklas Johansson
 sc/source/filter/xml/xmlexprt.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cf1d4c02c14772824a7149957fa119c6e290640b
Author: Niklas Johansson 
Date:   Fri Apr 11 13:07:09 2014 +0200

fdo#76961 - Calc link auto-update interval is changed on file save

The commit fa0fe19e89ba68a6b02cbdd5eff6bc161024c53d accidentaly made the
external links auto-update interval save seconds as milliseconds. This patch
fixes the problem at least on Mac and Windows where I tested it. I also
did a successful build on Fedora 20 with this patch that works as expected.

Change-Id: Ia10d12fb678004a686a4eaa65e9e12f09378a440
Reviewed-on: https://gerrit.libreoffice.org/8934
Reviewed-by: Kohei Yoshida 
Tested-by: Kohei Yoshida 

diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index bce3c190..a928a08 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -840,7 +840,7 @@ void ScXMLExport::GetAreaLinks( ScMyAreaLinksContainer& 
rAreaLinks )
 aAreaLink.sFilter = pLink->GetFilter();
 aAreaLink.sFilterOptions = pLink->GetOptions();
 aAreaLink.sURL = pLink->GetFile();
-aAreaLink.nRefresh = pLink->GetTimeout();
+aAreaLink.nRefresh = pLink->GetRefreshDelay();
 rAreaLinks.AddNewAreaLink( aAreaLink );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-04-11 Thread Niklas Johansson
 sc/source/filter/xml/xmlexprt.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c070fe636d75b74874c5e93f5cd5d19bd7af7e6d
Author: Niklas Johansson 
Date:   Fri Apr 11 13:07:09 2014 +0200

fdo#76961 - Calc link auto-update interval is changed on file save

The commit fa0fe19e89ba68a6b02cbdd5eff6bc161024c53d accidentaly made the
external links auto-update interval save seconds as milliseconds. This patch
fixes the problem at least on Mac and Windows where I tested it. I also
did a successful build on Fedora 20 with this patch that works as expected.

Change-Id: Ia10d12fb678004a686a4eaa65e9e12f09378a440
Reviewed-on: https://gerrit.libreoffice.org/8934
Reviewed-by: Kohei Yoshida 
Tested-by: Kohei Yoshida 
(cherry picked from commit cf1d4c02c14772824a7149957fa119c6e290640b)

Signed-off-by: Kohei Yoshida 

diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index d5c025d..c2ab4b2 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -836,7 +836,7 @@ void ScXMLExport::GetAreaLinks( ScMyAreaLinksContainer& 
rAreaLinks )
 aAreaLink.sFilter = pLink->GetFilter();
 aAreaLink.sFilterOptions = pLink->GetOptions();
 aAreaLink.sURL = pLink->GetFile();
-aAreaLink.nRefresh = pLink->GetTimeout();
+aAreaLink.nRefresh = pLink->GetRefreshDelay();
 rAreaLinks.AddNewAreaLink( aAreaLink );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [PATCH] Template manager should respect users macro and link settings

2013-03-08 Thread Niklas Johansson
Hi Cedric

Thanks for looking at my patch.

This is a bit embarrassing I noticed a mistake in my patch, it seems I
changed AsTemplate value on row 42-43. This was not supposed to be changed
to sal_False in the patch. Since it will cause all templates to open in
edit mode. :(

I will try to make a follow-up patch, just want to build and make sure I
haven't messed up again.

Very sorry for the inconvenience

Regards,
Niklas Johansson



2013/3/8 Cedric Bosdonnat 

> Hi Niklas,
>
> Your patch is ok to me: at least better than before if not 100% of cases
> are covered. I just pushed it to master branch and will submit it for
> review on libreoffice-4-0.
>
> Thanks a lot for your patch.
>
> --
> Cedric
>
> On Thu, 2013-02-28 at 16:37 +0100, Niklas Johansson wrote:
> > An attempt at taking user settings into account when using the
> > template manager. It doesn't work 100% but it's works better than at
> > the moment.
> >
> > ___
> > LibreOffice mailing list
> > LibreOffice@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
>
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sfx2/source

2013-03-08 Thread Niklas Johansson
 sfx2/source/doc/templatedlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 29fecdb19906ad4c6463d4a47de073ff36c1274c
Author: Niklas Johansson 
Date:   Fri Mar 8 16:49:46 2013 +0100

A template it should create a new document not open in edit mode

I did a misstake in a previous patch. This patch fixes that.

Change-Id: I22c2ff8a03c5652717a8705474f2cbe3b5b9208b

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index fa7b52b..7041966 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -678,7 +678,7 @@ IMPL_LINK(SfxTemplateManagerDlg, OpenTemplateHdl, 
ThumbnailViewItem*, pItem)
 {
 uno::Sequence< PropertyValue > aArgs(3);
 aArgs[0].Name = "AsTemplate";
-aArgs[0].Value <<= sal_False;
+aArgs[0].Value <<= sal_True;
 aArgs[1].Name = "MacroExecutionMode";
 aArgs[1].Value <<= MacroExecMode::USE_CONFIG;
 aArgs[2].Name = "UpdateDocMode";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-03-08 Thread Niklas Johansson
 sfx2/source/doc/templatedlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 390a0bf406ed5fd3bbd2c3f80d44c0bc344b95d2
Author: Niklas Johansson 
Date:   Fri Mar 8 16:49:46 2013 +0100

A template it should create a new document not open in edit mode

I did a misstake in a previous patch. This patch fixes that.

Change-Id: I22c2ff8a03c5652717a8705474f2cbe3b5b9208b
(cherry picked from commit 29fecdb19906ad4c6463d4a47de073ff36c1274c)

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 06a0dfe..c5979fa 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -679,7 +679,7 @@ IMPL_LINK(SfxTemplateManagerDlg, OpenTemplateHdl, 
ThumbnailViewItem*, pItem)
 {
 uno::Sequence< PropertyValue > aArgs(3);
 aArgs[0].Name = "AsTemplate";
-aArgs[0].Value <<= sal_False;
+aArgs[0].Value <<= sal_True;
 aArgs[1].Name = "MacroExecutionMode";
 aArgs[1].Value <<= MacroExecMode::USE_CONFIG;
 aArgs[2].Name = "UpdateDocMode";
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Adding hyphenation patterns for Swedish

2012-12-02 Thread Niklas Johansson
I thought I would add Swedish hyphenation patterns to the next release of
LibreOffice. The plan was to do it together with an update of the spelling
dictionary that is planed in mid January.

Since Swedish doesn't have any patterns bundled today, will there be any
problems with the feature freeze? Or will it be possible to add it together
with the update of the spelling dictionary?

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


Re: Adding hyphenation patterns for Swedish

2012-12-03 Thread Niklas Johansson
OK, thanks. Then I will wait for the dictionary update to be finished 
before I'll add the hyphenation patterns.


Regards,
Niklas Johansson

Petr Mladek skrev 2012-12-03 12:25:

Niklas Johansson píše v Ne 02. 12. 2012 v 21:07 +0100:

I thought I would add Swedish hyphenation patterns to the next release
of LibreOffice. The plan was to do it together with an update of the
spelling dictionary that is planed in mid January.

Sounds great.


Since Swedish doesn't have any patterns bundled today, will there be
any problems with the feature freeze? Or will it be possible to add it
together with the update of the spelling dictionary?

It should not be a problem. We are less strict in this area. I am not
aware about any breakage or regression caused by updating or adding a
dictionary.

We are looking forward to update and add the dictionary.


Best Regards,
Petr




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


Re: Default Styles in Writer

2012-12-06 Thread Niklas Johansson

Hi Samuel

This is pretty much the issue I tried to raise in the UX-discussion.
- Applied styles are shown in the ComboBox (a good thing)
- A style that is the basis for another style is seen as Applied
  and is thus shown in the ComboBox (what I questioned)
- The Default Style is the basis for all other styles (not a bad thing)
  and thus it is *always* shown in the ComboBox (not so nice)

An important point, I believe, is that, if in fact the Default Style
is explicitly used in the document it should be shown in the
ComboBox.
So, for this to work I believe the logic behind what is added in the
ComboBox at run time needs to changed. I wouldn't mind being
proven wrong though. ;)

Nice job with the default set of styles though.

Regards,
Niklas Johansson

Samuel Mehrbrodt skrev 2012-12-06 09:33:

Hi,

I have submitted a patch changing the list of default Styles in the
Toolbar in Writer [1].

Now, we [2] also wanted to remove the entry "Default Style" from the
list, but removing "Standard" in the code didn't do that.
Can anyone point me in the right direction where this is added?

Thanks,
Samuel

[1] https://gerrit.libreoffice.org/1248
[2]
http://nabble.documentfoundation.org/Libreoffice-ux-advise-Default-Styles-in-Writer-td4020441.html
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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


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

2013-04-09 Thread Niklas Johansson
 extras/source/autotext/lang/sv/acor/DocumentList.xml   |  188 ++---
 extras/source/autotext/lang/sv/acor/SentenceExceptList.xml |   86 +
 2 files changed, 180 insertions(+), 94 deletions(-)

New commits:
commit 76fa6219f59508db52bd8d58731d93cf58b21921
Author: Niklas Johansson 
Date:   Tue Apr 9 11:47:27 2013 +0200

Update Swedish autocorrect files.

Change-Id: Ib7428ff5201ec78b15b9f00039fa7ec61fcc9724
Reviewed-on: https://gerrit.libreoffice.org/3284
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/extras/source/autotext/lang/sv/acor/DocumentList.xml 
b/extras/source/autotext/lang/sv/acor/DocumentList.xml
index 66d6f78..65ade43 100644
--- a/extras/source/autotext/lang/sv/acor/DocumentList.xml
+++ b/extras/source/autotext/lang/sv/acor/DocumentList.xml
@@ -11,101 +11,101 @@
   
   
   
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
   
   
   
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
 
diff --git a/extras/source/autotext/lang/sv/acor/SentenceExceptList.xml 
b/extras/source/autotext/lang/sv/acor/SentenceExceptList.xml
index b2c7743..d67d614 100644
--- a/extras/source/autotext/lang/sv/acor/SentenceExceptList.xml
+++ b/extras/source/autotext/lang/sv/acor/SentenceExceptList.xml
@@ -1,25 +1,52 @@
 
 http://openoffice.org/2001/block-list";>
+  
   
+  
+  
   
+  
   
+  
+  
+  
   
   
+  
+  
   
+  
+  
+  
+  
   
+  
   
+  
+  
   
   
   
   
   
+  
+  
+  
+  
+  
   
   
+  
   
   
   
+  
+  
   
   
+  
+  
+  
   
   
   
@@ -27,50 +54,109 @@
   
   
   
+  
+  
   
+  
   
+  
+  
+  
+  
+  
   
   
   
   
+  
+  
+  
   
+  
   
+  
+  
   
   
   
+  
   
+  
+  
+  
   
   
   
+  
   
+  
+  
+  
   
   
   
+  
+  
+  
   
   
   
+  
   
   
   
   
   
+  
+  
   
+  
   
   
   
+  
   
   
   
+  
   
+  
   
   
   
+  
+  
+  
   
   
+  
   
+  
   
   
+  
+  
+  
+  
+  
+  
+  
+  
   
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
   
+  
+  
+  
+  
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


The new template manager and document macros

2013-02-27 Thread Niklas Johansson
Hi, I'm trying to look into an issue with the new template manager. The 
new manager doesn't respect macro security settings and always opens 
every document with macros disabled. If I've read the code correctly I 
believe that the old code used a dispatch to open the templates while 
the new implementation uses loadComponentFromURL.


The dispatch service takes care of checking macro security etc while you 
need to explicitly tell loadComponentFromURL if macros should be 
allowed. I did do a simple test building MacroExcecutionMode set to 
USE_CONFIG which didn't really have any effect (probably me messing 
something up). Something that did give effect was setting the same value 
to ALWAYS_EXECUTE_NO_WARN, but sadly that isn't what we want either.


Basically I want to know if you think it would be a good idea to go back 
to a dispatch type of handling or not. I'm a bit worried that it might 
mess with the CMIS integration.


I believe this is the new method that opens templates
http://opengrok.libreoffice.org/xref/core/sfx2/source/doc/templatedlg.cxx#673

I believe this was the method (which also took care of the previewing 
templates in the manager)

http://opengrok.libreoffice.org/xref/core/svtools/source/contnr/templwin.cxx#685

--
Thanks, for any guidence
Niklas Johansson

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


Re: The new template manager and document macros

2013-02-28 Thread Niklas Johansson
Some new findings, it seems I was wrong about USE_CONFIG not working it 
actually does work, partially. The USE_CONFIG-flag is supposed to show a 
security dialog if the security setting is Medium. At least that is how 
I interpret 
http://api.libreoffice.org/docs/common/ref/com/sun/star/document/MacroExecMode.html#USE_CONFIG. 
Besides that issue everything seems OK.


I will try to create a patch that uses USE_CONFIG and hopefully find 
some time to see if I can get the flag to work as specified, that task 
may very well be way over my head though.


Regards,
Niklas Johansson

Niklas Johansson skrev 2013-02-27 18:53:
Hi, I'm trying to look into an issue with the new template manager. 
The new manager doesn't respect macro security settings and always 
opens every document with macros disabled. If I've read the code 
correctly I believe that the old code used a dispatch to open the 
templates while the new implementation uses loadComponentFromURL.


The dispatch service takes care of checking macro security etc while 
you need to explicitly tell loadComponentFromURL if macros should be 
allowed. I did do a simple test building MacroExcecutionMode set to 
USE_CONFIG which didn't really have any effect (probably me messing 
something up). Something that did give effect was setting the same 
value to ALWAYS_EXECUTE_NO_WARN, but sadly that isn't what we want 
either.


Basically I want to know if you think it would be a good idea to go 
back to a dispatch type of handling or not. I'm a bit worried that it 
might mess with the CMIS integration.


I believe this is the new method that opens templates
http://opengrok.libreoffice.org/xref/core/sfx2/source/doc/templatedlg.cxx#673 



I believe this was the method (which also took care of the previewing 
templates in the manager)
http://opengrok.libreoffice.org/xref/core/svtools/source/contnr/templwin.cxx#685 





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


[PATCH] Template manager should respect users macro and link settings

2013-02-28 Thread Niklas Johansson
An attempt at taking user settings into account when using the template
manager. It doesn't work 100% but it's works better than at the moment.


0001-Template-manager-should-respect-users-macro-link-set.patch
Description: Binary data
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2013-03-08 Thread Niklas Johansson
 sfx2/source/doc/templatedlg.cxx |   17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

New commits:
commit 27f93b3b851e59d254bf5cd3825c8691d0ff3b51
Author: Niklas Johansson 
Date:   Thu Feb 28 02:31:55 2013 +0100

Template manager should respect users macro/link settings.

When opening a file with loadComponentFromURL, macro and link settings
is not respected unless it's explicitly told to do so.

Change-Id: Iaf2f2a797285e40147152ac8dfd53720dc26931b

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index d78cbaf..06a0dfe 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -40,6 +40,8 @@
 #include 
 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -63,6 +65,7 @@ using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::ui::dialogs;
+using namespace ::com::sun::star::document;
 
 static bool lcl_getServiceName (const OUString &rFileURL, OUString &rName );
 
@@ -674,9 +677,13 @@ IMPL_LINK(SfxTemplateManagerDlg, OpenTemplateHdl, 
ThumbnailViewItem*, pItem)
 {
 if (!mbIsSaveMode)
 {
-uno::Sequence< PropertyValue > aArgs(1);
+uno::Sequence< PropertyValue > aArgs(3);
 aArgs[0].Name = "AsTemplate";
-aArgs[0].Value <<= sal_True;
+aArgs[0].Value <<= sal_False;
+aArgs[1].Name = "MacroExecutionMode";
+aArgs[1].Value <<= MacroExecMode::USE_CONFIG;
+aArgs[2].Name = "UpdateDocMode";
+aArgs[2].Value <<= UpdateDocMode::ACCORDING_TO_CONFIG;
 
 TemplateViewItem *pTemplateItem = 
static_cast(pItem);
 
@@ -974,9 +981,13 @@ void SfxTemplateManagerDlg::OnTemplateSearch ()
 
 void SfxTemplateManagerDlg::OnTemplateEdit ()
 {
-uno::Sequence< PropertyValue > aArgs(1);
+uno::Sequence< PropertyValue > aArgs(3);
 aArgs[0].Name = "AsTemplate";
 aArgs[0].Value <<= sal_False;
+aArgs[1].Name = "MacroExecutionMode";
+aArgs[1].Value <<= MacroExecMode::USE_CONFIG;
+aArgs[2].Name = "UpdateDocMode";
+aArgs[2].Value <<= UpdateDocMode::ACCORDING_TO_CONFIG;
 
 uno::Reference< XStorable > xStorable;
 std::set::const_iterator pIter;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sfx2/source

2013-03-08 Thread Niklas Johansson
 sfx2/source/doc/templatedlg.cxx |   17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

New commits:
commit 7e7a591c275bda74833fd794ccd66496aa03d6af
Author: Niklas Johansson 
Date:   Thu Feb 28 02:31:55 2013 +0100

Template manager should respect users macro/link settings.

When opening a file with loadComponentFromURL, macro and link settings
is not respected unless it's explicitly told to do so.

Change-Id: Iaf2f2a797285e40147152ac8dfd53720dc26931b
(cherry picked from commit 27f93b3b851e59d254bf5cd3825c8691d0ff3b51)

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index c14a824..fa7b52b 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -40,6 +40,8 @@
 #include 
 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -62,6 +64,7 @@ using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::ui::dialogs;
+using namespace ::com::sun::star::document;
 
 static bool lcl_getServiceName (const OUString &rFileURL, OUString &rName );
 
@@ -673,9 +676,13 @@ IMPL_LINK(SfxTemplateManagerDlg, OpenTemplateHdl, 
ThumbnailViewItem*, pItem)
 {
 if (!mbIsSaveMode)
 {
-uno::Sequence< PropertyValue > aArgs(1);
+uno::Sequence< PropertyValue > aArgs(3);
 aArgs[0].Name = "AsTemplate";
-aArgs[0].Value <<= sal_True;
+aArgs[0].Value <<= sal_False;
+aArgs[1].Name = "MacroExecutionMode";
+aArgs[1].Value <<= MacroExecMode::USE_CONFIG;
+aArgs[2].Name = "UpdateDocMode";
+aArgs[2].Value <<= UpdateDocMode::ACCORDING_TO_CONFIG;
 
 TemplateViewItem *pTemplateItem = 
static_cast(pItem);
 
@@ -973,9 +980,13 @@ void SfxTemplateManagerDlg::OnTemplateSearch ()
 
 void SfxTemplateManagerDlg::OnTemplateEdit ()
 {
-uno::Sequence< PropertyValue > aArgs(1);
+uno::Sequence< PropertyValue > aArgs(3);
 aArgs[0].Name = "AsTemplate";
 aArgs[0].Value <<= sal_False;
+aArgs[1].Name = "MacroExecutionMode";
+aArgs[1].Value <<= MacroExecMode::USE_CONFIG;
+aArgs[2].Name = "UpdateDocMode";
+aArgs[2].Value <<= UpdateDocMode::ACCORDING_TO_CONFIG;
 
 uno::Reference< XStorable > xStorable;
 std::set::const_iterator pIter;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-08-27 Thread Niklas Johansson
 source/text/shared/optionen/01040200.xhp |2 +-
 source/text/swriter/01/0309.xhp  |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit c375894037bb4da57fe7defc45b88d8c0c989dd8
Author: Niklas Johansson 
Date:   Fri Aug 26 12:47:13 2016 +0200

Wrong name on menu item

The menu item is View - Field Names not View Fields

Change-Id: I04616d324a2cedca960a4a0662adb8941ee3f4ea
Reviewed-on: https://gerrit.libreoffice.org/28402
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/source/text/shared/optionen/01040200.xhp 
b/source/text/shared/optionen/01040200.xhp
index fa59bbc..fc4e7a8 100644
--- a/source/text/shared/optionen/01040200.xhp
+++ b/source/text/shared/optionen/01040200.xhp
@@ -92,7 +92,7 @@
 Drawings and controls
 Displays 
the drawings and controls contained in your document.
 Field codes
-Displays 
the field names in the document instead of the contents of the fields. 
You can also choose View - Fields in a text document.
+Displays 
the field names in the document instead of the contents of the fields. 
You can also choose View - Field Names in a text 
document.
 Comments
 Displays 
comments. Click a comment to edit the text. Use the context menu in Navigator 
to locate or delete a comment. Use the comments's context menu to delete this 
comment or all comments or all comments of this author.
 Settings (for HTML document only)
diff --git a/source/text/swriter/01/0309.xhp 
b/source/text/swriter/01/0309.xhp
index 56da57f..1d9968d 100644
--- a/source/text/swriter/01/0309.xhp
+++ b/source/text/swriter/01/0309.xhp
@@ -31,7 +31,7 @@
 
 
 
-Field 
Names
+Field 
Names
 Switches between showing fields as field names or field values. 
When enabled the field names are displayed, and when disabled the field values 
displayed. Some field contents cannot be displayed.
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2016-08-27 Thread Niklas Johansson
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 50bec3daab04d2c2d041fdb100d97c30ad441491
Author: Niklas Johansson 
Date:   Fri Aug 26 12:47:13 2016 +0200

Updated core
Project: help  c375894037bb4da57fe7defc45b88d8c0c989dd8

Wrong name on menu item

The menu item is View - Field Names not View Fields

Change-Id: I04616d324a2cedca960a4a0662adb8941ee3f4ea
Reviewed-on: https://gerrit.libreoffice.org/28402
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 01b5fd2..c375894 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 01b5fd2938a9680a773203fafc25acdae093f5bf
+Subproject commit c375894037bb4da57fe7defc45b88d8c0c989dd8
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [REVIEW 4-0] Re: Adding hyphenation patterns for Swedish

2013-01-11 Thread Niklas Johansson
Thank you for creating the patch, I hope that I'll be able to do it 
myself the next time. :)


Regards,
Niklas Johansson

Petr Mladek skrev 2013-01-10 12:19:

Hi Niklas,

I have added the dictionary into master, see
http://cgit.freedesktop.org/libreoffice/dictionaries/commit/?id=9cfd4282a7a522bed2dc4f4b9ede2c8ee444c29b

We need one review to get it into 4-0 branch.

Thanks for the nice improvement.

Best Regards,
Petr


Niklas Johansson píše v Po 07. 01. 2013 v 20:02 +0100:

What would be the easiest way to add the hyphenation patterns bundled
with LibreOffice?
I've updated the hyphenation extension on the LibreOffice extension site:
http://extensions.libreoffice.org/extension-center/swedish-hyphenation

Regards,
Niklas Johansson

Petr Mladek skrev 2012-12-03 12:25:

Niklas Johansson píše v Ne 02. 12. 2012 v 21:07 +0100:

I thought I would add Swedish hyphenation patterns to the next release
of LibreOffice. The plan was to do it together with an update of the
spelling dictionary that is planed in mid January.

Sounds great.


Since Swedish doesn't have any patterns bundled today, will there be
any problems with the feature freeze? Or will it be possible to add it
together with the update of the spelling dictionary?

It should not be a problem. We are less strict in this area. I am not
aware about any breakage or regression caused by updating or adding a
dictionary.

We are looking forward to update and add the dictionary.


Best Regards,
Petr






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


Re: Accessible labels in alerts claim to be ROLE_PASSWORD_TEXT

2013-12-16 Thread Niklas Johansson

Hello again

So I didn't really find the time that I wanted to put on this but, I 
will at least try to

account for what I found out this far.

Caolán McNamara skrev 2013-11-05 13:59:

On Mon, 2013-11-04 at 17:07 +0100, Niklas Johansson wrote:

An other issue around this message box was the VclBox surrounding the
buttons, that gets the role FILLER but should probably have the role
PANEL. Changing the "sal_uInt16 VclBox::getDefaultAccessibleRole()
const" to return PANEL made NVDA read the dialog content when the dialog
got displayed.

After a closer look my suggestion above is wrong.

...

In general where I'm hoping to get to is that LibreOffice reports the
same sort of hierarchy and types for a .ui that gtk would if it was
rendering it. I *think* gtk defaults to PANEL for containers but FILLER
for GtkBox, which is where those defaults in layout.cxx come from.
Yep that is what we want. And I do believe that you are correct about 
the default roles.
Looking closer (see below) at a messagebox created in glade you don't 
see any PANEL
so question is do gtk use a container to group it's labels and override 
the default roles

or does it use something else?

I did the same and looked in Accerciser at the complete accessibility tree:
- frame
  - alert
- filler
  - filler
- icon
- filler
  - label
  - label
-filler
  - push button
  - push button

Sorry for not being able to report anything more interesting at this 
time. I probably need to let this rest for a while and concentrate on 
translation for LibreOffice 4.2.


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


Re: LibO 4.2.0.0 - Configuration page

2013-12-16 Thread Niklas Johansson

Hi Thomas

Did you find any good way to disable the Expert Config page?

Searching the code I found this:
http://opengrok.libreoffice.org/xref/core/configmgr/source/winreg.cxx

That gives an example how one could hide the the config leaf in the 
options dialog,
only problem is that the function got moved from it's own leaf into it's 
own window

that opens from a button on the advanced leaf.

Does anyone know if that button has a uno-command linked to it?
In that case we could block that command by adding a xcd-file.

Until further notice this is an example of a xcd-file for hiding the 
whole advanced leaf.



http://www.w3.org/2001/XMLSchema";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xmlns:oor="http://openoffice.org/2001/registry";>


xmlns:install="http://openoffice.org/2004/installation";
oor:name="OptionsDialog" 
oor:package="org.openoffice.Office">






true









I even got it to work by changing the windows registry like this.

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\LibreOffice\org.openoffice.Office.OptionsDialog\OptionsDialogGroups\ProductName/#fuse\Pages\Java/#fuse\Hide]
"Value"="true"

Regards,
Niklas

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


Re: LibO 4.2.0.0 - Configuration page

2013-12-16 Thread Niklas Johansson

Hi Andras

Andras Timar skrev 2013-12-16 19:49:
Four days ago Kendy added a config item, it is 
/org.openoffice.Office.Common/Security/EnableExpertConfiguration with 
values true/false; defaults to true. Best regards, Andras 


Thanks a lot for the information and thanks to Kendy for adding the 
config item.


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


[Libreoffice-commits] core.git: dictionaries

2014-01-02 Thread Niklas Johansson
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 01af057083321e00cd9a44e9b309099c3b55b276
Author: Niklas Johansson 
Date:   Thu Jan 2 15:16:50 2014 +0100

Updated core
Project: dictionaries  6968c12ba2839bff7e4d2d46c29938d337846bb4

Update Swedish spelling dictionary

Updates the spelling dictionary to the most resent version.
Improvements include:
Blocked a lot of compound words that often occur as misspellings of
other common words.
Improved support for three-way compounds. Removed a lot of uncommon words.

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

diff --git a/dictionaries b/dictionaries
index f724c40..6968c12 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit f724c400668f11b49c3566a20c0c3350249ff266
+Subproject commit 6968c12ba2839bff7e4d2d46c29938d337846bb4
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Vendors Name via UNO API / Basic Macros

2013-11-15 Thread Niklas Johansson
Just to point you to some other options. The basic library Tools that 
comes with LibreOffice contains a few interesting macros related to 
this. You need to load the library first then you can use GetProductName.


BasicLibraries.LoadLibrary("Tools")
msgbox GetProductName

If you need more detailed information you can look in the registry 
(xcu-files) using the helper-function GetRegistryKeyContent.

BasicLibraries.LoadLibrary("Tools")
oKey = GetRegistryKeyContent("/org.openoffice.Setup/Product")
msgbox oKey.ooName
msgbox oKey.ooSetupVersionAboutBox

The GetRegistryKeyContent basically does what Milkos did for you. Use 
xray to inspect oKey for more possibilities.

These functions is available in AOO as well.

Regards,
Niklas Johansson

Thomas Krumbein skrev 2013-11-15 15:49:

Hi Miklos,

yes, thanks, that might be a practible way at this time.

Nevertheless - it is not a solution for the future.

I guess, there should be an implementation of the original product name,
version-number (major and minor) and actuall product name.

This should be easy accessible even for unexpierienced macro developers.

I will do a feature request or this :)


best regards
Thomas



Am 15.11.2013 14:11, schrieb Miklos Vajna:

Hi,

On Fri, Nov 15, 2013 at 01:43:38PM +0100, Thomas Krumbein 
 wrote:

Thanks for this - I know the xcu files. But this is not an easy access
for (Basic-) macros. The way to do is: Search for this file, parse this
file and extract the vendor name... for basic marcos a very long way.

Why not use the css::configuration::ConfigurationProvider API instead?

I mean something like:


oProvider = createUnoService("com.sun.star.configuration.ConfigurationProvider")
Dim aParams(0) As new com.sun.star.beans.PropertyValue
aParams(0).Name = "nodepath"
aParams(0).Value = "/org.openoffice.Setup/Product"
oSettings = 
oProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess",
 aParams)
xray oSettings.getByName("ooName")

HTH,

Miklos




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


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - dictionaries

2014-01-07 Thread Niklas Johansson
 dictionaries |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f6b6aeddde04164ca33f2726335fdcefd9c1c69c
Author: Niklas Johansson 
Date:   Thu Jan 2 15:16:50 2014 +0100

Updated core
Project: dictionaries  02314dc1d63277226f048527d7fb843f751e84e8

diff --git a/dictionaries b/dictionaries
index 45db0b3..02314dc 16
--- a/dictionaries
+++ b/dictionaries
@@ -1 +1 @@
-Subproject commit 45db0b3b3d689609c0d3773e1c1accc32e7e71f3
+Subproject commit 02314dc1d63277226f048527d7fb843f751e84e8
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


IA2 crashes way to easily in LibreOffice 4.2.0 RC3

2014-01-24 Thread Niklas Johansson

Hi

I know that it is probably to late to be raising this, but is anybody 
looking into the issue raised by Stuart after the release of RC2[1]?
Since the iAccessible2 integration is one of the features that will 
receive some focus, at least from those in need of it, it does not feel 
good to release LibreOffice in it's current state.


It is a experimental feature but pressing Enter or backspace in Writer 
should not make Writer crash even if it is an experimental feature.


Since the crasher does not appear in the daily builds towards 
LibreOffice 4.2.1, I will at least ask if anyone has any hunch what 
might have been fixed there but hasn't been back-ported.


http://nabble.documentfoundation.org/A-stack-trace-for-BZ-bug-73464-4-2-0-2-RC2-QA-Blocker-crash-when-IA2-bridge-is-active-and-ENTER-key-d-td4091751.html

--
Regards,
Niklas Johansson

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


Font family in the Accessibility bridge

2013-08-22 Thread Niklas Johansson

Hi

At the moment the text attribute Font family is exposed as Monospaced or 
Porportional. I've looked at some java examples (example programs) and 
seen that they seem to expose the font name as the text attribute font 
family. Does anybody know if it is correct to expose the font name here. 
It feels a lot more informative to get the font name then knowing if the 
font is mono spaced or proportional.


I've been able to build a version that exposes the font name. But I 
wanted to hear if somebody knows if it is correct/incorrect before I 
prepare the patch.


--
Regards,
Niklas Johansson

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


[PATCH] fdo#68346 Expose font name to Accessibility bridge

2013-08-25 Thread Niklas Johansson
I did some testing with some swing classes and they seem to expose the 
font name as the text attribute called fontfamily. This patch makes 
LibreOffice do the same. A quick test with JavaMonkey shows that it 
works. There are still some issues with other text attributes, such as 
indents being reported as zero regardless of the actual indentation. I 
probably won't have time to look into that in the near feature but if it 
is still an issue I hope I'll get more time to look into it later this 
fall.


Regards,
Niklas Johansson

Niklas Johansson skrev 2013-08-22 21:01:

Hi

At the moment the text attribute Font family is exposed as Monospaced 
or Porportional. I've looked at some java examples (example programs) 
and seen that they seem to expose the font name as the text attribute 
font family. Does anybody know if it is correct to expose the font 
name here. It feels a lot more informative to get the font name then 
knowing if the font is mono spaced or proportional.


I've been able to build a version that exposes the font name. But I 
wanted to hear if somebody knows if it is correct/incorrect before I 
prepare the patch.






0001-fdo-68346-Accessibility-bridge-should-exspose-the-fo.patch
Description: application/mbox
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Unable to build master with Visual Studio Express since last weekend

2013-08-29 Thread Niklas Johansson

This week I started to get this error:
/cygdrive/c/sources/libo-core/embeddedobj/Library_emboleobj.mk:11: *** 
Library emboleobj must be registered in Repository.mk.  Stop.

make: *** [build] Error 2

while trying to build master with Visual Studio Express.

This is my autogen.input:
--with-external-tar=/cygdrive/c/sources/lo-externalsrc
--with-junit=/cygdrive/c/sources/junit-4.10.jar
--with-ant-home=/cygdrive/c/sources/apache-ant-1.9.2
--enable-pch
--disable-ccache
--disable-activex
--disable-atl
--enable-debug

Sorry for not being able to fix this myself. I tried to pull and make 
clean few times during this week, just in case someone already fixed the 
problem, but without any luck.


--
Regards,
Niklas Johansson

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


Re: Unable to build master with Visual Studio Express since last weekend

2013-09-01 Thread Niklas Johansson
There were two more places I had to add conditions before I could finish 
the build. Sent in my changes for review. I hope that they are correct, 
at least they build and pass make check.


https://gerrit.libreoffice.org/#/c/5740

Hmm... I accidentally made it dependent on an earlier patch, is there a 
way to remove that dependency somehow? The patches are completely 
unrelated.


Thanks,
Niklas Johansson

Michael Stahl skrev 2013-08-29 22:41:

On 29/08/13 13:07, Niklas Johansson wrote:

This week I started to get this error:
/cygdrive/c/sources/libo-core/embeddedobj/Library_emboleobj.mk:11: ***
Library emboleobj must be registered in Repository.mk.  Stop.
make: *** [build] Error 2

while trying to build master with Visual Studio Express.

This is my autogen.input:
--with-external-tar=/cygdrive/c/sources/lo-externalsrc
--with-junit=/cygdrive/c/sources/junit-4.10.jar
--with-ant-home=/cygdrive/c/sources/apache-ant-1.9.2
--enable-pch
--disable-ccache
--disable-activex
--disable-atl
--enable-debug

Sorry for not being able to fix this myself. I tried to pull and make
clean few times during this week, just in case someone already fixed the
problem, but without any luck.

it's caused by --disable-atl, should be fixed now on master with commit
9d7c5dcf448fed668cc772d3cffa31712b1834a3


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


[Libreoffice-commits] core.git: embedserv/Module_embedserv.mk sw/CppunitTest_sw_ww8export.mk

2013-09-01 Thread Niklas Johansson
 embedserv/Module_embedserv.mk  |2 +-
 sw/CppunitTest_sw_ww8export.mk |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 907445612298aae4f3322a7d9cdc6871d54ba47a
Author: Niklas Johansson 
Date:   Sun Sep 1 16:06:57 2013 +0200

Make it possible to build without ATL

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

diff --git a/embedserv/Module_embedserv.mk b/embedserv/Module_embedserv.mk
index 009d63e..fc11190 100644
--- a/embedserv/Module_embedserv.mk
+++ b/embedserv/Module_embedserv.mk
@@ -13,7 +13,7 @@ $(eval $(call gb_Module_Module,embedserv))
 ifeq ($(OS),WNT)
 
 $(eval $(call gb_Module_add_targets,embedserv,\
-   Library_inprocserv \
+   $(if $(filter WNT-TRUE,$(OS)-$(DISABLE_ATL)),,Library_inprocserv) \
 ))
 
 ifeq ($(DISABLE_ATL),)
diff --git a/sw/CppunitTest_sw_ww8export.mk b/sw/CppunitTest_sw_ww8export.mk
index c75d929..2b1a475 100644
--- a/sw/CppunitTest_sw_ww8export.mk
+++ b/sw/CppunitTest_sw_ww8export.mk
@@ -19,7 +19,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_ww8export, \
 comphelper \
 cppu \
 cppuhelper \
-emboleobj \
+$(if $(filter WNT-TRUE,$(OS)-$(DISABLE_ATL)),,emboleobj) \
 sal \
 test \
 unotest \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: accessibility/bridge

2013-09-01 Thread Niklas Johansson
 
accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java
 |9 ++---
 accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java 
|8 +++-
 2 files changed, 5 insertions(+), 12 deletions(-)

New commits:
commit 277b339371727134851da1b695d9d8d30889a961
Author: Niklas Johansson 
Date:   Sun Aug 25 18:29:59 2013 +0200

fdo#68346 Accessibility bridge should exspose the font name.

At the moment it tells the user if the font is proportional or monospaced.

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

diff --git 
a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java
 
b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java
index c7202bc..8dd7e36 100644
--- 
a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java
+++ 
b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl.java
@@ -166,13 +166,8 @@ public class AccessibleEditableTextImpl extends 
AccessibleTextImpl implements ja
 attribute = as.getAttribute(StyleConstants.FontFamily);
 if (null != attribute) {
 com.sun.star.beans.PropertyValue propertyValue = new 
com.sun.star.beans.PropertyValue();
-propertyValue.Name = "CharFontPitch";
-
-if (StyleConstants.getFontFamily(as).equals( "Proportional" )) {
-propertyValue.Value = new Short("2");
-} else {
-propertyValue.Value = new Short("1");
-}
+propertyValue.Name = "CharFontName";
+propertyValue.Value = new String(StyleConstants.getFontFamily(as));
 propertyValues.add(propertyValue);
 }
 
diff --git 
a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java
 
b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java
index c22eebe0..92c10de 100644
--- 
a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java
+++ 
b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl.java
@@ -36,7 +36,7 @@ public class AccessibleTextImpl implements 
javax.accessibility.AccessibleText {
 final static double toPointFactor = 1 / ((7 / 10) + 34.5);
 final static String[] attributeList = {
 "ParaAdjust", "CharBackColor", "CharWeight", "ParaFirstLineIndent",
-"CharFontPitch", "CharHeight", "CharColor", "CharPosture",
+"CharFontName", "CharHeight", "CharColor", "CharPosture",
 "ParaLeftMargin", "ParaLineSpacing", "ParaTopMargin", 
"ParaBottomMargin",
 "CharStrikeout", "CharEscapement", "ParaTabStops", "CharUnderline"
 };
@@ -296,10 +296,8 @@ public class AccessibleTextImpl implements 
javax.accessibility.AccessibleText {
 (float) (toPointFactor * 
AnyConverter.toInt(property.Value)));
 
 // Set font family attribute
-} else if (property.Name.equals("CharFontPitch")) {
-if (AnyConverter.toShort(property.Value) == 2) {
-StyleConstants.setFontFamily(as, "Proportional");
-}
+} else if (property.Name.equals("CharFontName")) {
+StyleConstants.setFontFamily(as, 
AnyConverter.toString(property.Value));
 
 // Set font size attribute
 } else if (property.Name.equals("CharHeight")) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Pre-Configuration LibO

2013-10-01 Thread Niklas Johansson

Are you sure you got the registry paths correct.
Given that I want to enable the Sidebar in LibreOffice 4.1.X, this xcd 
works for me:



http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:oor="http://openoffice.org/2001/registry";>


  

  true

  



Does that one make any difference to you? You need a fresh user profile 
to see the change so rename your current user profile folder before you 
try it out.


If it doesn't work, what version of LibreOffice are you trying this on?

Regards,
Niklas Johansson

Thomas Krumbein skrev 2013-10-01 11:48:

Hey all,

I tried to build an xcd-file to change some presettings in LibO.
Unfortunatly it doesn´t work. Maybe someone can give me some hints?

1. I wont to enable the experimental sidebar per default. All xcd-files
are UTF8 and LF coded, places in share/registry

My first approch:


http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:oor="http://openoffice.org/2001/registry";>


   

  

true

  

   



Doesn´t work.

Next approch:


http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:oor="http://openoffice.org/2001/registry";>


   

  

false


false


false


true


false


false


false


true


2


auto


1


true


false

   

   



(thats all the datas, which will be changes in the
registrymodification.xcu, if I do the change manually)

Doesn´t work.

2. Later I tried to change the CLT-Mode and activating support for asian
language - unfortunatly same result.

3. When I change the default font the following code works:


http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:oor="http://openoffice.org/2001/registry";>




Arial

 



So, what is going wrong in Nr. 1 and 2? Any hints?

Best regards
Thomas




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


Accessible labels in alerts claim to be ROLE_PASSWORD_TEXT

2013-11-02 Thread Niklas Johansson
I've been trying to get a grip on bug fdo#70588 "Accessible labels in 
alerts claim to be ROLE_PASSWORD_TEXT instead of ROLE_LABEL". In short 
this bug makes text inside message dialogs unreadable to screen readers 
(on all platforms).


I've followed the code around a bit and it seems to be an issue with 
different WinBits that has the same value, more exactly WB_WORDBREAK and 
WB_PASSWORD has the same value and indirectly set the AccessibleRole to 
PASSWORD_TEXT.


In newer message dialogs here is were the WB_WORDBREAK gets added:
http://opengrok.libreoffice.org/xref/core/vcl/source/window/layout.cxx#2046

Here is were the AccessibleRole gets set to PASSWORD_TEXT (due to the 
fact that WB_WORDBREAK is set)

http://opengrok.libreoffice.org/xref/core/accessibility/source/standard/vclxaccessibleedit.cxx#226

I should probably mention that WB_READONLY and WB_NOLABEL has the same 
value, but that has only positive effects in the above mentioned case 
because labels in messageboxes should of course be read only.

*
**Does it make sense to change the values of WinBits or how does one 
deal with a problem like this?*


For quick reference to WinBits:
http://opengrok.libreoffice.org/xref/core/include/tools/wintypes.hxx#211

--
Regards
Niklas Johansson

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


Re: Accessible labels in alerts claim to be ROLE_PASSWORD_TEXT

2013-11-04 Thread Niklas Johansson
Yes, I tried that while debugging the issue and it makes it better. It 
now reports as ROLE_TEXT but since the text in our message boxes are 
copyable that might be better than reporting it as ROLE_LABEL.


An other issue around this message box was the VclBox surrounding the 
buttons, that gets the role FILLER but should probably have the role 
PANEL. Changing the "sal_uInt16 VclBox::getDefaultAccessibleRole() 
const" to return PANEL made NVDA read the dialog content when the dialog 
got displayed. On the other hand I'm not sure how generic this 
layout.cxx actually is supposed to be.


Sorry for ranting on about this issue. I'm mostly just trying to 
understand the code and hopefully fixing a bug or two on the way.


Thanks,
Niklas Johansson

Caolán McNamara skrev 2013-11-04 15:42:

On Sat, 2013-11-02 at 14:18 +0100, Niklas Johansson wrote:

I've been trying to get a grip on bug fdo#70588 "Accessible labels in
alerts claim to be ROLE_PASSWORD_TEXT instead of ROLE_LABEL". In short
this bug makes text inside message dialogs unreadable to screen
readers (on all platforms).

I've followed the code around a bit and it seems to be an issue with
different WinBits that has the same value, more exactly WB_WORDBREAK
and WB_PASSWORD has the same value and indirectly set the
AccessibleRole to PASSWORD_TEXT.

In newer message dialogs here is were the WB_WORDBREAK gets added:
http://opengrok.libreoffice.org/xref/core/vcl/source/window/layout.cxx#2046

Bah, so does
http://cgit.freedesktop.org/libreoffice/core/commit/?id=6ad8972d4b698617404e53d63f178e34b2d5358a
 make it work. I presume it does. We don't need to use WB_WORDBREAK for 
multiline edits, that's implied and like you say the bit is reused under a 
different name for a different purpose there.

C.



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


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

2013-11-05 Thread Niklas Johansson
 vcl/source/window/msgbox.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit af93243d06d81e996c1fae92190bc9622503e25b
Author: Niklas Johansson 
Date:   Tue Nov 5 11:19:06 2013 +0100

Resolves: fdo#70588 MultiLineEdits don't need WB_WORDBREAK set

and inherits from Edit which reuses that same bit for password

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

diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 31c0c86..0e95ea8 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -233,7 +233,7 @@ void MessBox::ImplPosControls()
 longnMaxWidth = GetDesktopRectPixel().GetWidth()-8;
 longnMaxLineWidth;
 longnWidth;
-WinBits nWinStyle = WB_LEFT | WB_WORDBREAK | WB_NOLABEL;
+WinBits nWinStyle = WB_LEFT | WB_NOLABEL;
 sal_uInt16  nTextStyle = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | 
TEXT_DRAW_LEFT;
 
 delete mpVCLMultiLineEdit;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - vcl/source

2013-11-05 Thread Niklas Johansson
 vcl/source/window/layout.cxx |2 +-
 vcl/source/window/msgbox.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9826dec6f6021dba9859458acb0eb04520e5979a
Author: Niklas Johansson 
Date:   Tue Nov 5 11:19:06 2013 +0100

Resolves: fdo#70588 MultiLineEdits don't need WB_WORDBREAK set

and inherits from Edit which reuses that same bit for password

Change-Id: I8add146fdbc1b3402b5409f01f75c620da25a313
Reviewed-on: https://gerrit.libreoffice.org/6579
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit af93243d06d81e996c1fae92190bc9622503e25b)
Reviewed-on: https://gerrit.libreoffice.org/6589
Reviewed-by: Niklas Johansson 

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 64787d2..9b1d56f 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1821,7 +1821,7 @@ short MessageDialog::Execute()
 m_pImage->set_valign(VCL_ALIGN_START);
 m_pImage->Show();
 
-WinBits nWinStyle = WB_LEFT | WB_VCENTER | WB_WORDBREAK | WB_NOLABEL | 
WB_NOTABSTOP;
+WinBits nWinStyle = WB_LEFT | WB_VCENTER | WB_NOLABEL | WB_NOTABSTOP;
 
 m_pPrimaryMessage = new VclMultiLineEdit(m_pGrid, nWinStyle);
 m_pPrimaryMessage->SetPaintTransparent(true);
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 9e27767..28ad892 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -234,7 +234,7 @@ void MessBox::ImplPosControls()
 longnMaxWidth = GetDesktopRectPixel().GetWidth()-8;
 longnMaxLineWidth;
 longnWidth;
-WinBits nWinStyle = WB_LEFT | WB_WORDBREAK | WB_NOLABEL;
+WinBits nWinStyle = WB_LEFT | WB_NOLABEL;
 sal_uInt16  nTextStyle = TEXT_DRAW_MULTILINE | TEXT_DRAW_TOP | 
TEXT_DRAW_LEFT;
 
 delete mpVCLMultiLineEdit;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-30 Thread Niklas Johansson
 sw/uiconfig/swriter/ui/outlinenumberingpage.ui |   16 
 sw/uiconfig/swriter/ui/outlinepositionpage.ui  |   18 ++
 2 files changed, 34 insertions(+)

New commits:
commit 9098a2f082f4b8e4404685d19a4e10c3c8160c7b
Author: Niklas Johansson 
Date:   Fri Jan 30 12:00:00 2015 +0100

tdf#88763 The orca screen reader does not speak control names

It seems the controls aren't linked with the labels in the outline numbering
dialog box (Tools - Outline Numbering). Add info about mnemonic_widget to 
the
labels.

There is still a pending issue with separator before/after which I guess
should be grouped in a frame, but I'm not confident enough with Glade or
it's ui format to try and fix it at the moment.

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

diff --git a/sw/uiconfig/swriter/ui/outlinenumberingpage.ui 
b/sw/uiconfig/swriter/ui/outlinenumberingpage.ui
index 398da89..32791ce 100644
--- a/sw/uiconfig/swriter/ui/outlinenumberingpage.ui
+++ b/sw/uiconfig/swriter/ui/outlinenumberingpage.ui
@@ -50,6 +50,8 @@
 True
 False
 Level
+True
+level:border
 
   
 
@@ -92,6 +94,8 @@
 True
 0
 Paragraph 
style:
+True
+style
   
   
 0
@@ -116,6 +120,8 @@
 False
 0
 Number:
+True
+numbering
   
   
 0
@@ -128,6 +134,8 @@
 False
 0
 Character 
style:
+True
+charstyle
   
   
 0
@@ -140,6 +148,8 @@
 False
 0
 Show 
sublevels:
+True
+sublevelsnf
   
   
 0
@@ -238,6 +248,8 @@
 False
 0
 Before:
+True
+prefix
   
 
   
@@ -257,6 +269,8 @@
 False
 0
 After:
+True
+suffix
   
 
   
@@ -271,6 +285,8 @@
 False
 0
 Start 
at:
+True
+startat
   
   
 0
diff --git a/sw/uiconfig/swriter/ui/outlinepositionpage.ui 
b/sw/uiconfig/swriter/ui/outlinepositionpage.ui
index 064235a..2b8d923 100644
--- a/sw/uiconfig/swriter/ui/outlinepositionpage.ui
+++ b/sw/uiconfig/swriter/ui/outlinepositionpage.ui
@@ -136,6 +136,8 @@
 False
 1
 Numbering 
alignment:
+True
+numalignlb
   
   
 0
@@ -160,7 +162,9 @@
 1
 Minimum 
space between
 numbering and text:
+True
 right
+numdistmf:0.00cm
   
   
 0
@@ -186,6 +190,8 @@ numbering and text:
 False
 1
 Width of 
numbering:
+True
+numberingwidthmf:0.00cm
   
   
 0
@@ -226,6 +232,8 @@ numbering and text:
 False
 1
 Indent:
+True
+indentmf:0.00cm
   
   
 0
@@ -251,6 +259,8 @@ numbering and text:
 False
 1
 Indent 
at:
+True
+indentatmf:0.00cm
   
   
 0
@@ -275,6 +285,8 @@ numbering and text:
 False
 1
 Numbe

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

2015-02-19 Thread Niklas Johansson
 editeng/source/misc/svxacorr.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 42ec6448f9acd474d8ec1a92d9362e1b38e13758
Author: Niklas Johansson 
Date:   Wed Feb 18 07:51:36 2015 +0100

tdf#78148 Ordinal numbers should not be auto-capitalized

FnChgOrdinalNumber should return true if it changes the ordinal number.
This seems to be accentually removed when the function was
internationalized and has always returned false since.

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

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 943e518..79868dd 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -503,6 +503,7 @@ bool SvxAutoCorrect::FnChgOrdinalNumber(
 rDoc.SetAttr( nNumEnd + 1 , nEndPos,
 SID_ATTR_CHAR_ESCAPEMENT,
 aSvxEscapementItem);
+bChg = true;
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - editeng/source

2015-02-26 Thread Niklas Johansson
 editeng/source/misc/svxacorr.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit cbab46342e75a0bd8987620757bf67c4f68f8edd
Author: Niklas Johansson 
Date:   Wed Feb 18 07:51:36 2015 +0100

tdf#78148 Ordinal numbers should not be auto-capitalized

FnChgOrdinalNumber should return true if it changes the ordinal number.
This seems to be accentually removed when the function was
internationalized and has always returned false since.

Change-Id: I633058a99ec033e0c33f807776364a52e22e9c64
Reviewed-on: https://gerrit.libreoffice.org/14535
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 42ec6448f9acd474d8ec1a92d9362e1b38e13758)
Reviewed-on: https://gerrit.libreoffice.org/14578
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 6b235de..64118ac 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -501,6 +501,7 @@ bool SvxAutoCorrect::FnChgOrdinalNumber(
 rDoc.SetAttr( nNumEnd + 1 , nEndPos,
 SID_ATTR_CHAR_ESCAPEMENT,
 aSvxEscapementItem);
+bChg = true;
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - editeng/source

2015-02-28 Thread Niklas Johansson
 editeng/source/misc/svxacorr.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 4ab923b82008396f40b7137ae984a08c4175e28d
Author: Niklas Johansson 
Date:   Wed Feb 18 07:51:36 2015 +0100

tdf#78148 Ordinal numbers should not be auto-capitalized

FnChgOrdinalNumber should return true if it changes the ordinal number.
This seems to be accentually removed when the function was
internationalized and has always returned false since.

Change-Id: I633058a99ec033e0c33f807776364a52e22e9c64
Reviewed-on: https://gerrit.libreoffice.org/14535
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 42ec6448f9acd474d8ec1a92d9362e1b38e13758)
Reviewed-on: https://gerrit.libreoffice.org/14578
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 
(cherry picked from commit cbab46342e75a0bd8987620757bf67c4f68f8edd)
Reviewed-on: https://gerrit.libreoffice.org/14683

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 8b1a3ee..4745c0b 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -498,6 +498,7 @@ bool SvxAutoCorrect::FnChgOrdinalNumber(
 rDoc.SetAttr( nNumEnd + 1 , nEndPos,
 SID_ATTR_CHAR_ESCAPEMENT,
 aSvxEscapementItem);
+bChg = true;
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-03-19 Thread Niklas Johansson
 editeng/source/misc/svxacorr.cxx |  108 +--
 1 file changed, 59 insertions(+), 49 deletions(-)

New commits:
commit 307c25fe460857c52f0b9c2078e83f6d12f8bdc9
Author: Niklas Johansson 
Date:   Thu Mar 19 20:30:41 2015 +0100

tdf#89437  Ordinal suffix should never be superscript in some languages

Printing ordinal suffixes as superscript is just not done in Swedish and
likely a few other languages but this change only cares for Swedish at
the moment.

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

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 79868dd..e74ad5d 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -441,69 +441,79 @@ bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, 
const OUString& rTxt,
 
 
 bool SvxAutoCorrect::FnChgOrdinalNumber(
-SvxAutoCorrDoc& rDoc, const OUString& rTxt,
-sal_Int32 nSttPos, sal_Int32 nEndPos,
-LanguageType eLang )
+SvxAutoCorrDoc& rDoc, const OUString& rTxt,
+sal_Int32 nSttPos, sal_Int32 nEndPos,
+LanguageType eLang)
 {
-// 1st, 2nd, 3rd, 4 - 0th
-// 201th or 201st
-// 12th or 12nd
-CharClass& rCC = GetCharClass( eLang );
+// 1st, 2nd, 3rd, 4 - 0th
+// 201th or 201st
+// 12th or 12nd
 bool bChg = false;
 
-for( ; nSttPos < nEndPos; ++nSttPos )
-if( !lcl_IsInAsciiArr( sImplSttSkipChars, rTxt[ nSttPos ] ))
-break;
-for( ; nSttPos < nEndPos; --nEndPos )
-if( !lcl_IsInAsciiArr( sImplEndSkipChars, rTxt[ nEndPos - 1 ] ))
-break;
+// In some languages ordinal suffixes should never be
+// changed to superscript. Let's break for those languages.
+switch (eLang)
+{
+case LANGUAGE_SWEDISH:
+case LANGUAGE_SWEDISH_FINLAND:
+break;
+default:
+CharClass& rCC = GetCharClass(eLang);
 
+for (; nSttPos < nEndPos; ++nSttPos)
+if (!lcl_IsInAsciiArr(sImplSttSkipChars, rTxt[nSttPos]))
+break;
+for (; nSttPos < nEndPos; --nEndPos)
+if (!lcl_IsInAsciiArr(sImplEndSkipChars, rTxt[nEndPos - 1]))
+break;
 
-// Get the last number in the string to check
-sal_Int32 nNumEnd = nEndPos;
-bool foundEnd = false;
-bool validNumber = true;
-sal_Int32 i = nEndPos;
 
-while ( i > nSttPos )
-{
-i--;
-bool isDigit = rCC.isDigit( rTxt, i );
-if ( foundEnd )
-validNumber |= isDigit;
+// Get the last number in the string to check
+sal_Int32 nNumEnd = nEndPos;
+bool foundEnd = false;
+bool validNumber = true;
+sal_Int32 i = nEndPos;
 
-if ( isDigit && !foundEnd )
+while (i > nSttPos)
 {
-foundEnd = true;
-nNumEnd = i;
-}
-}
+i--;
+bool isDigit = rCC.isDigit(rTxt, i);
+if (foundEnd)
+validNumber |= isDigit;
 
-if ( foundEnd && validNumber ) {
-sal_Int32 nNum = rTxt.copy( nSttPos, nNumEnd - nSttPos + 1 ).toInt32( 
);
+if (isDigit && !foundEnd)
+{
+foundEnd = true;
+nNumEnd = i;
+}
+}
 
-// Check if the characters after that number correspond to the ordinal 
suffix
-uno::Reference< i18n::XOrdinalSuffix > xOrdSuffix
-= i18n::OrdinalSuffix::create( 
comphelper::getProcessComponentContext() );
+if (foundEnd && validNumber) {
+sal_Int32 nNum = rTxt.copy(nSttPos, nNumEnd - nSttPos + 
1).toInt32();
 
-uno::Sequence< OUString > aSuffixes = xOrdSuffix->getOrdinalSuffix( 
nNum, rCC.getLanguageTag().getLocale( ) );
-for ( sal_Int32 nSuff = 0; nSuff < aSuffixes.getLength(); nSuff++ )
-{
-OUString sSuffix( aSuffixes[ nSuff ] );
-OUString sEnd = rTxt.copy( nNumEnd + 1, nEndPos - nNumEnd - 1 );
+// Check if the characters after that number correspond to the 
ordinal suffix
+uno::Reference< i18n::XOrdinalSuffix > xOrdSuffix
+= 
i18n::OrdinalSuffix::create(comphelper::getProcessComponentContext());
 
-if ( sSuffix == sEnd )
+uno::Sequence< OUString > aSuffixes = 
xOrdSuffix->getOrdinalSuffix(nNum, rCC.getLanguageTag().getLocale());
+for (sal_Int32 nSuff = 0; nSuff < aSuffixes.getLength(); nSuff++)
 {
-// Check if the ordinal suffix has to be set as super script
-if ( rCC.isLetter( sSuffix ) )
+OUString sSuffix(aSuffixes[nSuf

[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - editeng/source

2015-03-23 Thread Niklas Johansson
 editeng/source/misc/svxacorr.cxx |  108 +--
 1 file changed, 59 insertions(+), 49 deletions(-)

New commits:
commit 10e72e7adaac82882ba6bb892dda7c7640e3e293
Author: Niklas Johansson 
Date:   Thu Mar 19 20:30:41 2015 +0100

tdf#89437  Ordinal suffix should never be superscript in some languages

Printing ordinal suffixes as superscript is just not done in Swedish and
likely a few other languages but this change only cares for Swedish at
the moment.

Change-Id: Ib7600ceb0534793d900f13b2740e63c1f7f34ba9
Reviewed-on: https://gerrit.libreoffice.org/14913
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 307c25fe460857c52f0b9c2078e83f6d12f8bdc9)
Reviewed-on: https://gerrit.libreoffice.org/14956

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 64118ac..a5dbf25 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -439,69 +439,79 @@ bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, 
const OUString& rTxt,
 
 
 bool SvxAutoCorrect::FnChgOrdinalNumber(
-SvxAutoCorrDoc& rDoc, const OUString& rTxt,
-sal_Int32 nSttPos, sal_Int32 nEndPos,
-LanguageType eLang )
+SvxAutoCorrDoc& rDoc, const OUString& rTxt,
+sal_Int32 nSttPos, sal_Int32 nEndPos,
+LanguageType eLang)
 {
-// 1st, 2nd, 3rd, 4 - 0th
-// 201th or 201st
-// 12th or 12nd
-CharClass& rCC = GetCharClass( eLang );
+// 1st, 2nd, 3rd, 4 - 0th
+// 201th or 201st
+// 12th or 12nd
 bool bChg = false;
 
-for( ; nSttPos < nEndPos; ++nSttPos )
-if( !lcl_IsInAsciiArr( sImplSttSkipChars, rTxt[ nSttPos ] ))
-break;
-for( ; nSttPos < nEndPos; --nEndPos )
-if( !lcl_IsInAsciiArr( sImplEndSkipChars, rTxt[ nEndPos - 1 ] ))
-break;
+// In some languages ordinal suffixes should never be
+// changed to superscript. Let's break for those languages.
+switch (eLang)
+{
+case LANGUAGE_SWEDISH:
+case LANGUAGE_SWEDISH_FINLAND:
+break;
+default:
+CharClass& rCC = GetCharClass(eLang);
 
+for (; nSttPos < nEndPos; ++nSttPos)
+if (!lcl_IsInAsciiArr(sImplSttSkipChars, rTxt[nSttPos]))
+break;
+for (; nSttPos < nEndPos; --nEndPos)
+if (!lcl_IsInAsciiArr(sImplEndSkipChars, rTxt[nEndPos - 1]))
+break;
 
-// Get the last number in the string to check
-sal_Int32 nNumEnd = nEndPos;
-bool foundEnd = false;
-bool validNumber = true;
-sal_Int32 i = nEndPos;
 
-while ( i > nSttPos )
-{
-i--;
-bool isDigit = rCC.isDigit( rTxt, i );
-if ( foundEnd )
-validNumber |= isDigit;
+// Get the last number in the string to check
+sal_Int32 nNumEnd = nEndPos;
+bool foundEnd = false;
+bool validNumber = true;
+sal_Int32 i = nEndPos;
 
-if ( isDigit && !foundEnd )
+while (i > nSttPos)
 {
-foundEnd = true;
-nNumEnd = i;
-}
-}
+i--;
+bool isDigit = rCC.isDigit(rTxt, i);
+if (foundEnd)
+validNumber |= isDigit;
 
-if ( foundEnd && validNumber ) {
-sal_Int32 nNum = rTxt.copy( nSttPos, nNumEnd - nSttPos + 1 ).toInt32( 
);
+if (isDigit && !foundEnd)
+{
+foundEnd = true;
+nNumEnd = i;
+}
+}
 
-// Check if the characters after that number correspond to the ordinal 
suffix
-uno::Reference< i18n::XOrdinalSuffix > xOrdSuffix
-= i18n::OrdinalSuffix::create( 
comphelper::getProcessComponentContext() );
+if (foundEnd && validNumber) {
+sal_Int32 nNum = rTxt.copy(nSttPos, nNumEnd - nSttPos + 
1).toInt32();
 
-uno::Sequence< OUString > aSuffixes = xOrdSuffix->getOrdinalSuffix( 
nNum, rCC.getLanguageTag().getLocale( ) );
-for ( sal_Int32 nSuff = 0; nSuff < aSuffixes.getLength(); nSuff++ )
-{
-OUString sSuffix( aSuffixes[ nSuff ] );
-OUString sEnd = rTxt.copy( nNumEnd + 1, nEndPos - nNumEnd - 1 );
+// Check if the characters after that number correspond to the 
ordinal suffix
+uno::Reference< i18n::XOrdinalSuffix > xOrdSuffix
+= 
i18n::OrdinalSuffix::create(comphelper::getProcessComponentContext());
 
-if ( sSuffix == sEnd )
+uno::Sequence< OUString > aSuffixes = 
xOrdSuffix->getOrdinalSuffix(nNum, rCC.getLanguageTag().getLocale());
+for (sal_Int32 nSuff = 0; nSuff < aSuffixes.getLength(); nSuff++)
 {
-// Check if the ordinal suffi

[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - editeng/source

2015-03-23 Thread Niklas Johansson
 editeng/source/misc/svxacorr.cxx |  108 +--
 1 file changed, 59 insertions(+), 49 deletions(-)

New commits:
commit c3979944ced7075e9851a69a93fa41d6680bff80
Author: Niklas Johansson 
Date:   Thu Mar 19 20:30:41 2015 +0100

tdf#89437  Ordinal suffix should never be superscript in some languages

Printing ordinal suffixes as superscript is just not done in Swedish and
likely a few other languages but this change only cares for Swedish at
the moment.

Change-Id: Ib7600ceb0534793d900f13b2740e63c1f7f34ba9
Reviewed-on: https://gerrit.libreoffice.org/14913
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 307c25fe460857c52f0b9c2078e83f6d12f8bdc9)
Reviewed-on: https://gerrit.libreoffice.org/14967

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 4745c0b..608ae61 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -436,69 +436,79 @@ bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, 
const OUString& rTxt,
 
 
 bool SvxAutoCorrect::FnChgOrdinalNumber(
-SvxAutoCorrDoc& rDoc, const OUString& rTxt,
-sal_Int32 nSttPos, sal_Int32 nEndPos,
-LanguageType eLang )
+SvxAutoCorrDoc& rDoc, const OUString& rTxt,
+sal_Int32 nSttPos, sal_Int32 nEndPos,
+LanguageType eLang)
 {
-// 1st, 2nd, 3rd, 4 - 0th
-// 201th or 201st
-// 12th or 12nd
-CharClass& rCC = GetCharClass( eLang );
+// 1st, 2nd, 3rd, 4 - 0th
+// 201th or 201st
+// 12th or 12nd
 bool bChg = false;
 
-for( ; nSttPos < nEndPos; ++nSttPos )
-if( !lcl_IsInAsciiArr( sImplSttSkipChars, rTxt[ nSttPos ] ))
-break;
-for( ; nSttPos < nEndPos; --nEndPos )
-if( !lcl_IsInAsciiArr( sImplEndSkipChars, rTxt[ nEndPos - 1 ] ))
-break;
+// In some languages ordinal suffixes should never be
+// changed to superscript. Let's break for those languages.
+switch (eLang)
+{
+case LANGUAGE_SWEDISH:
+case LANGUAGE_SWEDISH_FINLAND:
+break;
+default:
+CharClass& rCC = GetCharClass(eLang);
 
+for (; nSttPos < nEndPos; ++nSttPos)
+if (!lcl_IsInAsciiArr(sImplSttSkipChars, rTxt[nSttPos]))
+break;
+for (; nSttPos < nEndPos; --nEndPos)
+if (!lcl_IsInAsciiArr(sImplEndSkipChars, rTxt[nEndPos - 1]))
+break;
 
-// Get the last number in the string to check
-sal_Int32 nNumEnd = nEndPos;
-bool foundEnd = false;
-bool validNumber = true;
-sal_Int32 i = nEndPos;
 
-while ( i > nSttPos )
-{
-i--;
-bool isDigit = rCC.isDigit( rTxt, i );
-if ( foundEnd )
-validNumber |= isDigit;
+// Get the last number in the string to check
+sal_Int32 nNumEnd = nEndPos;
+bool foundEnd = false;
+bool validNumber = true;
+sal_Int32 i = nEndPos;
 
-if ( isDigit && !foundEnd )
+while (i > nSttPos)
 {
-foundEnd = true;
-nNumEnd = i;
-}
-}
+i--;
+bool isDigit = rCC.isDigit(rTxt, i);
+if (foundEnd)
+validNumber |= isDigit;
 
-if ( foundEnd && validNumber ) {
-sal_Int32 nNum = rTxt.copy( nSttPos, nNumEnd - nSttPos + 1 ).toInt32( 
);
+if (isDigit && !foundEnd)
+{
+foundEnd = true;
+nNumEnd = i;
+}
+}
 
-// Check if the characters after that number correspond to the ordinal 
suffix
-uno::Reference< i18n::XOrdinalSuffix > xOrdSuffix
-= i18n::OrdinalSuffix::create( 
comphelper::getProcessComponentContext() );
+if (foundEnd && validNumber) {
+sal_Int32 nNum = rTxt.copy(nSttPos, nNumEnd - nSttPos + 
1).toInt32();
 
-uno::Sequence< OUString > aSuffixes = xOrdSuffix->getOrdinalSuffix( 
nNum, rCC.getLanguageTag().getLocale( ) );
-for ( sal_Int32 nSuff = 0; nSuff < aSuffixes.getLength(); nSuff++ )
-{
-OUString sSuffix( aSuffixes[ nSuff ] );
-OUString sEnd = rTxt.copy( nNumEnd + 1, nEndPos - nNumEnd - 1 );
+// Check if the characters after that number correspond to the 
ordinal suffix
+uno::Reference< i18n::XOrdinalSuffix > xOrdSuffix
+= 
i18n::OrdinalSuffix::create(comphelper::getProcessComponentContext());
 
-if ( sSuffix == sEnd )
+uno::Sequence< OUString > aSuffixes = 
xOrdSuffix->getOrdinalSuffix(nNum, rCC.getLanguageTag().getLocale());
+for (sal_Int32 nSuff = 0; nSuff < aSuffixes.getLength(); nSuff++)
 {
-// Check if the ordinal suffi

[Libreoffice-commits] core.git: 3 commits - comphelper/source filter/source helpcontent2 include/rtl oox/source sal/rtl sal/util toolkit/source vcl/source

2015-03-31 Thread Niklas Johansson
 comphelper/source/misc/docpasswordhelper.cxx |2 +-
 filter/source/msfilter/mscodec.cxx   |   10 +-
 helpcontent2 |2 +-
 include/rtl/alloc.h  |   19 ---
 oox/source/core/binarycodec.cxx  |6 +++---
 sal/rtl/alloc_cache.cxx  |   15 +++
 sal/rtl/alloc_global.cxx |2 +-
 sal/rtl/digest.cxx   |4 ++--
 sal/util/sal.map |5 +
 toolkit/source/awt/vclxwindow.cxx|5 +++--
 vcl/source/gdi/pdfwriter_impl2.cxx   |5 ++---
 11 files changed, 54 insertions(+), 21 deletions(-)

New commits:
commit 8f379ddf5ae945cfec85dced286de4cfa282fd77
Author: Niklas Johansson 
Date:   Tue Mar 31 14:02:45 2015 +0200

Updated core
Project: help  02143d13f587b3ce40834d709ca9c872ac907e13

tdf#89437 Add note, not all languages have autocorrection of ordinal 
suffixes

Not all languages have the convention of printing ordinal suffixes as 
superscript.
For English auto correction of 1st to 1^st can be correct in Swedish auto
correction of 1:a to 1^:a is just plain wrong and LibreOffice does not do 
it anymore
so lets add a short note about it in the help.

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

diff --git a/helpcontent2 b/helpcontent2
index b1178f9..02143d1 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit b1178f96fe29860b1d92c8c150d5169f96a964b2
+Subproject commit 02143d13f587b3ce40834d709ca9c872ac907e13
commit 2ec9d9dd81f3f4ee6785ba938f9a79395972b71e
Author: Caolán McNamara 
Date:   Tue Mar 31 13:36:37 2015 +0100

Resolves: tdf#90228 1.06 turns into a monster

Change-Id: I8ebb57fe8b94da2569593ffa7cf374cae64a846a

diff --git a/toolkit/source/awt/vclxwindow.cxx 
b/toolkit/source/awt/vclxwindow.cxx
index 5e53141..5886417 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -2331,8 +2331,9 @@ void VCLXWindow::setZoom( float fZoomX, float /*fZoomY*/ 
) throw(::com::sun::sta
 // The implicit conversion from float to double can result in a 
precision loss, i.e. 1.2 is converted to
 // 1.2047something. To prevent this, we convert explicitly to 
double, and round it.
 double nZoom( fZoomX );
-nZoom = ::rtl::math::round( nZoom, 4 );
-GetWindow()->SetZoom( Fraction( nZoom ) );
+Fraction aZoom(::rtl::math::round(nZoom, 4));
+aZoom.ReduceInaccurate(10); // to avoid runovers and BigInt mapping
+GetWindow()->SetZoom(aZoom);
 }
 }
 
commit 026b17b7d725109f586622755b435ded3673c43a
Author: Caolán McNamara 
Date:   Tue Mar 31 10:20:19 2015 +0100

V597: introduce a rtl_secureZeroMemory

Change-Id: Id28046eb318cd3b2ed0b813fd266617547cf6ee2

diff --git a/comphelper/source/misc/docpasswordhelper.cxx 
b/comphelper/source/misc/docpasswordhelper.cxx
index fdcb8a0..217a75e 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -341,7 +341,7 @@ Sequence< sal_Int8 > DocPasswordHelper::GetXLHashAsSequence(
 rtl_digest_rawMD5 ( hDigest, 
reinterpret_cast(aResultKey.getArray()), aResultKey.getLength() );
 
 // Erase KeyData array and leave.
-memset( pKeyData, 0, sizeof(pKeyData) );
+rtl_secureZeroMemory (pKeyData, sizeof(pKeyData));
 }
 
 return aResultKey;
diff --git a/filter/source/msfilter/mscodec.cxx 
b/filter/source/msfilter/mscodec.cxx
index 77c572e..260d191 100644
--- a/filter/source/msfilter/mscodec.cxx
+++ b/filter/source/msfilter/mscodec.cxx
@@ -373,8 +373,8 @@ bool MSCodec_Std97::VerifyKey (
 result = (memcmp (pBuffer, pDigest, sizeof(pDigest)) == 0);
 
 // Erase Buffer and Digest arrays.
-(void)memset (pBuffer, 0, sizeof(pBuffer));
-(void)memset (pDigest, 0, sizeof(pDigest));
+rtl_secureZeroMemory (pBuffer, sizeof(pBuffer));
+rtl_secureZeroMemory (pDigest, sizeof(pDigest));
 }
 
 return result;
@@ -412,7 +412,7 @@ bool MSCodec_Std97::InitCipher (sal_uInt32 nCounter)
 pKeyData, RTL_DIGEST_LENGTH_MD5, 0, 0);
 
 // Erase KeyData array and leave.
-(void)memset (pKeyData, 0, sizeof(pKeyData));
+rtl_secureZeroMemory (pKeyData, sizeof(pKeyData));
 
 return (result == rtl_Cipher_E_None);
 }
@@ -532,8 +532,8 @@ void MSCodec_Std97::GetEncryptKey (
 rtl_cipher_encode (
 m_hCipher, pDigest, 16, pSaltDigest, 16);
 
-(void)memset (pBuffer, 0, sizeof(pBuffer));
-(void)memset (pDigest, 0, sizeof(pDigest));
+rtl_secureZeroMemory (pBuffer, sizeof(pBuffer));
+rtl_secureZeroMemory (pDigest, sizeof(pDigest));
 }
 }
 
diff --git a/include/rtl/alloc

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

2015-03-31 Thread Niklas Johansson
 source/text/shared/01/06040400.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 02143d13f587b3ce40834d709ca9c872ac907e13
Author: Niklas Johansson 
Date:   Tue Mar 31 14:02:45 2015 +0200

tdf#89437 Add note, not all languages have autocorrection of ordinal 
suffixes

Not all languages have the convention of printing ordinal suffixes as 
superscript.
For English auto correction of 1st to 1^st can be correct in Swedish auto
correction of 1:a to 1^:a is just plain wrong and LibreOffice does not do 
it anymore
so lets add a short note about it in the help.

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

diff --git a/source/text/shared/01/06040400.xhp 
b/source/text/shared/01/06040400.xhp
index fcaf3bb..30ec163 100644
--- a/source/text/shared/01/06040400.xhp
+++ b/source/text/shared/01/06040400.xhp
@@ -52,7 +52,7 @@
 moved two paras from 06040100.xhp, cws cbosdo01
 Format ordinal number suffixes (1st ... 
1st)
 Formats the text characters of ordinals, such as 1st, 2nd, or 3rd, 
as superscripts. For example, in English text, 1st will be converted to 
1st.
-
+Note that this only applies to languages that have the convention 
of formatting ordinal numbers as superscript.
 
 Single quotes / Double quotes
 Specify the replacement characters to use for single or double 
quotation marks.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-05-07 Thread Niklas Johansson
 sfx2/source/sidebar/TabBar.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 0fc79344ce5e057f7c2258a0fe16374fe510745f
Author: Niklas Johansson 
Date:   Tue May 5 22:28:04 2015 +0200

tdf#90994 Sidebar tab bar buttons should should have accessible names

The tab bar buttons (Properties, Styles and formatting, Gallery ...)
should expose their name to accessibility tools.

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

diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 8a474c7..d40d3cb 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -262,6 +262,8 @@ bool TabBar::Notify (NotifyEvent&)
 VclPtr TabBar::CreateTabItem (const DeckDescriptor& 
rDeckDescriptor)
 {
 VclPtr pItem = ControlFactory::CreateTabItem(this);
+pItem->SetAccessibleName(rDeckDescriptor.msTitle);
+pItem->SetAccessibleDescription(rDeckDescriptor.msHelpText);
 pItem->SetHelpText(rDeckDescriptor.msHelpText);
 pItem->SetQuickHelpText(rDeckDescriptor.msHelpText);
 return pItem;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-05-07 Thread Niklas Johansson
 sfx2/source/sidebar/PanelTitleBar.cxx |8 +++-
 sfx2/source/sidebar/PanelTitleBar.hxx |1 -
 sfx2/source/sidebar/Sidebar.hrc   |1 -
 sfx2/source/sidebar/Sidebar.src   |4 
 4 files changed, 3 insertions(+), 11 deletions(-)

New commits:
commit b4d7f8248496610a508b8edbcd57b9875e68bd81
Author: Niklas Johansson 
Date:   Tue May 5 13:52:15 2015 +0200

tdf#90994 The accessible name should not contain the accessible role

The accessible role (PANEL) is added as a prefix to the title bar
in the sidebar. That is redundant and can even make things confusing
for the users of screen-readers.

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

diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx 
b/sfx2/source/sidebar/PanelTitleBar.cxx
index f526c02..8a4313e 100644
--- a/sfx2/source/sidebar/PanelTitleBar.cxx
+++ b/sfx2/source/sidebar/PanelTitleBar.cxx
@@ -48,8 +48,7 @@ PanelTitleBar::PanelTitleBar (
   mpPanel(pPanel),
   mnMenuItemIndex(1),
   mxFrame(),
-  msMoreOptionsCommand(),
-  
msAccessibleNamePrefix(SFX2_RESSTR(SFX_STR_SIDEBAR_ACCESSIBILITY_PANEL_PREFIX))
+  msMoreOptionsCommand()
 {
 OSL_ASSERT(mpPanel != nullptr);
 
@@ -168,9 +167,8 @@ void PanelTitleBar::HandleToolBoxItemClick (const 
sal_uInt16 nItemIndex)
 
 Reference PanelTitleBar::CreateAccessible()
 {
-const ::rtl::OUString sAccessibleName(msAccessibleNamePrefix + msTitle);
-SetAccessibleName(sAccessibleName);
-SetAccessibleDescription(sAccessibleName);
+SetAccessibleName(msTitle);
+SetAccessibleDescription(msTitle);
 return TitleBar::CreateAccessible();
 }
 
diff --git a/sfx2/source/sidebar/PanelTitleBar.hxx 
b/sfx2/source/sidebar/PanelTitleBar.hxx
index ede039f..3a00cf7 100644
--- a/sfx2/source/sidebar/PanelTitleBar.hxx
+++ b/sfx2/source/sidebar/PanelTitleBar.hxx
@@ -61,7 +61,6 @@ private:
 const sal_uInt16 mnMenuItemIndex;
 css::uno::Reference mxFrame;
 ::rtl::OUString msMoreOptionsCommand;
-::rtl::OUString msAccessibleNamePrefix;
 };
 
 } } // end of namespace sfx2::sidebar
diff --git a/sfx2/source/sidebar/Sidebar.hrc b/sfx2/source/sidebar/Sidebar.hrc
index a351c1e..8f62aec 100644
--- a/sfx2/source/sidebar/Sidebar.hrc
+++ b/sfx2/source/sidebar/Sidebar.hrc
@@ -56,6 +56,5 @@
 
 #define SFX_STR_SIDEBAR_MORE_OPTIONS(RID_SFX_SIDEBAR_START +  
1)
 #define SFX_STR_SIDEBAR_CLOSE_DECK  (RID_SFX_SIDEBAR_START +  
2)
-#define SFX_STR_SIDEBAR_ACCESSIBILITY_PANEL_PREFIX  (RID_SFX_SIDEBAR_START +  
3)
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/sidebar/Sidebar.src b/sfx2/source/sidebar/Sidebar.src
index eaa55c0..a929dc5 100644
--- a/sfx2/source/sidebar/Sidebar.src
+++ b/sfx2/source/sidebar/Sidebar.src
@@ -170,9 +170,5 @@ String SFX_STR_SIDEBAR_CLOSE_DECK
 Text [en-US] = "Close Sidebar Deck";
 };
 
-String SFX_STR_SIDEBAR_ACCESSIBILITY_PANEL_PREFIX
-{
-Text [en-US] = "Panel: ";
-};
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Inserting Graphics in a Writer document

2015-04-15 Thread Niklas Johansson
If I were you I would set the Anchor before I insert the image into the 
document. So change the order of these lines:


xText.insertTextContent(cursor, oGraphic, False)
# Setting the anchor type - must be done first, otherwise the graphic will 
be put after the //
oGraphic.AnchorType = AS_CHARACTER

Once the image is inserted into the document you won't always be able to 
change the anchor as you try to do in the code above. For some reason it 
works in your first example but as you can see it won't work in your 
second example.


So remember to always change the anchor of the graphic before you insert 
it otherwise you'll get more of these nice surprises. If I remember 
correctly there are a few more settings that should be done to the 
graphic object before it's inserted and some that needs to be set after, 
but I don't remember the details at the moment.


It seems that what is happening in the second case is that the image 
gets inserted before the anchor-change and when the re-anchoring occurs 
the image is already in the wrong position.


Regards,
Niklas Johansson

Piet van Oostrum skrev den 2015-04-15 16:00:

Hello,

I am in the process of converting several Java LO programming examples to 
Python. My plan is to do all (or most) of them. Also I try to extend them. 
However I encountered some surprises.

I converted LibreOffice4.4_SDK/examples/java/Text/GraphicsInserter.java which 
inserts a graphic image in a new Writer document. Works without problems.

Then I decided to add some text also, and put the picture in the middle of the 
text.

The code goes like this:

 # Create a new Writer document, which will be automatically displayed
 doc = Desktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, 
())

 # Getting the text
 xText = doc.getText()

 # Getting a cursor on the document
 xTextCursor = xText.createTextCursor()

 # Inserting some text
 xText.insertString(xTextCursor, "This is the first paragraph.", False)
 xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
 xText.insertString(xTextCursor, "Some text before the graphic. ", False)

 # Insert the graphic
 insertGraphic(doc, xText, xTextCursor, sUrl)

 # Inserting some more text
 xText.insertString(xTextCursor, "Some text after the graphic.", False)
 xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
 xText.insertString(xTextCursor, "This is the second paragraph.", False)

def insertGraphic(doc, xText, cursor, sUrl):
 oGraphic = doc.createInstance("com.sun.star.text.TextGraphicObject")
 xText.insertString(cursor, "++", False)
 # Insert graphic between ++ and //
 xText.insertTextContent(cursor, oGraphic, False)
 # Setting the anchor type - must be done first, otherwise the graphic will 
be put after the //
 oGraphic.AnchorType = AS_CHARACTER
 xText.insertString(cursor, "//", False)
 # Setting the graphic url
 oGraphic.GraphicURL = sUrl

 # Setting the width and height
 oGraphic.Width = 2000
 oGraphic.Height = 2000

The image is inserted in the middle of a paragraph and surrounded by ++ and // 
to indicate where it should be. This also works without problems.

Then I decided to change the order. First I insert all text; then I go back to 
the insertion point and insert the image. To my surprise the image ended up a 
couple of words later in the text

The insertion code is then:

 # Inserting some text
 xText.insertString(xTextCursor, "This is the first paragraph.", False)
 xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
 xText.insertString(xTextCursor, "Some text before the graphic. ", False)

 # Inserting some more text
 xText.insertString(xTextCursor, "Some text after the graphic.", False)
 xText.insertControlCharacter(xTextCursor, PARAGRAPH_BREAK, False)
 xText.insertString(xTextCursor, "This is the second paragraph.", False)

 # Move the cursor
 xTextCursor.gotoPreviousParagraph(False)
 xTextCursor.gotoNextSentence(False)
 
 # Insert the graphic

 insertGraphic(doc, xText, xTextCursor, sUrl)

Now I would expect ++Image// to be found just before "Some text after the graphic." 
However the ++// is indeed inserted there, but the image appears after "Some text after 
the", 4 words later. The image is indeed anchored to this position, as I can see when I 
manually insert some more text before it. So it is not a matter of an offset.

I have also tried to create another cursor with the endpoint of xTextCursor 
between the two sentences, and then use this to insert the graphic but that 
doesn't help.

Does anybody know what is happening here?


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


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

2015-04-21 Thread Niklas Johansson
 sw/source/core/layout/atrfrm.cxx |   20 ++--
 1 file changed, 14 insertions(+), 6 deletions(-)

New commits:
commit 7e1d81cc9c8677a19f1f5f1adabbe23794828a3a
Author: Niklas Johansson 
Date:   Wed Apr 8 01:33:09 2015 +0200

tdf#39547 Image title/description is lost after changing anchor

This issue has been present for a long time, at least since 2010.
When the old frames are deleted the SdrObjPlusData that holds the
title and description is deleted as well never to be transferred
to the re-anchored object.

Some types of frames only have the msTitle and msDesc so let's
keep them updated and also use them to transfer the strings in
question to the new SdrObjPlusData object.

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

diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 7f47dd7..dda591b 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3029,6 +3029,8 @@ void SwFlyFrmFmt::MakeFrms()
 break;
 }
 pFrm->AppendFly( pFly );
+pFly->GetFmt()->SetObjTitle(GetObjTitle());
+pFly->GetFmt()->SetObjDescription(GetObjDescription());
 SwPageFrm *pPage = pFly->FindPageFrm();
 if( pPage )
 ::RegistFlys( pPage, pFly );
@@ -3080,6 +3082,7 @@ void SwFlyFrmFmt::SetObjTitle( const OUString& rTitle, 
bool bBroadcast )
 {
 SdrObject* pMasterObject = FindSdrObject();
 OSL_ENSURE( pMasterObject, " - missing 
 instance" );
+msTitle = rTitle;
 if ( !pMasterObject )
 {
 return;
@@ -3104,16 +3107,19 @@ OUString SwFlyFrmFmt::GetObjTitle() const
 OSL_ENSURE( pMasterObject, " - missing 
 instance" );
 if ( !pMasterObject )
 {
-return OUString();
+return msTitle;
 }
-
-return pMasterObject->GetTitle();
+if (!pMasterObject->GetTitle().isEmpty())
+return pMasterObject->GetTitle();
+else
+return msTitle;
 }
 
 void SwFlyFrmFmt::SetObjDescription( const OUString& rDescription, bool 
bBroadcast )
 {
 SdrObject* pMasterObject = FindSdrObject();
 OSL_ENSURE( pMasterObject, " - missing 
 instance" );
+msDesc = rDescription;
 if ( !pMasterObject )
 {
 return;
@@ -3138,10 +3144,12 @@ OUString SwFlyFrmFmt::GetObjDescription() const
 OSL_ENSURE( pMasterObject, " - missing 
 instance" );
 if ( !pMasterObject )
 {
-return OUString();
+return msDesc;
 }
-
-return pMasterObject->GetDescription();
+if (!pMasterObject->GetDescription().isEmpty())
+return pMasterObject->GetDescription();
+else
+return msDesc;
 }
 
 /** SwFlyFrmFmt::IsBackgroundTransparent - for #99657#
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sc/source

2014-09-25 Thread Niklas Johansson
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit cc803df1a94bf572bd14ff5402ccbad5674c9bef
Author: Niklas Johansson 
Date:   Mon Sep 15 08:57:01 2014 +0200

fdo#81264 Calc is not accessible to screen readers if sheet is modified 
[a11y]

When the IA2 changes was merged it removed the call to CommitFocusGained
and thereby stopped sending a STATE_CHANGED FOCUSED. A big thank you to
Joanmarie Diggs for noticing the lack of that event.

I tested the patch on Fedora, Windows and Mac. At a quick glance Windows 
and Mac seem unaffected by the patch but Fedora and Orca seem to require the 
added event.

Change-Id: Ic616d1b367ad8b8ed5d243e0ba124764082e96f1
Reviewed-on: https://gerrit.libreoffice.org/11451
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 93410b5ba13749cf3663d3d696fe1a14474bf696)
Reviewed-on: https://gerrit.libreoffice.org/11544
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx 
b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 6d26093..6cb8118 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -362,6 +362,7 @@ void ScAccessibleSpreadsheet::LostFocus()
 
 void ScAccessibleSpreadsheet::GotFocus()
 {
+CommitFocusGained();
 AccessibleEventObject aEvent;
 aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED;
 aEvent.Source = uno::Reference< XAccessibleContext >(this);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/84/3284/4'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/84/3284/3'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/33/9833/1'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/33/9833/2'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/82/8682/1'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/84/3284/1'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/56/10956/3'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/82/8682/2'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/84/3284/2'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/44/11544/3'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/37/7837/1'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/37/7837/3'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/89/6589/2'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/10/11310/2'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/51/8851/2'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/37/7837/2'

2014-09-29 Thread Niklas Johansson

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: IAccessible2 bridgecomponent context fails

2014-10-27 Thread Niklas Johansson

Hi Stephan

Thank you for the reply.

Stephan Bergmann skrev 2014-10-27 16:03:
in postprocess/Rdb_services.mk no longer holds for you---wasn't there 
some recent change to how configure.ac sets up DISABLE_ATL?
Ah, thanks for the hint. I haven't had a chance to test it yet but the 
commit [1] "disable atl and activex be default if a Visual Studio 
Express is detected" seems very likely to be what is giving me trouble. 
I do have an Express version installed on the same machine so it 
probably picks that one up and disables ATL.


Will build with --enable-atl and keep my fingers crossed, might take me 
a day or to but I'll let you know how it goes.


Thanks,
Niklas Johansson

[1] 
http://cgit.freedesktop.org/libreoffice/core/commit/configure.ac?id=1744fed4a455a85d948507d91af1f2e186046851

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


Re: IAccessible2 bridgecomponent context fails

2014-10-28 Thread Niklas Johansson
--enable-atl did the trick, I now have working IAccessible2 support in 
my builds again.


Thanks again,
Niklas

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


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

2014-11-06 Thread Niklas Johansson
 winaccessibility/source/service/AccObjectWinManager.cxx |   16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

New commits:
commit a1a9f0e5c4f7d7331072854250a7eb9046e4f111
Author: Niklas Johansson 
Date:   Wed Nov 5 09:44:24 2014 +0100

fdo#81264 Accessiblitiy focus not tracked for cells in Calc

When the accessibility roles for DOCUMENT_SPREADSHEET etc. was introduced
the following places in Windows specific files where not updated to take
these new roles into account. This patch should hopefully fix that. As a
side effect the initial code for tracking cell movement in Calc works again.
Well at least as well as it did before the change, there are still some
quirks left to fix.

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

diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx 
b/winaccessibility/source/service/AccObjectWinManager.cxx
index d8ea5d4..93f1cbb 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -545,7 +545,10 @@ void AccObjectWinManager::DeleteAccObj( XAccessible* pXAcc 
)
 size_t i = XResIdAccList.erase(accObj.GetResID());
 assert(i != 0);
 DeleteFromHwndXAcc(pXAcc);
-if (DOCUMENT == accObj.GetRole())
+if( accObj.GetRole() == DOCUMENT ||
+accObj.GetRole() == DOCUMENT_PRESENTATION ||
+accObj.GetRole() == DOCUMENT_SPREADSHEET ||
+accObj.GetRole() == DOCUMENT_TEXT )
 {
 XHWNDDocList.erase(accObj.GetParentHWND());
 }
@@ -707,7 +710,10 @@ sal_Bool AccObjectWinManager::InsertAccObj( XAccessible* 
pXAcc,XAccessible* pPar
 pObj.SetParentHWND( pWnd );
 
 //for file name support
-if ( pObj.GetRole() == DOCUMENT )
+if( pObj.GetRole() == DOCUMENT ||
+pObj.GetRole() == DOCUMENT_PRESENTATION ||
+pObj.GetRole() == DOCUMENT_SPREADSHEET ||
+pObj.GetRole() == DOCUMENT_TEXT )
 {
 XHWNDToDocumentHash::iterator aIter = XHWNDDocList.find(pWnd);
 if ( aIter != XHWNDDocList.end() )
@@ -790,6 +796,9 @@ AccObjectWinManager::CreateAccEventListener(XAccessible* 
pXAcc)
 case /*AccessibleRole::*/CANVAS:
 case /*AccessibleRole::*/COMBO_BOX:
 case /*AccessibleRole::*/DOCUMENT:
+case /*AccessibleRole::*/DOCUMENT_PRESENTATION:
+case /*AccessibleRole::*/DOCUMENT_SPREADSHEET:
+case /*AccessibleRole::*/DOCUMENT_TEXT:
 case /*AccessibleRole::*/END_NOTE:
 case /*AccessibleRole::*/FILLER:
 case /*AccessibleRole::*/FOOTNOTE:
@@ -1034,6 +1043,9 @@ sal_Bool AccObjectWinManager::IsContainer(XAccessible* 
pAccessible)
 case /*AccessibleRole::*/CANVAS:
 case /*AccessibleRole::*/COMBO_BOX:
 case /*AccessibleRole::*/DOCUMENT:
+case /*AccessibleRole::*/DOCUMENT_PRESENTATION:
+case /*AccessibleRole::*/DOCUMENT_SPREADSHEET:
+case /*AccessibleRole::*/DOCUMENT_TEXT:
 case /*AccessibleRole::*/EMBEDDED_OBJECT:
 case /*AccessibleRole::*/END_NOTE:
 case /*AccessibleRole::*/FILLER:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - winaccessibility/source

2014-11-07 Thread Niklas Johansson
 winaccessibility/source/service/AccObjectWinManager.cxx |   16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 162535ded77633a07871be917b719861bcaf9f43
Author: Niklas Johansson 
Date:   Wed Nov 5 09:44:24 2014 +0100

fdo#81264 Accessiblitiy focus not tracked for cells in Calc

When the accessibility roles for DOCUMENT_SPREADSHEET etc. was introduced
the following places in Windows specific files where not updated to take
these new roles into account. This patch should hopefully fix that. As a
side effect the initial code for tracking cell movement in Calc works again.
Well at least as well as it did before the change, there are still some
quirks left to fix.

Change-Id: If3cacdc27a73c4cee85b1450c406d490bd741456
Reviewed-on: https://gerrit.libreoffice.org/12261
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit a1a9f0e5c4f7d7331072854250a7eb9046e4f111)
Reviewed-on: https://gerrit.libreoffice.org/12298
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx 
b/winaccessibility/source/service/AccObjectWinManager.cxx
index 32c155e..f257541 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -548,7 +548,10 @@ void AccObjectWinManager::DeleteAccObj( XAccessible* pXAcc 
)
 size_t i = XResIdAccList.erase(accObj.GetResID());
 assert(i != 0);
 DeleteFromHwndXAcc(pXAcc);
-if (DOCUMENT == accObj.GetRole())
+if( accObj.GetRole() == DOCUMENT ||
+accObj.GetRole() == DOCUMENT_PRESENTATION ||
+accObj.GetRole() == DOCUMENT_SPREADSHEET ||
+accObj.GetRole() == DOCUMENT_TEXT )
 {
 XHWNDDocList.erase(accObj.GetParentHWND());
 }
@@ -710,7 +713,10 @@ sal_Bool AccObjectWinManager::InsertAccObj( XAccessible* 
pXAcc,XAccessible* pPar
 pObj.SetParentHWND( pWnd );
 
 //for file name support
-if ( pObj.GetRole() == DOCUMENT )
+if( pObj.GetRole() == DOCUMENT ||
+pObj.GetRole() == DOCUMENT_PRESENTATION ||
+pObj.GetRole() == DOCUMENT_SPREADSHEET ||
+pObj.GetRole() == DOCUMENT_TEXT )
 {
 XHWNDToDocumentHash::iterator aIter = XHWNDDocList.find(pWnd);
 if ( aIter != XHWNDDocList.end() )
@@ -793,6 +799,9 @@ AccObjectWinManager::CreateAccEventListener(XAccessible* 
pXAcc)
 case /*AccessibleRole::*/CANVAS:
 case /*AccessibleRole::*/COMBO_BOX:
 case /*AccessibleRole::*/DOCUMENT:
+case /*AccessibleRole::*/DOCUMENT_PRESENTATION:
+case /*AccessibleRole::*/DOCUMENT_SPREADSHEET:
+case /*AccessibleRole::*/DOCUMENT_TEXT:
 case /*AccessibleRole::*/END_NOTE:
 case /*AccessibleRole::*/FILLER:
 case /*AccessibleRole::*/FOOTNOTE:
@@ -1037,6 +1046,9 @@ sal_Bool AccObjectWinManager::IsContainer(XAccessible* 
pAccessible)
 case /*AccessibleRole::*/CANVAS:
 case /*AccessibleRole::*/COMBO_BOX:
 case /*AccessibleRole::*/DOCUMENT:
+case /*AccessibleRole::*/DOCUMENT_PRESENTATION:
+case /*AccessibleRole::*/DOCUMENT_SPREADSHEET:
+case /*AccessibleRole::*/DOCUMENT_TEXT:
 case /*AccessibleRole::*/EMBEDDED_OBJECT:
 case /*AccessibleRole::*/END_NOTE:
 case /*AccessibleRole::*/FILLER:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - winaccessibility/source

2014-11-07 Thread Niklas Johansson
 winaccessibility/source/service/AccObject.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a148f119c7f6fe758f9bf8905ac12c646d934a52
Author: Niklas Johansson 
Date:   Thu Oct 16 12:14:15 2014 +0200

fdo#74441 [Accessiblity] Don't expose 0 for empty cells in Calc

At the moment non numercial cells in Calc is exposed to AT tools
(screen readers etc) as the value 0. It makes more sence to present
the string value of the cell which basically is what a sighted user
will see. This small patch should be a good start into making
Calc more accessible on Windows.

Change-Id: Ide76f2dc044c98f32aa78836049f12f2251522eb
Reviewed-on: https://gerrit.libreoffice.org/11996
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 55eca9dbb34aec8c435da91c0748453e3e097f1e)
Reviewed-on: https://gerrit.libreoffice.org/12299
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/winaccessibility/source/service/AccObject.cxx 
b/winaccessibility/source/service/AccObject.cxx
index 63db986..3f957e1 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -392,6 +392,7 @@ void  AccObject::SetValue( Any pAny )
 case TEXT:
 case PARAGRAPH:
 case HEADING:
+case TABLE_CELL:
 
 if(pRText.get())
 {
@@ -402,7 +403,6 @@ void  AccObject::SetValue( Any pAny )
 case TREE_ITEM:
 //case CHECK_BOX:   //Commented by Li Xing to disable the value for 
general checkbox
 case COMBO_BOX:
-case TABLE_CELL:
 case NOTE:
 case SCROLL_BAR:
 m_pIMAcc->Put_XAccValue( GetMAccessibleValueFromAny(pAny).getStr() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/osx

2014-11-20 Thread Niklas Johansson
 vcl/osx/a11yrolehelper.mm   |2 +-
 vcl/osx/a11ywrapper.mm  |2 +-
 vcl/osx/a11ywrappergroup.mm |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit a669de9c151692a8c24929641a7c12617b1bf458
Author: Niklas Johansson 
Date:   Thu Nov 20 12:01:44 2014 +0100

[Accessibility] Make the sidebar a bit accessible

The accessibility of the sidebar is heavily built on PANEL's.
Since A11y on mac ignored panels it did not pan out well.
Also the title was removed from AXGroupRole but is needed
to announce the different panels of the sidebar.

This might have some unwanted effects on other parts of
LibreOffice since a lot of things are built up from
AccessibleRole::PANEL.

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

diff --git a/vcl/osx/a11yrolehelper.mm b/vcl/osx/a11yrolehelper.mm
index 45423db..8d14fc7 100644
--- a/vcl/osx/a11yrolehelper.mm
+++ b/vcl/osx/a11yrolehelper.mm
@@ -96,7 +96,7 @@ using namespace ::com::sun::star::uno;
 MAP( AccessibleRole::SEPARATOR, NSAccessibilitySplitterRole ); // FIXME
 MAP( AccessibleRole::SLIDER, NSAccessibilitySliderRole );
 MAP( AccessibleRole::SPIN_BOX, NSAccessibilityUnknownRole ); // FIXME
-MAP( AccessibleRole::SPLIT_PANE, NSAccessibilitySplitterRole );
+MAP( AccessibleRole::SPLIT_PANE, NSAccessibilitySplitGroupRole );
 MAP( AccessibleRole::STATUS_BAR, NSAccessibilityGroupRole ); // FIXME
 MAP( AccessibleRole::TABLE, NSAccessibilityTableRole );
 MAP( AccessibleRole::TABLE_CELL, NSAccessibilityTextFieldRole );
diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm
index 4e19e1d..aca05cb 100644
--- a/vcl/osx/a11ywrapper.mm
+++ b/vcl/osx/a11ywrapper.mm
@@ -718,7 +718,7 @@ static std::ostream &operator<<(std::ostream &s, NSPoint 
point) {
 BOOL ignored = NO;
 sal_Int16 nRole = [ self accessibleContext ] -> getAccessibleRole();
 switch ( nRole ) {
-case AccessibleRole::PANEL:
+//case AccessibleRole::PANEL:
 case AccessibleRole::FRAME:
 case AccessibleRole::ROOT_PANE:
 case AccessibleRole::SEPARATOR:
diff --git a/vcl/osx/a11ywrappergroup.mm b/vcl/osx/a11ywrappergroup.mm
index 3eb864f..04c17a2 100644
--- a/vcl/osx/a11ywrappergroup.mm
+++ b/vcl/osx/a11ywrappergroup.mm
@@ -34,7 +34,7 @@
 NSMutableArray * attributeNames = [ NSMutableArray arrayWithArray: [ super 
accessibilityAttributeNames ] ];
 // Special Attributes and removing unwanted attributes depending on role
 [ attributeNames removeObjectsInArray: [ NSArray arrayWithObjects:
-NSAccessibilityTitleAttribute, 
+// NSAccessibilityTitleAttribute,
 NSAccessibilityEnabledAttribute, 
 NSAccessibilitySelectedChildrenAttribute, 
 nil ]
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-17 Thread Niklas Johansson
 winaccessibility/source/service/AccObject.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 55eca9dbb34aec8c435da91c0748453e3e097f1e
Author: Niklas Johansson 
Date:   Thu Oct 16 12:14:15 2014 +0200

fdo#74441 [Accessiblity] Don't expose 0 for empty cells in Calc

At the moment non numercial cells in Calc is exposed to AT tools
(screen readers etc) as the value 0. It makes more sence to present
the string value of the cell which basically is what a sighted user
will see. This small patch should be a good start into making
Calc more accessible on Windows.

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

diff --git a/winaccessibility/source/service/AccObject.cxx 
b/winaccessibility/source/service/AccObject.cxx
index 47a25a2..180208d 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -390,6 +390,7 @@ void  AccObject::SetValue( Any pAny )
 case TEXT:
 case PARAGRAPH:
 case HEADING:
+case TABLE_CELL:
 
 if(pRText.get())
 {
@@ -400,7 +401,6 @@ void  AccObject::SetValue( Any pAny )
 case TREE_ITEM:
 //case CHECK_BOX:   //Commented by Li Xing to disable the value for 
general checkbox
 case COMBO_BOX:
-case TABLE_CELL:
 case NOTE:
 case SCROLL_BAR:
 m_pIMAcc->Put_XAccValue( GetMAccessibleValueFromAny(pAny).getStr() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-03-19 Thread Niklas Johansson
 sw/source/core/access/accpara.cxx |   59 --
 1 file changed, 59 deletions(-)

New commits:
commit 3fa4b0a00f78e940b32d546bac410890719502fd
Author: Niklas Johansson 
Date:   Fri Mar 14 15:39:30 2014 +0100

fdo#74983: Instability in A11y after integration of IA2-branch

The IA2-integration added some special cases for calculating textbounds for
attributeruns when automatic spellchecking is active. This does not seem to
effect linux but messes up accessibility on mac. This patch removes the 
special
cases avoids the problem on Mac. When daily builds gets available for 
Windows
I will do some testing there to see if I can find any problems.

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

diff --git a/sw/source/core/access/accpara.cxx 
b/sw/source/core/access/accpara.cxx
index 8ff2410..77817ec 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -916,65 +916,6 @@ sal_Bool SwAccessibleParagraph::GetTextBoundary(
 
 case AccessibleTextType::ATTRIBUTE_RUN:
 bRet = GetAttributeBoundary( rBound, rText, nPos );
-if(bRet)
-{
-SwCrsrShell* pCrsrShell = GetCrsrShell();
-if( pCrsrShell != NULL && pCrsrShell->GetViewOptions() && 
pCrsrShell->GetViewOptions()->IsOnlineSpell())
-{
-SwTxtNode* pTxtNode = const_cast( GetTxtNode() 
);
-if(pTxtNode)
-{
-const SwWrongList* pWrongList = pTxtNode->GetWrong();
-if( NULL != pWrongList )
-{
-sal_Int32 nBegin = nPos;
-sal_Int32 nLen = 1;
-const sal_Int32 nNext = 
pWrongList->NextWrong(nBegin);
-sal_Int32 nLast = 0;
-sal_uInt16 nWrongPos = pWrongList->GetWrongPos( 
nBegin );
-if ( nWrongPos >= pWrongList->Count() ||
- ( nLast = pWrongList->Pos( nWrongPos ) ) >= 
nBegin )
-{
-nLast = nWrongPos
-? pWrongList->Pos( --nWrongPos )
-: COMPLETE_STRING;
-}
-if ( nBegin > pWrongList->GetBeginInv() &&
- ( nLast == COMPLETE_STRING || nLast < 
pWrongList->GetEndInv() ) )
-{
-nLast = min(nBegin, pWrongList->GetEndInv());
-}
-else if ( nLast < COMPLETE_STRING )
-{
-nLast += pWrongList->Len( nWrongPos );
-}
-
-const bool bIn = pWrongList->InWrongWord(nBegin, 
nLen); // && !pTxtNode->IsSymbol(nBegin) )
-if(bIn)
-{
-rBound.startPos = max(nNext, rBound.startPos);
-rBound.endPos = min(nNext+nLen, rBound.endPos);
-}
-else
-{
-if (COMPLETE_STRING == nLast)//first
-{
-rBound.endPos = min(nNext, rBound.endPos);
-}
-else if(COMPLETE_STRING == nNext)
-{
-rBound.startPos = max(nLast, 
rBound.startPos);
-}
-else
-{
-rBound.startPos = max(nLast, 
rBound.startPos);
-rBound.endPos = min(nNext, rBound.endPos);
-}
-}
-}
-}
-}
-}
 break;
 
 case AccessibleTextType::GLYPH:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/osx

2014-03-21 Thread Niklas Johansson
 vcl/osx/a11yrolehelper.mm |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 44a6c8eed837ab5e82b9db5e8138a94bd161a4ea
Author: Niklas Johansson 
Date:   Thu Mar 20 18:27:39 2014 +0100

Improve Accessibility mapping of roles for Mac

Since role Heading now is exposed to A11y we need to give it a better role 
then
unknown, otherwise it gets inaccessible to VoiceOver. Until I get a better 
grip
on how to best expose AXHeading, let's map it to textAreaRole so we at least
get back to the behaviour before IA2 integration.
Header and Footer is probably best mapped to AXGroup.

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

diff --git a/vcl/osx/a11yrolehelper.mm b/vcl/osx/a11yrolehelper.mm
index ae2391f..45423db 100644
--- a/vcl/osx/a11yrolehelper.mm
+++ b/vcl/osx/a11yrolehelper.mm
@@ -59,14 +59,14 @@ using namespace ::com::sun::star::uno;
 MAP( AccessibleRole::FILE_CHOOSER, NSAccessibilityUnknownRole ); // 
FIXME
 MAP( AccessibleRole::FILLER, NSAccessibilityUnknownRole ); // FIXME
 MAP( AccessibleRole::FONT_CHOOSER, NSAccessibilityUnknownRole ); // 
FIXME
-MAP( AccessibleRole::FOOTER, NSAccessibilityUnknownRole ); // FIXME
+MAP( AccessibleRole::FOOTER, NSAccessibilityGroupRole ); // FIXME
 MAP( AccessibleRole::FOOTNOTE, NSAccessibilityUnknownRole ); // FIXME
 MAP( AccessibleRole::FRAME, NSAccessibilityWindowRole );
 MAP( AccessibleRole::GLASS_PANE, NSAccessibilityUnknownRole ); // FIXME
 MAP( AccessibleRole::GRAPHIC, NSAccessibilityImageRole );
 MAP( AccessibleRole::GROUP_BOX, NSAccessibilityGroupRole );
-MAP( AccessibleRole::HEADER, NSAccessibilityUnknownRole ); // FIXME
-MAP( AccessibleRole::HEADING, NSAccessibilityUnknownRole ); // FIXME
+MAP( AccessibleRole::HEADER, NSAccessibilityGroupRole ); // FIXME
+MAP( AccessibleRole::HEADING, NSAccessibilityTextAreaRole ); // FIXME
 MAP( AccessibleRole::HYPER_LINK, NSAccessibilityLinkRole );
 MAP( AccessibleRole::ICON, NSAccessibilityImageRole );
 MAP( AccessibleRole::INTERNAL_FRAME, NSAccessibilityUnknownRole ); // 
FIXME
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-03-25 Thread Niklas Johansson
 svx/source/accessibility/AccessibleShape.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit e5d7a360e68b1725ee28abc5c76db5c4023dce88
Author: Niklas Johansson 
Date:   Tue Mar 25 16:01:50 2014 +0100

Accessibility: Avoid immediate crash in Impress

When Accessibility is active Impress immediately crashes. We need to check 
that
mpParent isn't NULL before we try to call it's methods. This has been a
problem since at least commit 7ef4a5bd51c606c70661dd303ebd1eeaec0c3834.
I don't know if it is relevant to bring that back though.

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

diff --git a/svx/source/accessibility/AccessibleShape.cxx 
b/svx/source/accessibility/AccessibleShape.cxx
index 61bc65e..579c785 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -402,15 +402,18 @@ uno::Reference SAL_CALL
 throw (::com::sun::star::uno::RuntimeException, std::exception)
 {
 ::osl::MutexGuard aGuard (maMutex);
+if (mpParent == NULL)
+return uno::Reference();
+
 ::utl::AccessibleRelationSetHelper* pRelationSet = new 
utl::AccessibleRelationSetHelper;
 
-//this mxshape is the captioned shape, only for sw
+//this mxshape is the captioned shape
 uno::Sequence< uno::Reference< uno::XInterface > > aSequence(1);
 aSequence[0] = mpParent->GetAccessibleCaption(mxShape);
 if(aSequence[0].get())
 {
 pRelationSet->AddRelation(
-AccessibleRelation( AccessibleRelationType::DESCRIBED_BY, 
aSequence ) );
+  AccessibleRelation( 
AccessibleRelationType::DESCRIBED_BY, aSequence ) );
 }
 return uno::Reference(pRelationSet);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-04-04 Thread Niklas Johansson
 extras/source/autotext/lang/sv/acor/SentenceExceptList.xml |   21 +++--
 1 file changed, 19 insertions(+), 2 deletions(-)

New commits:
commit a3cdf77616684f65dac108beae9439fe6b1c9186
Author: Niklas Johansson 
Date:   Fri Apr 4 18:30:18 2014 +0200

Update Swedish abbreviations in SentenceExceptionsList

Adds a few Swedish abbreviations and replaces two wrong ones.

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

diff --git a/extras/source/autotext/lang/sv/acor/SentenceExceptList.xml 
b/extras/source/autotext/lang/sv/acor/SentenceExceptList.xml
index d67d614..41fdbf3 100644
--- a/extras/source/autotext/lang/sv/acor/SentenceExceptList.xml
+++ b/extras/source/autotext/lang/sv/acor/SentenceExceptList.xml
@@ -25,11 +25,14 @@
   
   
   
+  
+  
   
   
   
   
   
+  
   
   
   
@@ -44,12 +47,17 @@
   
   
   
+  
   
   
   
+  
   
   
   
+  
+  
+  
   
   
   
@@ -58,6 +66,7 @@
   
   
   
+  
   
   
   
@@ -68,6 +77,7 @@
   
   
   
+  
   
   
   
@@ -96,14 +106,18 @@
   
   
   
+  
   
   
   
   
   
+  
   
+  
   
   
+  
   
   
   
@@ -123,11 +137,13 @@
   
   
   
+  
   
   
   
   
   
+  
   
   
   
@@ -148,15 +164,16 @@
   
   
   
+  
   
   
   
-  
+  
   
   
   
   
   
-  
+  
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - vcl/unx

2015-01-16 Thread Niklas Johansson
 vcl/unx/gtk/a11y/atkwrapper.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 3bde8657f50b88268ffb2693cc298411fcead005
Author: Niklas Johansson 
Date:   Sun Jan 4 01:15:49 2015 +0100

fdo#86674 paragraphs have ATK_STATE_INVALID

A few states have been added in the IA2 integration. These need to be
handled somehow on linux as well. At the moment they all get the state
INVALID. Let's add the state DEFAULT that already have a equivalent.
The state MOVEABLE is causing the issues in paragraphs of LibreOffice
Writer. The state is not invalid so let's avoid reporting it at all.
There must be a cleaner way of doing this however.

Change-Id: I859439f92fe19f5050195383f43fa4af787b249e
Reviewed-on: https://gerrit.libreoffice.org/13727
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit df5fa4082cfb17c5d5be6678995689485df6d429)
Reviewed-on: https://gerrit.libreoffice.org/13947

diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index c3b784b..552c8e3 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -161,12 +161,16 @@ AtkStateType mapAtkState( sal_Int16 nState )
 MAP_DIRECT( TRANSIENT );
 MAP_DIRECT( VERTICAL );
 MAP_DIRECT( VISIBLE );
+MAP_DIRECT( DEFAULT );
 // a spelling error ...
 case accessibility::AccessibleStateType::DEFUNC:
 type = ATK_STATE_DEFUNCT; break;
 case accessibility::AccessibleStateType::MULTI_SELECTABLE:
 type = ATK_STATE_MULTISELECTABLE; break;
 default:
+//Mis-use ATK_STATE_LAST_DEFINED to check if a state is unmapped
+//NOTE! Do not report it
+type = ATK_STATE_LAST_DEFINED;
 break;
 }
 
@@ -535,7 +539,12 @@ wrapper_ref_state_set( AtkObject *atk_obj )
 uno::Sequence< sal_Int16 > aStates = xStateSet->getStates();
 
 for( sal_Int32 n = 0; n < aStates.getLength(); n++ )
-atk_state_set_add_state( pSet, mapAtkState( aStates[n] ) );
+{
+// ATK_STATE_LAST_DEFINED is used to check if the state
+// is unmapped, do not report it to Atk
+if ( mapAtkState( aStates[n] ) != ATK_STATE_LAST_DEFINED )
+atk_state_set_add_state( pSet, mapAtkState( aStates[n] 
) );
+}
 
 // We need to emulate FOCUS state for menus, menu-items etc.
 if( atk_obj == atk_get_focus_object() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-16 Thread Niklas Johansson
 sw/source/uibase/shells/textsh1.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 4f4dcd527ee4ef7365389b5a70d0f199263628e7
Author: Niklas Johansson 
Date:   Thu Jan 15 14:43:21 2015 +0100

fdo#86844 - CONTEXT MENU: Remove hyperlink not accessible

At the moment Remove hyperlink is only shown when text is selected
together with a hyperlink but not when you right click directly on
a link. Let's reuse the logic from when edit hyperlink should be shown
and append it to the currently working case where text and link is
selected.

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

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 9a6bfa6..970fad9 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1674,7 +1674,9 @@ void SwTextShell::GetState( SfxItemSet &rSet )
 rSh.GetCurAttr(aSet);
 
 // If a hyperlink is selected, either alone or along with 
other text...
-if(aSet.GetItemState( RES_TXTATR_INETFMT, true ) != 
SfxItemState::DONTCARE || rSh.HasReadonlySel())
+if ((aSet.GetItemState(RES_TXTATR_INETFMT, true) < 
SfxItemState::SET &&
+aSet.GetItemState(RES_TXTATR_INETFMT, true) != 
SfxItemState::DONTCARE) ||
+rSh.HasReadonlySel())
 {
 rSet.DisableItem(nWhich);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Mapping of AccessibleStateType to AtkStateType

2015-01-16 Thread Niklas Johansson
Thank you for the answer, somehow I missed the comments in offapi, I 
suppose that I only looked at the comments at api.libreoffice.org... O 
well...


I'll might dig into if OFFSCREEN is the opposite of ATK_STATE_SHOWING 
but I can't really say that I see it as a priority until I find some bug 
that I believe might be related.


Regards,
Niklas


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


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/unx

2015-01-19 Thread Niklas Johansson
 vcl/unx/gtk/a11y/atkwrapper.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 5346929ef8127e177a1bf86f47be69da0ad7603f
Author: Niklas Johansson 
Date:   Fri Jan 16 12:51:52 2015 +0100

fdo#86674 paragraphs have ATK_STATE_INVALID

A few states have been added in the IA2 integration. These need to be
handled somehow on linux as well. At the moment they all get the state
INVALID. Let's add the state DEFAULT that already have a equivalent.
The state MOVEABLE is causing the issues in paragraphs of LibreOffice
Writer. The state is not invalid so let's avoid reporting it at all.
There must be a cleaner way of doing this however.

Reviewed-on: https://gerrit.libreoffice.org/13727
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit df5fa4082cfb17c5d5be6678995689485df6d429)
Reviewed-on: https://gerrit.libreoffice.org/13947
(cherry picked from commit 3bde8657f50b88268ffb2693cc298411fcead005)

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

diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index a30bf16..8a0f8f0 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -160,12 +160,16 @@ AtkStateType mapAtkState( sal_Int16 nState )
 MAP_DIRECT( TRANSIENT );
 MAP_DIRECT( VERTICAL );
 MAP_DIRECT( VISIBLE );
+MAP_DIRECT( DEFAULT );
 // a spelling error ...
 case accessibility::AccessibleStateType::DEFUNC:
 type = ATK_STATE_DEFUNCT; break;
 case accessibility::AccessibleStateType::MULTI_SELECTABLE:
 type = ATK_STATE_MULTISELECTABLE; break;
 default:
+//Mis-use ATK_STATE_LAST_DEFINED to check if a state is unmapped
+//NOTE! Do not report it
+type = ATK_STATE_LAST_DEFINED;
 break;
 }
 
@@ -534,7 +538,12 @@ wrapper_ref_state_set( AtkObject *atk_obj )
 uno::Sequence< sal_Int16 > aStates = xStateSet->getStates();
 
 for( sal_Int32 n = 0; n < aStates.getLength(); n++ )
-atk_state_set_add_state( pSet, mapAtkState( aStates[n] ) );
+{
+// ATK_STATE_LAST_DEFINED is used to check if the state
+// is unmapped, do not report it to Atk
+if ( mapAtkState( aStates[n] ) != ATK_STATE_LAST_DEFINED )
+atk_state_set_add_state( pSet, mapAtkState( aStates[n] 
) );
+}
 
 // We need to emulate FOCUS state for menus, menu-items etc.
 if( atk_obj == atk_get_focus_object() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-19 Thread Niklas Johansson
 sw/source/uibase/shells/textsh1.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 7d6ddf18e6266825eb2aef47b41a461a5ac0baa6
Author: Niklas Johansson 
Date:   Thu Jan 15 14:43:21 2015 +0100

fdo#86844 - CONTEXT MENU: Remove hyperlink not accessible

At the moment Remove hyperlink is only shown when text is selected
together with a hyperlink but not when you right click directly on
a link. Let's reuse the logic from when edit hyperlink should be shown
and append it to the currently working case where text and link is
selected.

Change-Id: I2524f1c3037f3101d24e592eadf2e7d5d66ab4f9
Reviewed-on: https://gerrit.libreoffice.org/13926
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 4f4dcd527ee4ef7365389b5a70d0f199263628e7)
Reviewed-on: https://gerrit.libreoffice.org/13950

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 51d9a9d..b4e8450 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1674,7 +1674,9 @@ void SwTextShell::GetState( SfxItemSet &rSet )
 rSh.GetCurAttr(aSet);
 
 // If a hyperlink is selected, either alone or along with 
other text...
-if(aSet.GetItemState( RES_TXTATR_INETFMT, true ) != 
SfxItemState::DONTCARE || rSh.HasReadonlySel())
+if ((aSet.GetItemState(RES_TXTATR_INETFMT, true) < 
SfxItemState::SET &&
+aSet.GetItemState(RES_TXTATR_INETFMT, true) != 
SfxItemState::DONTCARE) ||
+rSh.HasReadonlySel())
 {
 rSet.DisableItem(nWhich);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Mapping of AccessibleStateType to AtkStateType

2015-01-19 Thread Niklas Johansson

Stephan Bergmann skrev den 2015-01-19 10:29:


Would probably make sense to rephrase and reformat the "IA2 CWS" 
comments for 
offapi/com/sun/star/accessibility/AccessibleStateType.idl's MOVEABLE, 
DEFAULT, OFFSCREEN, COLLAPSE so that they show up in the doxygen 
output (esp. for the latter two, which have no doxygen comment at all).


Adding documentation for the added states, roles and events has been on 
my todo-list for way to long. I better see to it that I get it done as 
soon as possible, obviously I need it. ;)


Regards,
Niklas Johansson

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


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

2015-01-20 Thread Niklas Johansson
 offapi/com/sun/star/accessibility/AccessibleStateType.idl |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 46f51b4659e772c07c0ebfe5fe64aeb830e2a992
Author: Niklas Johansson 
Date:   Tue Jan 20 19:20:38 2015 +0100

Add documentation for AccessibleStates STALE, OFFSCREEN and COLLAPSE

Change-Id: I6bfcd180f0c1d9e63577f58685ce64c509d91326
Reviewed-on: https://gerrit.libreoffice.org/14055
Tested-by: Michael Stahl 
Reviewed-by: Michael Stahl 

diff --git a/offapi/com/sun/star/accessibility/AccessibleStateType.idl 
b/offapi/com/sun/star/accessibility/AccessibleStateType.idl
index 25ac3ab..99602f1 100644
--- a/offapi/com/sun/star/accessibility/AccessibleStateType.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleStateType.idl
@@ -189,7 +189,10 @@ constants AccessibleStateType
 */
 const short SINGLE_LINE = 26;
 
-/** ???
+/** Object information is stale and might not be up to date
+
+Indicates that the information that is returned from this object
+might be out of sync with with the application.
 */
 const short STALE = 27;
 
@@ -225,10 +228,14 @@ constants AccessibleStateType
 
 // OFFSCREEN only exists in MSAA/IA2, but not in ATK/JAA/NSAccessibility.
 // MT: Shouldn't this be the same like !SHOWING in UAA/ATK?
+/** Indicates the object is outside of the screen area
+*/
 const short OFFSCREEN = 33;
 
 // COLLAPSED exists in MSAA/IA2, and now also in JAA, but not in 
ATK/NSAccessibility. In NSAccessibility, there is a notification for collapse.
 // In opposite to MSAA, UAA has EXPANDABLE, so EXPANDABLE && !EXPANDED 
should be the same like COLLAPSED.
+/** Indicates that the object is collapsed
+*/
 const short COLLAPSE = 34;
 
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4-0' - sw/source

2015-01-21 Thread Niklas Johansson
 sw/source/uibase/shells/textsh1.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 2be982d5b7e3409aca610d2f6e986550f348f81f
Author: Niklas Johansson 
Date:   Thu Jan 15 14:43:21 2015 +0100

fdo#86844 - CONTEXT MENU: Remove hyperlink not accessible

At the moment Remove hyperlink is only shown when text is selected
together with a hyperlink but not when you right click directly on
a link. Let's reuse the logic from when edit hyperlink should be shown
and append it to the currently working case where text and link is
selected.

Change-Id: I2524f1c3037f3101d24e592eadf2e7d5d66ab4f9
Reviewed-on: https://gerrit.libreoffice.org/13926
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 4f4dcd527ee4ef7365389b5a70d0f199263628e7)
Reviewed-on: https://gerrit.libreoffice.org/13959
Reviewed-by: Christian Lohmaier 

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 51d9a9d..b4e8450 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1674,7 +1674,9 @@ void SwTextShell::GetState( SfxItemSet &rSet )
 rSh.GetCurAttr(aSet);
 
 // If a hyperlink is selected, either alone or along with 
other text...
-if(aSet.GetItemState( RES_TXTATR_INETFMT, true ) != 
SfxItemState::DONTCARE || rSh.HasReadonlySel())
+if ((aSet.GetItemState(RES_TXTATR_INETFMT, true) < 
SfxItemState::SET &&
+aSet.GetItemState(RES_TXTATR_INETFMT, true) != 
SfxItemState::DONTCARE) ||
+rSh.HasReadonlySel())
 {
 rSet.DisableItem(nWhich);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-23 Thread Niklas Johansson
 offapi/com/sun/star/accessibility/AccessibleEventId.idl |   64 ++--
 1 file changed, 58 insertions(+), 6 deletions(-)

New commits:
commit fcecc1fcb4a971a08d1e1fa5767bc5d93393a504
Author: Niklas Johansson 
Date:   Wed Jan 21 19:18:01 2015 +0100

Document some accessible events in AccessibleEventId.idl

Add some documentation to a few undocumented functions.
I'm a bit unsure of ACTIVE_DECENDANT_CHANGED_NOFOCUS but to me it
seems to be a work around for windows that maps ACTIVE_DECENDANT_CHANGED
to event object focus. See the note for IA2_EVENT_ACTIVE_DESCENDANT_CHANGED
in the IA2 documentation:

http://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/_accessible_event_i_d_8idl.html#ae26846b6d521727ab696d20c3f43c0b5ac1379bc85d7afda57be018a7a44dc918

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

diff --git a/offapi/com/sun/star/accessibility/AccessibleEventId.idl 
b/offapi/com/sun/star/accessibility/AccessibleEventId.idl
index 20d0d05..741e55c 100644
--- a/offapi/com/sun/star/accessibility/AccessibleEventId.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleEventId.idl
@@ -373,13 +373,65 @@ constants AccessibleEventId
 */
 const short LISTBOX_ENTRY_COLLAPSED = 33;
 
+/** Constant used to determine when the active descendant of a component
+has been removed but unlike ACTIVE_DECENDANT_CHANGED the decendant
+that is to be removed does not have focus. The active descendant
+is used in objects with transient children.
+
+AccessibleEventObject::OldValue contains the item to be removed.
+AccessibleEventObject::NewValue is empty.
+
+@since LibreOffice 4.3
+*/
 const short ACTIVE_DESCENDANT_CHANGED_NOFOCUS = 34;
-const short SELECTION_CHANGED_ADD =35;
-const short SELECTION_CHANGED_REMOVE =36;
-const short SELECTION_CHANGED_WITHIN =37;
-const short PAGE_CHANGED =38;
-const short SECTION_CHANGED =39;
-const short COLUMN_CHANGED =40;
+
+/** An item in a container has been added to a already present selection
+
+Example: a second list item has been selected in a listbox.
+
+AccessibleEventObject::OldValue is empty.
+AccessibleEventObject::NewValue contains the item to be added.
+
+@since LibreOffice 4.3
+*/
+const short SELECTION_CHANGED_ADD = 35;
+
+/** An item in a container has been removed from the selection.
+
+AccessibleEventObject::OldValue contains the item to be removed.
+AccessibleEventObject::NewValue is empty.
+
+@since LibreOffice 4.3
+*/
+const short SELECTION_CHANGED_REMOVE = 36;
+
+/** Multiple items in a container object have been added or removed
+from the selection.
+
+AccessibleEventObject::OldValue and
+AccessibleEventObject::NewValue is empty.
+
+@since LibreOffice 4.3
+*/
+const short SELECTION_CHANGED_WITHIN = 37;
+
+/** A change of page or slide.
+
+@since LibreOffice 4.3
+*/
+const short PAGE_CHANGED = 38;
+
+/** The cursor has moved to/from a section
+
+@since LibreOffice 4.3
+*/
+const short SECTION_CHANGED = 39;
+
+/** The cursor has moved to/from a section
+
+@since LibreOffice 4.3
+*/
+const short COLUMN_CHANGED = 40;
 
 /** Constant used to indicate that the role of an accessible object has
 changed.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-27 Thread Niklas Johansson
 accessibility/source/standard/vclxaccessibletoolbox.cxx |7 +++
 vcl/source/window/toolbox2.cxx  |3 +--
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 9b7b1774459edb93f2d3a11b2441851f4355a613
Author: Niklas Johansson 
Date:   Mon Jan 26 23:16:07 2015 +0100

tdf#88702 ACCESSIBILITY Toggle buttons state not reliably updated

We need to adapt the accessibility code to handle 
VCLEVENT_TOOLBOX_ITEMUPDATED,
since it is now sent from vcl/source/window/toolbox2.cxx.
I have tested the patch successfully on Windows and Fedora.

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

diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx 
b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index c3042fb..a8a7cdf 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -551,18 +551,17 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const 
VclWindowEvent& rVclWindow
 case VCLEVENT_TOOLBOX_DEACTIVATE:
 //case VCLEVENT_TOOLBOX_SELECT:
 break;
-// IA2 CWS. MT: Still using VCLEVENT_TOOLBOX_CLICK, see comment in 
vcl/source/window/toolbox2.cxx
-/*
+
 case VCLEVENT_TOOLBOX_ITEMUPDATED:
 {
 if ( rVclWindowEvent.GetData() )
 {
 UpdateChecked_Impl( TOOLBOX_ITEM_NOTFOUND );
-UpdateIndeterminate_Impl( (sal_Int32)rVclWindowEvent.GetData() 
);
+UpdateIndeterminate_Impl( 
(sal_Int32)reinterpret_cast(rVclWindowEvent.GetData()) );
 }
 break;
 }
-*/
+
 case VCLEVENT_TOOLBOX_HIGHLIGHT:
 UpdateFocus_Impl();
 break;
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index e1cad51..247aaef 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1458,8 +1458,7 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState 
eState )
 // Notify button changed event to prepare accessibility bridge
 CallEventListeners( VCLEVENT_TOOLBOX_BUTTONSTATECHANGED, 
reinterpret_cast< void* >( nPos ) );
 
-// Notify
-//Solution:Call accessible listener to notify state_changed event
+// Call accessible listener to notify state_changed event
 CallEventListeners( VCLEVENT_TOOLBOX_ITEMUPDATED, 
reinterpret_cast< void* >(nPos) );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - accessibility/source

2014-08-13 Thread Niklas Johansson
 accessibility/source/standard/vclxaccessiblelist.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit bd6048bf5ab668f59a950a41b6bddc5d862cfdce
Author: Niklas Johansson 
Date:   Fri Jul 4 19:25:09 2014 +0200

Notify screen readers when selection changes in listboxes

When you change selections in listboxes without dropdown fuctionality
an accessilble event needs to be sent, this does not happen today.
An example of such listbox is the Suggestions in the Spelling and
Grammar dialog.

Change-Id: I6100c88ae5398d8bf3f511aee7b35e88fbf151f5
Reviewed-on: https://gerrit.libreoffice.org/10087
Tested-by: Norbert Thiebaud 
Reviewed-by: Norbert Thiebaud 
Reviewed-on: https://gerrit.libreoffice.org/10893
Reviewed-by: David Tardon 
Tested-by: David Tardon 

diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx 
b/accessibility/source/standard/vclxaccessiblelist.cxx
index beb252c..d54d515 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -300,8 +300,13 @@ void VCLXAccessibleList::UpdateSelection_Impl_Acc(bool 
b_IsDropDownList)
 }
 else if (m_aBoxType == LISTBOX && !b_IsDropDownList)
 {
-if ( aNewValue.hasValue())
+if ( aNewValue.hasValue() || aOldValue.hasValue() )
 {
+NotifyAccessibleEvent(
+AccessibleEventId::ACTIVE_DESCENDANT_CHANGED,
+aOldValue,
+aNewValue );
+
 NotifyListItem(aNewValue);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Mapping of AccessibleStateType to AtkStateType

2015-01-03 Thread Niklas Johansson

Hi

When trying to get the grips on "*Bug 86674* 
 - Previously-viewed 
paragraphs have ATK_STATE_INVALID after navigation by page" I realized 
that the issue was due to a few added AccessibleStateType's. The mapping 
into AtkStateType however was not updated. Problem is the current 
implementation expects all states to have an equivalent but I can only 
find an equivalent for DEFAULT. Not the other three added states. The 
added states are:

MOVEABLE
DEFAULT
OFFSCREEN
COLLAPSE

I did a small patch to fix DEFAULT and ignore MOVABLE. MOVABLE is 
causing the issue reported in the bug.

https://gerrit.libreoffice.org/#/c/13727

However the ignoring part is ugly. But I'm unsure of how to do it 
cleanly. At least ATK_STATE_INVALID does not get set if the state type 
is unmapped.


As a side note the added state COLLAPSE should probably be COLLAPSED. 
Could this be changed or is the name set in stone? If it is possible to 
change I need to verify that it really should be COLLAPSED and not COLLAPSE.


--
Regards,
Niklas

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


[Libreoffice-commits] core.git: vcl/unx

2015-01-05 Thread Niklas Johansson
 vcl/unx/gtk/a11y/atkwrapper.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit df5fa4082cfb17c5d5be6678995689485df6d429
Author: Niklas Johansson 
Date:   Sun Jan 4 01:15:49 2015 +0100

fdo#86674 paragraphs have ATK_STATE_INVALID

A few states have been added in the IA2 integration. These need to be
handled somehow on linux as well. At the moment they all get the state
INVALID. Let's add the state DEFAULT that already have a equivalent.
The state MOVEABLE is causing the issues in paragraphs of LibreOffice
Writer. The state is not invalid so let's avoid reporting it at all.
There must be a cleaner way of doing this however.

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

diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index c3b784b..552c8e3 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -161,12 +161,16 @@ AtkStateType mapAtkState( sal_Int16 nState )
 MAP_DIRECT( TRANSIENT );
 MAP_DIRECT( VERTICAL );
 MAP_DIRECT( VISIBLE );
+MAP_DIRECT( DEFAULT );
 // a spelling error ...
 case accessibility::AccessibleStateType::DEFUNC:
 type = ATK_STATE_DEFUNCT; break;
 case accessibility::AccessibleStateType::MULTI_SELECTABLE:
 type = ATK_STATE_MULTISELECTABLE; break;
 default:
+//Mis-use ATK_STATE_LAST_DEFINED to check if a state is unmapped
+//NOTE! Do not report it
+type = ATK_STATE_LAST_DEFINED;
 break;
 }
 
@@ -535,7 +539,12 @@ wrapper_ref_state_set( AtkObject *atk_obj )
 uno::Sequence< sal_Int16 > aStates = xStateSet->getStates();
 
 for( sal_Int32 n = 0; n < aStates.getLength(); n++ )
-atk_state_set_add_state( pSet, mapAtkState( aStates[n] ) );
+{
+// ATK_STATE_LAST_DEFINED is used to check if the state
+// is unmapped, do not report it to Atk
+if ( mapAtkState( aStates[n] ) != ATK_STATE_LAST_DEFINED )
+atk_state_set_add_state( pSet, mapAtkState( aStates[n] 
) );
+}
 
 // We need to emulate FOCUS state for menus, menu-items etc.
 if( atk_obj == atk_get_focus_object() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-01-07 Thread Niklas Johansson
 accessibility/source/standard/accessiblemenuitemcomponent.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit d22a27010c4bd55973165a5fc373027f7c251db8
Author: Niklas Johansson 
Date:   Wed Dec 17 23:05:15 2014 +0100

Accessibility: Expose keyboard short-cuts of menu entries

On Windows the keyboard short-cuts of menu items like
"Open Ctrl+O" is not exposed to accessibility tools on
Windows. On Mac and Linux it is.

If I understand Microsoft's notes correctly, it is expected
that the short-cut gets appended to the accessibleName.
This is what Acrobat Reader, Internet Explorer, Firefox
is doing. And with this patch LibreOffice as well.

For info from Microsoft on the matter see:

http://msdn.microsoft.com/en-us/library/windows/desktop/dd318482%28v=vs.85%29.aspx

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

diff --git a/accessibility/source/standard/accessiblemenuitemcomponent.cxx 
b/accessibility/source/standard/accessiblemenuitemcomponent.cxx
index 73674c7..6b4bc4c 100644
--- a/accessibility/source/standard/accessiblemenuitemcomponent.cxx
+++ b/accessibility/source/standard/accessiblemenuitemcomponent.cxx
@@ -202,6 +202,10 @@ OUString OAccessibleMenuItemComponent::GetAccessibleName()
 if ( sName.isEmpty() )
 sName = m_pParent->GetItemText( nItemId );
 sName = OutputDevice::GetNonMnemonicString( sName );
+#if defined WNT
+if ( m_pParent->GetAccelKey( nItemId ).GetName().getLength() )
+sName = sName + "\t" + m_pParent->GetAccelKey(nItemId).GetName();
+#endif
 }
 
 return sName;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/osx

2014-02-04 Thread Niklas Johansson
 vcl/osx/salframeview.mm |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 37ee9b402c2264daa7f8a8bc96443d380a054cf5
Author: Niklas Johansson 
Date:   Tue Feb 4 08:36:40 2014 +0100

fdo#74121 - Accessibility broken on Mac OS X (master)

The commit 461e0f9eaf9895ecd0eba67b35a4d2cec8a5e5c5 broke accessibility
on Mac. This patch tweeks two changes in the original commit and at
least removes the accessibility warnings about the wrong window being
reported as parent.

Change-Id: I0faa631d22376adc08a191ba5937363d1dee059e
Reviewed-on: https://gerrit.libreoffice.org/7837
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index cc4b768..f599575 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -1722,7 +1722,7 @@ private:
 }
 
 -(id)parentAttribute {
-return mpFrame->getNSWindow();
+return (NSView*) mpFrame->getNSWindow();
 }
 
 -(::com::sun::star::accessibility::XAccessibleContext *)accessibleContext
@@ -1742,7 +1742,7 @@ private:
 
 -(NSView*)viewElementForParent
 {
-return mpFrame->getNSView();
+return (NSView*) mpFrame->getNSWindow();
 }
 
 -(void)registerMouseEventListener: (id)theListener
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/osx

2014-02-08 Thread Niklas Johansson
 vcl/osx/a11yactionwrapper.mm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 812da991eb3ea082e925eccf76698aa4415309b8
Author: Niklas Johansson 
Date:   Fri Feb 7 20:00:57 2014 +0100

The accessible action "click" changed name to "press", adjust wrapper 
accordingly

The commit efb23f29983f87104a684e7fab00b84fc59d131d Integrate branch of 
IAccessible2" changed the name of the accessible action click to press
we need to adjust the action wrapper class on mac accordingly.

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

diff --git a/vcl/osx/a11yactionwrapper.mm b/vcl/osx/a11yactionwrapper.mm
index 31dc395..fa0de96 100644
--- a/vcl/osx/a11yactionwrapper.mm
+++ b/vcl/osx/a11yactionwrapper.mm
@@ -30,7 +30,7 @@
 +(NSString *)nativeActionNameFor:(NSString *)actionName {
 // TODO: Optimize ?
 //   Use NSAccessibilityActionDescription
-if ( [ actionName isEqualToString: @"click" ] ) {
+if ( [ actionName isEqualToString: @"press" ] ) {
 return NSAccessibilityPressAction;
 } else if ( [ actionName isEqualToString: @"togglePopup" ] ) {
 return NSAccessibilityShowMenuAction;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   >