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

2023-11-24 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/BaseFrameProperties.idl |6 +
 sw/inc/unoprnms.hxx  |1 
 sw/qa/core/unocore/unocore.cxx   |   27 +++
 sw/source/core/unocore/unoframe.cxx  |   10 
 sw/source/core/unocore/unomap1.cxx   |1 
 5 files changed, 45 insertions(+)

New commits:
commit a596070f8ac11ed0cd22baf55704037a6b8d9c4d
Author: Miklos Vajna 
AuthorDate: Fri Nov 24 08:41:07 2023 +0100
Commit: Miklos Vajna 
CommitDate: Fri Nov 24 10:05:38 2023 +0100

sw floattable, per-frame wrap-on-all-pages mode: add UNO API

This exposes the internal property SwFormatWrapTextAtFlyStart on the UNO
API.

We need this, because otherwise the ODT filter can't read/write it.

Change-Id: I67d3c28e3531b19183f8361a6df87b7a4ca84294
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159888
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/text/BaseFrameProperties.idl 
b/offapi/com/sun/star/text/BaseFrameProperties.idl
index 9b82601c896e..84c78732e8b3 100644
--- a/offapi/com/sun/star/text/BaseFrameProperties.idl
+++ b/offapi/com/sun/star/text/BaseFrameProperties.idl
@@ -379,6 +379,12 @@ published service BaseFrameProperties
  */
 [optional, property] boolean IsSplitAllowed;
 
+/** If `TRUE`, text wraps around a split fly on all pages.
+
+@since LibreOffice 24.2
+ */
+[optional, property] boolean WrapTextAtFlyStart;
+
 };
 
 
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index e83b1b601ef4..2c98a87dba5a 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -760,6 +760,7 @@ inline constexpr OUString UNO_NAME_PARA_IS_CONNECT_BORDER = 
u"ParaIsConnectBorde
 inline constexpr OUString UNO_NAME_ITEMS = u"Items"_ustr;
 inline constexpr OUString UNO_NAME_SELITEM = u"SelectedItem"_ustr;
 inline constexpr OUString UNO_NAME_IS_SPLIT_ALLOWED = u"IsSplitAllowed"_ustr;
+inline constexpr OUString UNO_NAME_WRAP_TEXT_AT_FLY_START = 
u"WrapTextAtFlyStart"_ustr;
 inline constexpr OUString UNO_NAME_HAS_TEXT_CHANGES_ONLY = 
u"HasTextChangesOnly"_ustr;
 inline constexpr OUString UNO_NAME_CHAR_HIDDEN = u"CharHidden"_ustr;
 inline constexpr OUString UNO_NAME_IS_FOLLOWING_TEXT_FLOW = 
u"IsFollowingTextFlow"_ustr;
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 00c61a042b77..381fe0dab3e2 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -1031,6 +1031,33 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testTdf108272Crash)
 createSwDoc("tdf108272-1-minimal.docx");
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testWrapTextAtFlyStart)
+{
+// Given a document with a fly frame:
+createSwDoc();
+SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+SwFlyFrameAttrMgr aMgr(true, pWrtShell, Frmmgr_Type::TEXT, nullptr);
+RndStdIds eAnchor = RndStdIds::FLY_AT_PARA;
+aMgr.InsertFlyFrame(eAnchor, aMgr.GetPos(), aMgr.GetSize());
+uno::Reference xDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xFrame(xDocument->getTextFrames()->getByName("Frame1"),
+   uno::UNO_QUERY);
+bool bWrapTextAtFlyStart{};
+// Without the accompanying fix in place, this test would have failed with:
+// An uncaught exception of type 
com.sun.star.beans.UnknownPropertyException
+// - Unknown property: WrapTextAtFlyStart
+// i.e. the property was missing.
+xFrame->getPropertyValue("WrapTextAtFlyStart") >>= bWrapTextAtFlyStart;
+CPPUNIT_ASSERT(!bWrapTextAtFlyStart);
+
+// When marking it as WrapTextAtFlyStart=true:
+xFrame->setPropertyValue("WrapTextAtFlyStart", uno::Any(true));
+
+// Then make sure that WrapTextAtFlyStart is true when asking back:
+xFrame->getPropertyValue("WrapTextAtFlyStart") >>= bWrapTextAtFlyStart;
+CPPUNIT_ASSERT(bWrapTextAtFlyStart);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index 632b57698702..7880a749b95c 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -135,6 +135,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -971,6 +972,15 @@ bool 
BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
 rToSet.Put(aSplit);
 }
 
+const ::uno::Any* pWrapTextAtFlyStart = nullptr;
+GetProperty(RES_WRAP_TEXT_AT_FLY_START, 0, pWrapTextAtFlyStart);
+if (pWrapTextAtFlyStart)
+{
+SwFormatWrapTextAtFlyStart aWrapTextAtFlyStart(true);
+bRet &= aWrapTextAtFlyStart.PutValue(*pWrapTextAtFlyStart, 0);
+rToSet.Put(aWrapTextAtFlyStart);
+}
+
 return bRet;
 }
 
diff --git a/sw/source/core/unocore/unomap1.cxx 
b/sw/source/core/unocore/unomap1.cxx
index 2db6cadc4d3f..ee4422a22e9d 100644
-

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

2023-11-14 Thread Andrea Gelmini (via logerrit)
 offapi/com/sun/star/accessibility/AccessibleStateType.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c09de4e11cfd58e676d6fb99453e97f70da5b266
Author: Andrea Gelmini 
AuthorDate: Tue Nov 14 11:36:55 2023 +0100
Commit: Julien Nabet 
CommitDate: Tue Nov 14 22:32:38 2023 +0100

Fix typo

Change-Id: Idcfcd6aca1c74cb3e10dac09cd347b69a9bdb949
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159406
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/offapi/com/sun/star/accessibility/AccessibleStateType.idl 
b/offapi/com/sun/star/accessibility/AccessibleStateType.idl
index f5dcad22a48a..de1bfc2b8ec7 100644
--- a/offapi/com/sun/star/accessibility/AccessibleStateType.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleStateType.idl
@@ -34,7 +34,7 @@ module com { module sun { module star { module accessibility {
 
 These states are giving values corresponding to the bits of a 64-bit
 value, since we OR them together to create bitsets to represent the
-combinated state of an accessibility object .
+combined state of an accessibility object .
 
 @since OOo 1.1.2
 */


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

2023-11-14 Thread Andrea Gelmini (via logerrit)
 offapi/com/sun/star/util/SearchDescriptor.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5767cb0eaf9ac69ccc0bfb8944cbf931a1f80728
Author: Andrea Gelmini 
AuthorDate: Tue Nov 14 06:08:18 2023 +0100
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Tue Nov 14 12:37:44 2023 +0100

Fix typo

Change-Id: Id3be5eb786bfa245155fef17e819a72dee322e18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159397
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/offapi/com/sun/star/util/SearchDescriptor.idl 
b/offapi/com/sun/star/util/SearchDescriptor.idl
index c70b81fcdcbd..042d64db2146 100644
--- a/offapi/com/sun/star/util/SearchDescriptor.idl
+++ b/offapi/com/sun/star/util/SearchDescriptor.idl
@@ -123,7 +123,7 @@ published service SearchDescriptor
  */
 [optional, property] boolean SearchWildcard;
 
-/** Specifices the character used to escape special characters in 
wildcards.
+/** Specifies the character used to escape special characters in wildcards.
 
 @since LibreOffice 24.2
  */


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

2023-11-07 Thread Mike Kaganski (via logerrit)
 offapi/com/sun/star/document/MacroExecMode.idl |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 59c7713e3a4fed3c67aa8df73203908c7816931a
Author: Mike Kaganski 
AuthorDate: Tue Nov 7 07:35:36 2023 +0100
Commit: Mike Kaganski 
CommitDate: Tue Nov 7 13:25:00 2023 +0100

Fix a typo

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

diff --git a/offapi/com/sun/star/document/MacroExecMode.idl 
b/offapi/com/sun/star/document/MacroExecMode.idl
index 55e855d03fa1..25aac568b633 100644
--- a/offapi/com/sun/star/document/MacroExecMode.idl
+++ b/offapi/com/sun/star/document/MacroExecMode.idl
@@ -45,7 +45,7 @@ published constants MacroExecMode
 from secure list are executed quietly.
 
 
-If the macro is neither in secure list nor signed a conformation
+If the macro is neither in secure list nor signed a confirmation
 will be requested.
 
 */
@@ -59,7 +59,7 @@ published constants MacroExecMode
 const short USE_CONFIG = 3;
 
 
-/** A macro should be executed always no conformation should be provided.
+/** A macro should be executed always no confirmation should be provided.
 */
 
 const short ALWAYS_EXECUTE_NO_WARN = 4;
@@ -90,13 +90,13 @@ published constants MacroExecMode
 
  If the macro is signed with unknown certificate a warning will
 appear. The macro either will not be executed or if the warning
-allows conformation, it will be executed after user agrees.
+allows confirmation, it will be executed after user agrees.
 
 */
 const short FROM_LIST_AND_SIGNED_WARN = 8;
 
 /** Execute only macros from secure list or macros that are signed by
-trusted certificates. No warning/conformation should be shown.
+trusted certificates. No warning/confirmation should be shown.
 */
 const short FROM_LIST_AND_SIGNED_NO_WARN = 9;
 


[Libreoffice-commits] core.git: offapi/com sw/inc sw/source writerfilter/source

2023-10-30 Thread Skyler Grey (via logerrit)
 offapi/com/sun/star/text/textfield/GetReference.idl |4 
 sw/inc/unoprnms.hxx |1 +
 sw/source/core/fields/reffld.cxx|   10 ++
 sw/source/core/inc/unofldmid.h  |2 ++
 sw/source/core/unocore/unofield.cxx |   12 +++-
 sw/source/core/unocore/unomap.cxx   |1 +
 sw/source/filter/ww8/ww8atr.cxx |   11 +++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx   |   18 ++
 writerfilter/source/dmapper/PropertyIds.cxx |1 +
 writerfilter/source/dmapper/PropertyIds.hxx |1 +
 10 files changed, 60 insertions(+), 1 deletion(-)

New commits:
commit e195c22533de44cd4f6afab7836c7eb6a613d202
Author: Skyler Grey 
AuthorDate: Fri Oct 20 13:07:12 2023 +
Commit: Caolán McNamara 
CommitDate: Mon Oct 30 20:04:01 2023 +0100

Enable STYLEREF flag export/import with OOXML

This commit enables exporting the following STYLEREF flags with OOXML
- Search from bottom to top
- Hide non numerical

After this commit, the following steps have been implemented
- The document model (I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19)
- The layout (I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19)
- The UI (I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19)
- UNO
- DOCX filter

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

diff --git a/offapi/com/sun/star/text/textfield/GetReference.idl 
b/offapi/com/sun/star/text/textfield/GetReference.idl
index 11bfc92b7705..c686b00b23cf 100644
--- a/offapi/com/sun/star/text/textfield/GetReference.idl
+++ b/offapi/com/sun/star/text/textfield/GetReference.idl
@@ -62,6 +62,10 @@ published service GetReference
 
  */
 [optional, property] string ReferenceFieldLanguage;
+/** contains extra flags which can modify the behaviour of the field
+@since LibreOffice 24.2
+ */
+[optional, property] short ReferenceFieldFlags;
 };
 
 
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 1ab2395fa67d..e83b1b601ef4 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -307,6 +307,7 @@ inline constexpr OUString UNO_NAME_PAGE_NUMBER_OFFSET = 
u"PageNumberOffset"_ustr
 inline constexpr OUString UNO_NAME_PLACEHOLDER = u"PlaceHolder"_ustr;
 inline constexpr OUString UNO_NAME_PLACEHOLDER_TYPE = u"PlaceHolderType"_ustr;
 inline constexpr OUString UNO_NAME_PRINT = u"Print"_ustr;
+inline constexpr OUString UNO_NAME_REFERENCE_FIELD_FLAGS = 
u"ReferenceFieldFlags"_ustr;
 inline constexpr OUString UNO_NAME_REFERENCE_FIELD_PART = 
u"ReferenceFieldPart"_ustr;
 inline constexpr OUString UNO_NAME_REFERENCE_FIELD_SOURCE = 
u"ReferenceFieldSource"_ustr;
 inline constexpr OUString UNO_NAME_REFERENCE_FIELD_LANGUAGE = 
u"ReferenceFieldLanguage"_ustr;
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 96b9716f7eac..638baf0a5474 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -974,6 +974,9 @@ bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 
nWhichId ) const
 rAny <<= nSource;
 }
 break;
+case FIELD_PROP_USHORT3:
+rAny <<= m_nFlags;
+break;
 case FIELD_PROP_PAR1:
 {
 OUString sTmp(GetPar1());
@@ -1076,6 +1079,13 @@ bool SwGetRefField::PutValue( const uno::Any& rAny, 
sal_uInt16 nWhichId )
 case FIELD_PROP_PAR4:
 rAny >>= m_sSetReferenceLanguage;
 break;
+case FIELD_PROP_USHORT3:
+{
+sal_uInt16 nSetFlags = 0;
+rAny >>= nSetFlags;
+m_nFlags = nSetFlags;
+}
+break;
 case FIELD_PROP_SHORT1:
 {
 sal_Int16 nSetSeq = 0;
diff --git a/sw/source/core/inc/unofldmid.h b/sw/source/core/inc/unofldmid.h
index 59f4583f3d6f..8c1838f45636 100644
--- a/sw/source/core/inc/unofldmid.h
+++ b/sw/source/core/inc/unofldmid.h
@@ -51,6 +51,8 @@
 #define FIELD_PROP_PAR6 36
 #define FIELD_PROP_PAR7 37
 
+#define FIELD_PROP_USHORT3  38
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unofield.cxx 
b/sw/source/core/unocore/unofield.cxx
index b5d423e8fd42..74b530ed5a28 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1043,6 +1043,7 @@ struct SwFieldProperties_Impl
 sal_Int32   nFormat;
 sal_uInt16  nUSHORT1;
 sal_uInt16  nUSHORT2;
+sal_uInt16  nUSHORT3;
 sal_Int16   nSHORT1;
 sal_Int8nByte1;
 boolbFormatIsDefault;
@@ -1058,6 +1059,7 @@ struct SwFieldProperties_Impl
 nFormat(0),
 nUSHORT1(0),
 nUSHORT2(0),
+nUSHORT3(0),
 nSHORT1(0),
 nByte1(0),
 bFormatIsDefa

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

2023-10-24 Thread Andrea Gelmini (via logerrit)
 offapi/com/sun/star/accessibility/XAccessibleValue.idl |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 11b12589c2b944f3f32d23de2794c4afddfb23b7
Author: Andrea Gelmini 
AuthorDate: Tue Oct 24 07:50:02 2023 +0200
Commit: Taichi Haradaguchi <20001...@ymail.ne.jp>
CommitDate: Tue Oct 24 09:38:43 2023 +0200

Fix typo

Change-Id: Iac1d0f9a00fe5ccab84da1f1fb033354920341fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158366
Tested-by: Jenkins
Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp>

diff --git a/offapi/com/sun/star/accessibility/XAccessibleValue.idl 
b/offapi/com/sun/star/accessibility/XAccessibleValue.idl
index ff4149489e3d..cc9b929c71a4 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleValue.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleValue.idl
@@ -78,7 +78,7 @@ interface XAccessibleValue : ::com::sun::star::uno::XInterface
 getCurrentValue().
 
 @return
-Returns the mimimum value in an implementation dependent type.
+Returns the minimum value in an implementation dependent type.
 If this object has no lower bound then an empty object is
 returned.
 */
@@ -92,7 +92,7 @@ interface XAccessibleValue : ::com::sun::star::uno::XInterface
 getCurrentValue().
 
 @return
-Returns the minium increment value in an implementation dependent 
type.
+Returns the minimum increment value in an implementation dependent 
type.
 If this object has no minimum increment value, then an empty 
object is
 returned.
 


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

2023-10-23 Thread Michael Weghorn (via logerrit)
 offapi/com/sun/star/accessibility/XAccessibleValue.idl |   21 -
 1 file changed, 10 insertions(+), 11 deletions(-)

New commits:
commit a8cfd280fbb5aff27ef90cee45daa185e24ea5c7
Author: Michael Weghorn 
AuthorDate: Mon Oct 23 13:41:54 2023 +0200
Commit: Michael Weghorn 
CommitDate: Mon Oct 23 20:36:07 2023 +0200

a11y: Make XAccessibleValue doc more consistent

* Align the method names in the documentation
  to what the acual methods are called
  (e.g. `getMaximumValue`, not `getMaximumAccessibleValue`).

* Use "minimum" and "maximum" consistently, not "minimal"
  and "maximal" in some places.

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

diff --git a/offapi/com/sun/star/accessibility/XAccessibleValue.idl 
b/offapi/com/sun/star/accessibility/XAccessibleValue.idl
index 842f8776ae25..ff4149489e3d 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleValue.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleValue.idl
@@ -44,8 +44,7 @@ interface XAccessibleValue : ::com::sun::star::uno::XInterface
 
 The argument is clipped to the valid interval whose upper and
 lower bounds are returned by the methods
-getMaximumAccessibleValue() and
-getMinimumAccessibleValue(), i.e. if it is lower than
+getMaximumValue() and getMinimumValue(), i.e. if it is lower than
 the minimum value the new value will be the minimum and if it is
 greater than the maximum then the new value will be the maximum.
 
@@ -59,41 +58,41 @@ interface XAccessibleValue : 
::com::sun::star::uno::XInterface
 */
 boolean setCurrentValue ([in] any aNumber);
 
-/** Returns the maximal value that can be represented by this object.
+/** Returns the maximum value that can be represented by this object.
 
 The type of the returned value is implementation dependent.  It
 does not have to be the same type as that returned by
-getCurrentAccessibleValue().
+getCurrentValue().
 
 @return
-Returns the maximal value in an implementation dependent type.
+Returns the maximum value in an implementation dependent type.
 If this object has no upper bound then an empty object is
 returned.
 */
 any getMaximumValue ();
 
-/** Returns the minimal value that can be represented by this object.
+/** Returns the minimum value that can be represented by this object.
 
 The type of the returned value is implementation dependent.  It
 does not have to be the same type as that returned by
-getCurrentAccessibleValue().
+getCurrentValue().
 
 @return
-Returns the minimal value in an implementation dependent type.
+Returns the mimimum value in an implementation dependent type.
 If this object has no lower bound then an empty object is
 returned.
 */
 any getMinimumValue ();
 
-/** Returns the minimal increment by which the value represented by this
+/** Returns the minimum increment by which the value represented by this
 object can be adjusted.
 
 The type of the returned value is implementation dependent. It
 does not have to be the same type as that returned by
-getCurrentAccessibleValue().
+getCurrentValue().
 
 @return
-Returns the minimal increment value in an implementation dependent 
type.
+Returns the minium increment value in an implementation dependent 
type.
 If this object has no minimum increment value, then an empty 
object is
 returned.
 


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

2023-10-21 Thread Michael Weghorn (via logerrit)
 offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cfaa52ed74278aab0e44f7cc9a66afe1c4166715
Author: Michael Weghorn 
AuthorDate: Fri Oct 20 13:22:16 2023 +0100
Commit: Michael Weghorn 
CommitDate: Sat Oct 21 13:48:59 2023 +0200

a11y: Improve XAccessibleExtendedAttributes doc

The existing

// MT: I guess it's not formula only?

comment was justified.

`XAccessibleExtendedAttributes::getExtendedAttributes`,
is not only used to report formulae, but e.g. used to
report a heading level by Writer paragraphs
(s. `SwAccessibleParagraph::getExtendedAttributes`),
so adjust the documentation and align it with
the `IAcccessible2::attributes` one [1] that also
uses the cell formula as an example.

[1] 
https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/interface_i_accessible2.html#a0d51b0c189a000ee3b6ddf7f68da2009

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

diff --git 
a/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl 
b/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl
index ec5f2f7176a9..3ba748f9f574 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleExtendedAttributes.idl
@@ -21,7 +21,7 @@ module com { module sun { module star { module accessibility {
 
 interface XAccessibleExtendedAttributes : ::com::sun::star::uno::XInterface
 {
-/* Returns the attribute of this object' formula */ // MT: I guess it's 
not formula only?
+/** Returns the attributes specific to this object, like a cell's formula. 
*/
 any getExtendedAttributes() raises 
(::com::sun::star::lang::IndexOutOfBoundsException);
 };
 


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

2023-10-11 Thread Jaume Pujantell (via logerrit)
 offapi/com/sun/star/text/ContentControl.idl   |6 
 sw/inc/formatcontentcontrol.hxx   |9 
 sw/inc/unoprnms.hxx   |1 
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx|   30 --
 sw/qa/extras/ooxmlexport/ooxmlexport19.cxx|5 
 sw/qa/extras/ooxmlexport/ooxmlexport3.cxx |3 
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |2 
 sw/source/core/txtnode/attrcontentcontrol.cxx |3 
 sw/source/core/unocore/unocontentcontrol.cxx  |   28 ++
 sw/source/core/unocore/unomap1.cxx|1 
 sw/source/filter/ww8/docxattributeoutput.cxx  |6 
 writerfilter/qa/cppunittests/dmapper/DomainMapper.cxx |   30 ++
 writerfilter/qa/cppunittests/dmapper/data/sdt-block-text.docx |binary
 writerfilter/source/dmapper/DomainMapper.cxx  |   30 ++
 writerfilter/source/dmapper/SdtHelper.cxx |  109 --
 writerfilter/source/dmapper/SdtHelper.hxx |   13 -
 16 files changed, 221 insertions(+), 55 deletions(-)

New commits:
commit 5082d50d24c3fec4487c724a15eb0d54a82ecd0d
Author: Jaume Pujantell 
AuthorDate: Wed Sep 13 08:58:21 2023 +0200
Commit: Jaume Pujantell 
CommitDate: Wed Oct 11 15:19:58 2023 +0200

writerfilter: use content controls for text in block SDTs

Text inside block SDTs was shown as Text Fields wich ignored properties 
such as
alias and formatting. Now those texts are imported as content controls like 
in
the case of run SDTs.

Added the ability for content controls to remember and export the 
"multiline"
property of block SDT text.

Some existing tests have been changed due to some different export results.

Change-Id: Ice1eb4ca6dd53c99d5abb239371f8ac896c3b6e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156867
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/text/ContentControl.idl 
b/offapi/com/sun/star/text/ContentControl.idl
index 34beff3cb127..6f6aa80ca54d 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -147,6 +147,12 @@ service ContentControl
 @since LibreOffice 7.6
 */
 [optional, property] string Lock;
+
+/** Indicates if the control accepts soft breaks.
+
+@since LibreOffice 24.2
+*/
+[optional, property] string MultiLine;
 };
 
 
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index 190d0bd540fe..cffe326d0703 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -173,7 +173,7 @@ class SW_DLLPUBLIC SwContentControl final : public 
sw::BroadcastingModify
 /// The appearance: just remembered.
 OUString m_aAppearance;
 
-/// The alias: just remembered.
+/// The alias.
 OUString m_aAlias;
 
 /// The tag: just remembered.
@@ -188,6 +188,9 @@ class SW_DLLPUBLIC SwContentControl final : public 
sw::BroadcastingModify
 /// The control and content locks: mostly just remembered.
 OUString m_aLock;
 
+/// The multiline property: just remembered.
+OUString m_aMultiLine;
+
 /// Stores a list item index, in case the doc model is not yet updated.
 // i.e. temporarily store the selected item until the text is inserted by 
GotoContentControl.
 std::optional m_oSelectedListItem;
@@ -389,6 +392,10 @@ public:
 // At the implementation level, define whether the user can directly 
modify the contents.
 bool GetReadWrite() const { return m_bReadWrite; }
 
+void SetMultiLine(const OUString& rMultiline) { m_aMultiLine = rMultiline; 
}
+
+const OUString& GetMultiLine() const { return m_aMultiLine; }
+
 SwContentControlType GetType() const;
 };
 
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 6553153b459d..630028f0e7a6 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -941,6 +941,7 @@ inline constexpr OUStringLiteral UNO_NAME_TAG = u"Tag";
 inline constexpr OUStringLiteral UNO_NAME_ID = u"Id";
 inline constexpr OUStringLiteral UNO_NAME_TAB_INDEX = u"TabIndex";
 inline constexpr OUStringLiteral UNO_NAME_LOCK = u"Lock";
+inline constexpr OUStringLiteral UNO_NAME_MULTILINE = u"MultiLine";
 inline constexpr OUStringLiteral UNO_NAME_DATE_STRING = u"DateString";
 inline constexpr OUStringLiteral UNO_NAME_PARA_ID = u"ParaId";
 inline constexpr OUStringLiteral UNO_NAME_PARA_ID_PARENT = u"ParaIdParent";
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
index 90c3c750c53c..6d3d0452740a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
@@ -683,28 +683,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123642_BookmarkAtDocEnd, 
"tdf123642.docx")
 
 DECLARE_OOXMLEXPORT_TEST(testTdf148361, 

[Libreoffice-commits] core.git: offapi/com offapi/UnoApi_offapi.mk sfx2/source uui/source

2023-10-09 Thread Noel Grandin (via logerrit)
 offapi/UnoApi_offapi.mk|1 
 offapi/com/sun/star/task/ErrorCodeRequest2.idl |   42 +
 sfx2/source/doc/objmisc.cxx|7 ++--
 sfx2/source/doc/sfxbasemodel.cxx   |7 ++--
 uui/source/iahndl.cxx  |   20 ---
 uui/source/iahndl.hxx  |2 -
 6 files changed, 67 insertions(+), 12 deletions(-)

New commits:
commit dd009cffc38a280d3b072ae4dc9ee9cda2e1f13f
Author: Noel Grandin 
AuthorDate: Mon Oct 9 18:46:32 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Oct 9 22:13:18 2023 +0200

tdf#157650 Unhelpful error when XML in content.xml is malformed

regression from
commit d9e322d60f65ff20631dab87baa5a2c7c71daaa2
replace ErrorInfo with simpler mechanism
we need to tunnel the necessary information through the uui stuff, so
add a new Exception class to do that.

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

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 90753f08384e..eba803973aa5 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -3699,6 +3699,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/task,\
DocumentPasswordRequest2 \
ErrorCodeIOException \
ErrorCodeRequest \
+   ErrorCodeRequest2 \
InteractionClassification \
MasterPasswordRequest \
NoMasterException \
diff --git a/offapi/com/sun/star/task/ErrorCodeRequest2.idl 
b/offapi/com/sun/star/task/ErrorCodeRequest2.idl
new file mode 100644
index ..b11a61a3e72c
--- /dev/null
+++ b/offapi/com/sun/star/task/ErrorCodeRequest2.idl
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+
+ module com {  module sun {  module star {  module task {
+
+
+/** represents a general error exception.
+It can be used to transport the error code information.
+E.g. that can be useful for interactions.
+
+This is designed to mesh with tools::ErrCodeMsg
+
+@since LibreOffice 24.2
+ */
+exception ErrorCodeRequest2 : com::sun::star::task::ErrorCodeRequest
+{
+string Arg1;
+string Arg2;
+short DialogMask;
+};
+
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 123d234734f7..a8f39d06f492 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -48,7 +48,7 @@
 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 #include 
@@ -1757,8 +1757,9 @@ bool SfxObjectShell::UseInteractionToHandleError(
 pAbort, pApprove
 };
 
-task::ErrorCodeRequest aErrorCode;
-aErrorCode.ErrCode = sal_uInt32(nError.GetCode());
+task::ErrorCodeRequest2 aErrorCode(OUString(), 
uno::Reference(),
+sal_Int32(sal_uInt32(nError.GetCode())), nError.GetArg1(), 
nError.GetArg2(),
+static_cast(nError.GetDialogMask()));
 aInteraction <<= aErrorCode;
 xHandler->handle(::framework::InteractionRequest::CreateRequest 
(aInteraction,lContinuations));
 bResult = pAbort->wasSelected();
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index b3d0d78b5e2a..f4b1f8305588 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -30,7 +30,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -3220,8 +3220,9 @@ void SfxBaseModel::impl_store(  const   OUString& 
  sURL
 // TODO/LATER: a general way to set the error context should 
be available
 SfxErrorContext aEc( ERRCTX_SFX_SAVEASDOC, 
m_pData->m_pObjectShell->GetTitle() );
 
-task::ErrorCodeRequest aErrorCode;
-aErrorCode.ErrCode = sal_uInt32(nErrCode.GetCode());
+task::ErrorCodeRequest2 aErrorCode(OUString(), 
u

[Libreoffice-commits] core.git: offapi/com schema/libreoffice sc/inc sc/qa sc/source

2023-10-01 Thread Rafael Lima (via logerrit)
 offapi/com/sun/star/sheet/NamedRangeFlag.idl|7 +
 sc/inc/rangenam.hxx |7 -
 sc/qa/unit/data/ods/named-ranges-hidden.ods |binary
 sc/qa/unit/data/xlsx/named-ranges-hidden.xlsx   |binary
 sc/qa/unit/subsequent_filters_test.cxx  |   64 
 sc/source/core/tool/rangenam.cxx|1 
 sc/source/filter/excel/xename.cxx   |6 +
 sc/source/filter/inc/workbookhelper.hxx |4 
 sc/source/filter/oox/defnamesbuffer.cxx |   22 +++-
 sc/source/filter/oox/workbookhelper.cxx |   26 ++--
 sc/source/filter/xml/xmlexprt.cxx   |6 +
 sc/source/filter/xml/xmlimprt.cxx   |4 
 sc/source/ui/namedlg/namemgrtable.cxx   |4 
 sc/source/ui/unoobj/nameuno.cxx |6 -
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |   34 ++
 15 files changed, 166 insertions(+), 25 deletions(-)

New commits:
commit 8938bc703980e3bdf4a32863f3e0193302a08cde
Author: Rafael Lima 
AuthorDate: Mon Aug 14 00:34:43 2023 +0200
Commit: Tomaž Vajngerl 
CommitDate: Sun Oct 1 13:01:32 2023 +0200

tdf#154449 Add support for hidden named ranges

This patch adds the possibility of having "hidden" named ranges in Calc, in 
a way similar to what MS Excel has (i.e. they're not visible in the UI and can 
only be hidden/shown via scripting).

This is done by creating a new HIDDEN flag in 
com.sun.star.sheet.NamedRangeFlag.

Hence thia patch makes it so that named ranges can be made hidden/visible 
via scripting. For instance, consider a Calc document with a named range 
"NamedRange1". The following scripts hides "NamedRange1" from the UI (i.e. it's 
no longer visible in the Manage Names dialog):

Sub SetHidden
  Dim eFlags : eFlags = com.sun.star.sheet.NamedRangeFlag
  aNamedRange = ThisComponent.NamedRanges.getByName("NamedRange1")
  nType = aNamedRange.getType() Or eFlags.HIDDEN
  aNamedRange.setType(nType)
End Sub

To make the named range visible again:

Sub RemoveHidden
  Dim eFlags : eFlags = com.sun.star.sheet.NamedRangeFlag
  aNamedRange = ThisComponent.NamedRanges.getByName("NamedRange1")
  nType = aNamedRange.getType()
  nType = nType - (aNamedRange.getType() And eFlags.HIDDEN)
  aNamedRange.setType(nType)
End Sub

This patch also implements ODS and OOX import/export, as well as QA tests.

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

diff --git a/offapi/com/sun/star/sheet/NamedRangeFlag.idl 
b/offapi/com/sun/star/sheet/NamedRangeFlag.idl
index 3c42431cb992..5addc08ad561 100644
--- a/offapi/com/sun/star/sheet/NamedRangeFlag.idl
+++ b/offapi/com/sun/star/sheet/NamedRangeFlag.idl
@@ -45,6 +45,13 @@ published constants NamedRangeFlag
  */
 const long ROW_HEADER = 8;
 
+
+/** The range is hidden from the user interface
+
+@since LibreOffice 24.2
+ */
+const long HIDDEN = 16;
+
 };
 
 
diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx
index 31bdd1f5a23c..881a2e876bda 100644
--- a/sc/inc/rangenam.hxx
+++ b/sc/inc/rangenam.hxx
@@ -55,7 +55,8 @@ public:
 RowHeader  = 0x0010,
 AbsArea= 0x0020,
 RefArea= 0x0040,
-AbsPos = 0x0080
+AbsPos = 0x0080,
+Hidden = 0x0100
 };
 
 enum class IsNameValidType
@@ -124,7 +125,7 @@ public:
 voidAddType( Type nType );
 TypeGetType() const { return eType; }
 boolHasType( Type nType ) const;
-sal_uInt32  GetUnoType() const;
+SC_DLLPUBLIC sal_uInt32 GetUnoType() const;
 SC_DLLPUBLIC OUString GetSymbol( const formula::FormulaGrammar::Grammar 
eGrammar = formula::FormulaGrammar::GRAM_DEFAULT ) const;
 SC_DLLPUBLIC OUString GetSymbol( const ScAddress& rPos, const 
formula::FormulaGrammar::Grammar eGrammar = 
formula::FormulaGrammar::GRAM_DEFAULT ) const;
 voidUpdateSymbol( OUStringBuffer& rBuffer, const ScAddress& );
@@ -166,7 +167,7 @@ public:
 };
 namespace o3tl
 {
-template<> struct typed_flags : 
is_typed_flags {};
+template<> struct typed_flags : 
is_typed_flags {};
 }
 
 
diff --git a/sc/qa/unit/data/ods/named-ranges-hidden.ods 
b/sc/qa/unit/data/ods/named-ranges-hidden.ods
new file mode 100644
index ..ff68f549f06a
Binary files /dev/null and b/sc/qa/unit/data/ods/named-ranges-hidden.ods differ
diff --git a/sc/qa/unit/data/xlsx/named-ranges-hidden.xlsx 
b/sc/qa/unit/data/xlsx/named-ranges-hidden.xlsx
new file mode 100644
index ..bfb365943ee1
Binary files /dev/null and b/sc/qa/unit/data/xlsx/named-ranges-hidd

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

2023-09-08 Thread Stephan Bergmann (via logerrit)
 offapi/com/sun/star/datatransfer/XTransferableTextSupplier.idl |2 -
 offapi/com/sun/star/document/XDocumentProperties2.idl  |2 -
 offapi/com/sun/star/frame/status/Template.idl  |2 -
 offapi/com/sun/star/sdbc/DataType.idl  |   20 
+-
 4 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 2bd5b489db722905a81e40f9d6dd90c5a73a2d89
Author: Stephan Bergmann 
AuthorDate: Fri Sep 8 09:03:55 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Sep 8 11:16:50 2023 +0200

Fix some misspelled LibreOffice @since tags

Change-Id: Id6602a06574e435b09a36997f3d1dd5cf3a6859e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156693
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/offapi/com/sun/star/datatransfer/XTransferableTextSupplier.idl 
b/offapi/com/sun/star/datatransfer/XTransferableTextSupplier.idl
index 18255d9074bc..7b4c84ecb23f 100644
--- a/offapi/com/sun/star/datatransfer/XTransferableTextSupplier.idl
+++ b/offapi/com/sun/star/datatransfer/XTransferableTextSupplier.idl
@@ -11,7 +11,7 @@
 
 module com { module sun { module star { module datatransfer {
 
-/** @since LO 7.2
+/** @since LibreOffice 7.2
  */
 interface XTransferableTextSupplier
 {
diff --git a/offapi/com/sun/star/document/XDocumentProperties2.idl 
b/offapi/com/sun/star/document/XDocumentProperties2.idl
index c0d2a18b4af2..5b4acbfe2e47 100644
--- a/offapi/com/sun/star/document/XDocumentProperties2.idl
+++ b/offapi/com/sun/star/document/XDocumentProperties2.idl
@@ -11,7 +11,7 @@ module com {   module sun {   module star {   module document 
{
 
 /** Extends XDocumentProperties interface to provide additional attributes
 
-@since LibreOffice 24.02
+@since LibreOffice 24.2
 */
 interface XDocumentProperties2: com::sun::star::document::XDocumentProperties
 {
diff --git a/offapi/com/sun/star/frame/status/Template.idl 
b/offapi/com/sun/star/frame/status/Template.idl
index ca8939d6bf9d..dfee1152adf4 100644
--- a/offapi/com/sun/star/frame/status/Template.idl
+++ b/offapi/com/sun/star/frame/status/Template.idl
@@ -41,7 +41,7 @@ struct Template
 
 /** specifies an identifier name in English (only for standard style).
 
-@since LO 7.2
+@since LibreOffice 7.2
  */
 string StyleNameIdentifier;
 };
diff --git a/offapi/com/sun/star/sdbc/DataType.idl 
b/offapi/com/sun/star/sdbc/DataType.idl
index 375a76f30a86..794b824a6b71 100644
--- a/offapi/com/sun/star/sdbc/DataType.idl
+++ b/offapi/com/sun/star/sdbc/DataType.idl
@@ -129,70 +129,70 @@ published constants DataType
 
 /** indicates a type representing an SQL DATALINK.
  *
- * @since LO 24.02
+ * @since LibreOffice 24.2
  */
 const long DATALINK   =   70;
 
 
 /** indicates a type representing an SQL ROWID.
  *
- * @since LO 24.02
+ * @since LibreOffice 24.2
  */
 const long ROWID  =   -8;
 
 
 /** indicates a type representing an SQL NCHAR.
  *
- * @since LO 24.02
+ * @since LibreOffice 24.2
  */
 const long NCHAR  =  -15;
 
 
 /** indicates a type representing an SQL NVARCHAR.
  *
- * @since LO 24.02
+ * @since LibreOffice 24.2
  */
 const long NVARCHAR   =   -9;
 
 
 /** indicates a type representing an SQL LONGNVARCHAR.
  *
- * @since LO 24.02
+ * @since LibreOffice 24.2
  */
 const long LONGNVARCHAR   =  -16;
 
 
 /** indicates a type representing an SQL NCLOB.
  *
- * @since LO 24.02
+ * @since LibreOffice 24.2
  */
 const long NCLOB  = 2011;
 
 
 /** indicates a type representing an SQL XML.
  *
- * @since LO 24.02
+ * @since LibreOffice 24.2
  */
 const long SQLXML = 2009;
 
 
 /** indicates a type representing an SQL REF CURSOR.
  *
- * @since LO 24.02
+ * @since LibreOffice 24.2
  */
 const long REF_CURSOR = 2012;
 
 
 /** indicates a type representing an SQL TIME WITH TIMEZONE.
  *
- * @since LO 24.02
+ * @since LibreOffice 24.2
  */
 const long TIME_WITH_TIMEZONE = 2013;
 
 
 /** indicates a type representing an SQL TIMESTAMP WITH TIMEZONE.
  *
- * @since LO 24.02
+ * @since LibreOffice 24.2
  */
 const long TIMESTAMP_WITH_TIMEZONE= 2014;
 


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

2023-09-04 Thread Khaled Hosny (via logerrit)
 offapi/com/sun/star/formula/FormulaProperties.idl |6 ++
 starmath/inc/document.hxx |2 ++
 starmath/inc/format.hxx   |4 
 starmath/source/cfgitem.cxx   |7 +++
 starmath/source/document.cxx  |   18 ++
 starmath/source/format.cxx|4 +++-
 starmath/source/mathml/mathmlexport.cxx   |   21 -
 starmath/source/unomodel.cxx  |   10 ++
 8 files changed, 66 insertions(+), 6 deletions(-)

New commits:
commit 5c5c71266ff14493975f20ff5807f31565a3f909
Author: Khaled Hosny 
AuthorDate: Wed Aug 16 15:08:33 2023 +0300
Commit: خالد حسني 
CommitDate: Mon Sep 4 18:15:50 2023 +0200

tdf#134193: Add the ability to set RTL math direction

This adds a new IsRightToLeft document property, reads/writes it, and
sets dir="rtl" on the top level MathML  element if set to true.

Rendering will be handled in next commits.

Change-Id: Ia3078b8a269fef7c3f037a2f1b7799744df2680b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155737
Tested-by: Jenkins
Reviewed-by: خالد حسني 

diff --git a/offapi/com/sun/star/formula/FormulaProperties.idl 
b/offapi/com/sun/star/formula/FormulaProperties.idl
index 204e06f50ba0..79ab4e7244bc 100644
--- a/offapi/com/sun/star/formula/FormulaProperties.idl
+++ b/offapi/com/sun/star/formula/FormulaProperties.idl
@@ -282,6 +282,12 @@ published service FormulaProperties
 @since OOo 3.4
  */
 [property, optional] shortBaseLine;
+
+/** switches into right-to-left layout.
+
+@since LibreOffice 24.2
+ */
+[property, optional] boolean  IsRightToLeft;
 };
 
 
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index bf9477b30f11..45321614385a 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -222,6 +222,8 @@ public:
 mathml::SmMlIteratorFree(m_pMlElementTree);
 m_pMlElementTree = pMlElementTree;
 }
+
+void SetRightToLeft(bool bRTL);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx
index 23dc04d290cf..5845d148e7fa 100644
--- a/starmath/inc/format.hxx
+++ b/starmath/inc/format.hxx
@@ -98,6 +98,7 @@ class SM_DLLPUBLIC SmFormat final : public SfxBroadcaster
 SmHorAlign  eHorAlign;
 sal_Int16   nGreekCharStyle;
 boolbIsTextmode,
+bIsRightToLeft,
 bScaleNormalBrackets;
 
 public:
@@ -126,6 +127,9 @@ public:
 boolIsTextmode() const { return bIsTextmode; }
 voidSetTextmode(bool bVal) { bIsTextmode = bVal; }
 
+boolIsRightToLeft() const { return bIsRightToLeft; }
+voidSetRightToLeft(bool bVal) { bIsRightToLeft = bVal; }
+
 sal_Int16   GetGreekCharStyle() const { return nGreekCharStyle; }
 voidSetGreekCharStyle(sal_Int16 nVal) { nGreekCharStyle = 
nVal; }
 
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 2146c366cd1e..6e27a0168e8b 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -91,6 +91,7 @@ static Sequence< OUString > lcl_GetFormatPropertyNames()
 //! see respective load/save routines here
 return Sequence< OUString > {
 "StandardFormat/Textmode",
+"StandardFormat/RightToLeft",
 "StandardFormat/GreekCharStyle",
 "StandardFormat/ScaleNormalBracket",
 "StandardFormat/HorizontalAlignment",
@@ -983,6 +984,10 @@ void SmMathConfig::LoadFormat()
 if (pVal->hasValue()  &&  (*pVal >>= bTmp))
 pFormat->SetTextmode( bTmp );
 ++pVal;
+// StandardFormat/RightToLeft
+if (pVal->hasValue()  &&  (*pVal >>= bTmp))
+pFormat->SetRightToLeft( bTmp );
+++pVal;
 // StandardFormat/GreekCharStyle
 if (pVal->hasValue()  &&  (*pVal >>= nTmp16))
 pFormat->SetGreekCharStyle( nTmp16 );
@@ -1061,6 +1066,8 @@ void SmMathConfig::SaveFormat()
 
 // StandardFormat/Textmode
 *pValue++ <<= pFormat->IsTextmode();
+// StandardFormat/RightToLeft
+*pValue++ <<= pFormat->IsRightToLeft();
 // StandardFormat/GreekCharStyle
 *pValue++ <<= pFormat->GetGreekCharStyle();
 // StandardFormat/ScaleNormalBracket
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 5c09cf40d3c0..c0f28ac18190 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -1219,4 +1219,22 @@ bool SmDocShell::WriteAsMathType3( SfxMedium& rMedium )
 return aEquation.ConvertFromStarMath( rMedium );
 }
 
+void SmDocShell::SetRightToLeft(bool bRTL)
+{
+SmFormat aOldFormat = GetFormat();
+if (aOldFormat.IsRightToLeft() == bRTL)
+return;
+
+SmFormat aNewFormat(aOldFormat);
+aNewFormat.SetRigh

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

2023-08-08 Thread Michael Weghorn (via logerrit)
 offapi/com/sun/star/accessibility/XAccessibleComponent.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f3754e5dbb3c70264df986fe3fd814b74a8f994b
Author: Michael Weghorn 
AuthorDate: Tue Aug 8 14:03:16 2023 +0200
Commit: Michael Weghorn 
CommitDate: Tue Aug 8 16:36:16 2023 +0200

a11y: Drop extra "no" in XAccessibleComponent doc

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

diff --git a/offapi/com/sun/star/accessibility/XAccessibleComponent.idl 
b/offapi/com/sun/star/accessibility/XAccessibleComponent.idl
index be23e66193e4..66f1d4b46b68 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleComponent.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleComponent.idl
@@ -105,7 +105,7 @@ interface XAccessibleComponent : 
::com::sun::star::uno::XInterface
 contains the test point then a reference to that object is
 returned.  If there is more than one child which satisfies that
 condition then a reference to that one is returned that is
-painted on top of the others.  If no there is no child which is
+painted on top of the others.  If there is no child which is
 rendered at the test point an empty reference is returned.
 */
 XAccessible  getAccessibleAtPoint ([in] ::com::sun::star::awt::Point 
Point);


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

2023-07-05 Thread Michael Stahl (via logerrit)
 offapi/com/sun/star/drawing/Shape.idl |   20 
 1 file changed, 20 insertions(+)

New commits:
commit a67675e7e248e056637be8b70d620379cdfb682e
Author: Michael Stahl 
AuthorDate: Wed Jul 5 13:06:15 2023 +0200
Commit: Michael Stahl 
CommitDate: Wed Jul 5 15:45:55 2023 +0200

offapi: add Title/Description properties from CWS aw038 (OOo 2.2)

Change-Id: I2a851ef76b840d1fa5479dcb182a63590a2d4065
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154052
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/offapi/com/sun/star/drawing/Shape.idl 
b/offapi/com/sun/star/drawing/Shape.idl
index e2faa4fbec48..118031488426 100644
--- a/offapi/com/sun/star/drawing/Shape.idl
+++ b/offapi/com/sun/star/drawing/Shape.idl
@@ -182,6 +182,26 @@ published service Shape
 @since LibreOffice 4.3
  */
 [optional, property] short RelativeWidthRelation;
+
+/** contains short title for the object
+
+This short title is visible as an alternative tag in HTML format.
+Accessibility tools can read this text.
+
+@since OOo 2.2
+*/
+[optional, property] string Title;
+
+/** contains description for the object
+
+The long description text can be entered to describe an object in
+more detail to users with screen reader software. The description is
+visible as an alternative tag for accessibility tools.
+
+@since OOo 2.2
+*/
+[optional, property] string Description;
+
 };
 
 


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

2023-05-25 Thread Olivier Hallot (via logerrit)
 offapi/com/sun/star/script/vba/VBAEventId.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 363c6bec73fbd8677b230892f4e828457e0b5dc6
Author: Olivier Hallot 
AuthorDate: Thu May 25 14:09:47 2023 -0300
Commit: Stephan Bergmann 
CommitDate: Fri May 26 08:35:19 2023 +0200

Fix text in IDL file

+ Copy&Paste is evil...

Change-Id: I11352ec41d96cfbc7d4176773789066aee292a0a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152281
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/offapi/com/sun/star/script/vba/VBAEventId.idl 
b/offapi/com/sun/star/script/vba/VBAEventId.idl
index 00989fccd053..6b258c747f05 100644
--- a/offapi/com/sun/star/script/vba/VBAEventId.idl
+++ b/offapi/com/sun/star/script/vba/VBAEventId.idl
@@ -90,7 +90,7 @@ constants VBAEventId
 
 /** Worksheet has been activated (made visible). Arguments: short nSheet. 
*/
 const long WORKSHEET_ACTIVATE   = 2101;
-/** Worksheet has been activated (made visible). Arguments: short nSheet. 
*/
+/** Worksheet has been deactivated (made not visible). Arguments: short 
nSheet. */
 const long WORKSHEET_DEACTIVATE = 2102;
 /** Double click in the sheet. Arguments: XRange/XSheetCellRangeContainer 
aRange, [out] boolean bCancel. */
 const long WORKSHEET_BEFOREDOUBLECLICK  = 2103;


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

2023-05-11 Thread László Németh (via logerrit)
 offapi/com/sun/star/text/CellProperties.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f517c839f786c4fa3ad06b1cdcf86d7a4eb6eeb4
Author: László Németh 
AuthorDate: Thu May 11 16:53:10 2023 +0200
Commit: László Németh 
CommitDate: Fri May 12 08:58:00 2023 +0200

sw offapi: clean up com::sun::star::text::CellProperties::HasTextChangesOnly

Reported by Stephan Bergmann.

Change-Id: Ide8d17dcc7775f3a4f97088e2cbb00ddef271929
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151676
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/offapi/com/sun/star/text/CellProperties.idl 
b/offapi/com/sun/star/text/CellProperties.idl
index 58c9718c0dc2..a2cb16bc825b 100644
--- a/offapi/com/sun/star/text/CellProperties.idl
+++ b/offapi/com/sun/star/text/CellProperties.idl
@@ -135,7 +135,7 @@ published service CellProperties
 
 @since LibreOffice 7.6
  */
-[optional, property, maybevoid] boolean HasTextChangesOnly;
+[optional, property] boolean HasTextChangesOnly;
 };
 
 


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

2023-05-11 Thread László Németh (via logerrit)
 offapi/com/sun/star/text/CellProperties.idl   |6 +
 sw/qa/extras/uiwriter/uiwriter5.cxx   |  103 ++
 sw/source/core/bastyp/init.cxx|4 -
 sw/source/core/doc/DocumentRedlineManager.cxx |   28 ++-
 sw/source/core/frmedt/fetab.cxx   |   49 +++-
 sw/source/core/unocore/unomap.cxx |1 
 6 files changed, 185 insertions(+), 6 deletions(-)

New commits:
commit d1004cdd6a445ae73673b0ca360ae034b0ec09f2
Author: László Németh 
AuthorDate: Tue May 9 16:51:06 2023 +0200
Commit: László Németh 
CommitDate: Thu May 11 13:51:47 2023 +0200

tdf#150673 sw offapi: add change tracking of table column deletion

This is a minimal extension of the text range based change
tracking to record and apply table column deletions with full
Undo/Redo support.

Add property HasTextChangesOnly to com::sun::star::text::CellProperties.

During recording of track changes, deletion of table columns wasn't
recorded: columns were removed completely with their text content.
Now the deletion deletes the cell content with change tracking,
setting also HasTextChangesOnly property of table cells to FALSE. If
a tracked deletion is accepted in a deleted column, and the result
is an empty cell, the column will be removed, if HasTextChangesOnly
property of the deleted cell is FALSE.

Note: Deletion of empty columns isn't recorded. Hiding deleted
columns hasn't been supported yet in the Hide Changes mode.

Follow-up to commit 05366b8e6683363688de8708a3d88cf144c7a2bf
"tdf#60382 sw offapi: add change tracking of table/row deletion".

Change-Id: I36915d7a58f66b4a3bdaf90495cb998d29c36561
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151593
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/offapi/com/sun/star/text/CellProperties.idl 
b/offapi/com/sun/star/text/CellProperties.idl
index 2448c25c8439..58c9718c0dc2 100644
--- a/offapi/com/sun/star/text/CellProperties.idl
+++ b/offapi/com/sun/star/text/CellProperties.idl
@@ -130,6 +130,12 @@ published service CellProperties
 @since LibreOffice 6.3
  */
 [optional, readonly, property] com::sun::star::text::XText ParentText;
+
+/** If TRUE, the table cell wasn't deleted or inserted with its tracked 
cell content
+
+@since LibreOffice 7.6
+ */
+[optional, property, maybevoid] boolean HasTextChangesOnly;
 };
 
 
diff --git a/sw/qa/extras/uiwriter/uiwriter5.cxx 
b/sw/qa/extras/uiwriter/uiwriter5.cxx
index ee7c041b78c5..38fe2143a992 100644
--- a/sw/qa/extras/uiwriter/uiwriter5.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter5.cxx
@@ -2453,6 +2453,109 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, 
testTdf147180_empty_rows)
 CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testRedlineTableColumnDeletion)
+{
+// load a table, and delete the first column with enabled change tracking:
+// now the column is not deleted silently, but keeps the deleted cell 
content,
+// and only accepting it will result the deletion of the table column.
+createSwDoc("tdf118311.fodt");
+SwDoc* pDoc = getSwDoc();
+
+// turn on red-lining and show changes
+pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | 
RedlineFlags::ShowDelete
+  | 
RedlineFlags::ShowInsert);
+CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+   pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+CPPUNIT_ASSERT_MESSAGE(
+"redlines should be visible",
+
IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+// check table
+xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+assertXPath(pXmlDoc, "//page[1]//body/tab");
+assertXPath(pXmlDoc, "//page[1]//body/tab/row/cell", 2);
+
+// delete table column with enabled change tracking
+// (HasTextChangesOnly property of the cell will be false)
+dispatchCommand(mxComponent, ".uno:DeleteColumns", {});
+
+discardDumpedLayout();
+pXmlDoc = parseLayoutDump();
+assertXPath(pXmlDoc, "//page[1]//body/tab");
+// This was 1 (deleted cell without change tracking)
+assertXPath(pXmlDoc, "//page[1]//body/tab/row/cell", 2);
+
+// accept the deletion
+SwEditShell* const pEditShell(pDoc->GetEditShell());
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pEditShell->GetRedlineCount());
+pEditShell->AcceptRedline(0);
+
+discardDumpedLayout();
+pXmlDoc = parseLayoutDump();
+assertXPath(pXmlDoc, "//page[1]//body/tab");
+// deleted column
+assertXPath(pXmlDoc, "//page[1]//body/tab/row/cell", 1);
+
+// Undo, and repeat the previous test, but only with deletion of the text 
content of the cells
+// (HasTextChangesOnly property will be removed by Undo)
+
+dispatchCommand(mxComponent, ".uno:Undo", {});

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

2023-04-27 Thread Dennis Francis (via logerrit)
 offapi/com/sun/star/sheet/DataPilotFieldLayoutMode.idl |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 53279b8bc210485471f9550ebbc5ad09adefa4c0
Author: Dennis Francis 
AuthorDate: Thu Apr 27 12:36:49 2023 +0530
Commit: Dennis Francis 
CommitDate: Thu Apr 27 10:10:55 2023 +0200

add @since for COMPACT_LAYOUT

Change-Id: I4b7f918e846ea1d220b9df2be5bc0b39d1f22f7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151086
Tested-by: Jenkins
Reviewed-by: Dennis Francis 

diff --git a/offapi/com/sun/star/sheet/DataPilotFieldLayoutMode.idl 
b/offapi/com/sun/star/sheet/DataPilotFieldLayoutMode.idl
index 4bbc233c674e..ae8cee9ee75c 100644
--- a/offapi/com/sun/star/sheet/DataPilotFieldLayoutMode.idl
+++ b/offapi/com/sun/star/sheet/DataPilotFieldLayoutMode.idl
@@ -68,6 +68,8 @@ constants DataPilotFieldLayoutMode
 the subtotals take up more than one row (manually selected, or because 
there
 are several data fields), they are always shown below the item's data,
 regardless of the setting.
+
+@since LibreOffice 7.6
  */
 
 const long COMPACT_LAYOUT = 3;


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

2023-04-10 Thread Eike Rathke (via logerrit)
 offapi/com/sun/star/sheet/XSheetOperation.idl |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8761510ae5cef17a293f464dc3abc84f46516ff2
Author: Eike Rathke 
AuthorDate: Mon Apr 10 12:26:37 2023 +0200
Commit: Eike Rathke 
CommitDate: Mon Apr 10 14:27:08 2023 +0200

Clarify XSheetOperation::computeFunction() behaviour in description

Change-Id: I097d5959f227769bbb0a082c5e0b51b245cf96ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150182
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/sheet/XSheetOperation.idl 
b/offapi/com/sun/star/sheet/XSheetOperation.idl
index 6b8f7fc2461a..53b0cb45ab77 100644
--- a/offapi/com/sun/star/sheet/XSheetOperation.idl
+++ b/offapi/com/sun/star/sheet/XSheetOperation.idl
@@ -30,7 +30,8 @@ published interface XSheetOperation: 
com::sun::star::uno::XInterface
 {
 
 /** computes a general function based on all cells in the current
-cell range(s).
+cell range(s), excluding values from filtered and hidden rows
+and hidden columns as done for the status bar.
 
 @param nFunction
 is the function used to compute the result.


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

2023-03-21 Thread Tor Lillqvist (via logerrit)
 offapi/com/sun/star/accessibility/XAccessibleContext.idl |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 660f73385562314e01abb4cef9d443b0c0f42b06
Author: Tor Lillqvist 
AuthorDate: Tue Mar 21 09:48:04 2023 +0200
Commit: Tor Lillqvist 
CommitDate: Tue Mar 21 09:10:53 2023 +

There is no XAccessibleStateType

What is meant is surely AccessibleStateType.

Change-Id: I57903dd7e1eb9b0a3cac42a96633093569f770eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149194
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 

diff --git a/offapi/com/sun/star/accessibility/XAccessibleContext.idl 
b/offapi/com/sun/star/accessibility/XAccessibleContext.idl
index 84c8a21cfdea..6b1b16701717 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleContext.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleContext.idl
@@ -152,10 +152,10 @@ interface XAccessibleContext : 
::com::sun::star::uno::XInterface
 /** Returns the set of states that are currently active for this
 object.
 
-See the documentation of XAccessibleStateType for a
+See the documentation of AccessibleStateType for a
 description of the individual states.
 
-@see XAccessibleStateType
+@see AccessibleStateType
 */
 hyper getAccessibleStateSet ();
 


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

2023-03-16 Thread Tor Lillqvist (via logerrit)
 offapi/com/sun/star/accessibility/AccessibleRole.idl |4 
 1 file changed, 4 deletions(-)

New commits:
commit 910226f2916b271a496daa6920843bf8d82238a6
Author: Tor Lillqvist 
AuthorDate: Thu Mar 16 12:29:30 2023 +0200
Commit: Tor Lillqvist 
CommitDate: Thu Mar 16 10:43:29 2023 +

Remove false documentation

There are no such duplicated constant labels in this file.

Change-Id: I6352766834bf832667b5644d7507ec250932492a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148976
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 

diff --git a/offapi/com/sun/star/accessibility/AccessibleRole.idl 
b/offapi/com/sun/star/accessibility/AccessibleRole.idl
index c25b3d465d1a..f5e269d3a423 100644
--- a/offapi/com/sun/star/accessibility/AccessibleRole.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleRole.idl
@@ -34,10 +34,6 @@ module com { module sun { module star { module accessibility 
{
 include future extensions to the set of roles we have to use constants
 here.
 
-For some roles there exist two labels with the same value.  Please
-use the one with the underscores.  The other ones are somewhat
-deprecated and will be removed in the future. 
-
 @see XAccessibleContext
 
 @since OOo 1.1.2


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

2023-01-25 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/BaseFrameProperties.idl |6 
 sw/qa/core/unocore/unocore.cxx   |   28 +++
 sw/source/core/unocore/unomap1.cxx   |1 
 3 files changed, 35 insertions(+)

New commits:
commit fd3d4d894d96f16a28d5b58c5bcf5a44fb83617f
Author: Miklos Vajna 
AuthorDate: Wed Jan 25 09:27:28 2023 +0100
Commit: Miklos Vajna 
CommitDate: Wed Jan 25 12:40:04 2023 +

sw: add UNO API for multi-page fly frames

This exposes the internal property added in
0bb90afaeb193181d7b98b79e962549d8a1dd85a (sw: add document model for
multi-page fly frames, 2023-01-24) on the UNO API.

Change-Id: If9acd2d2130f727bc9481980445c0da01be04729
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146124
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/text/BaseFrameProperties.idl 
b/offapi/com/sun/star/text/BaseFrameProperties.idl
index 3108067a0ad5..9b82601c896e 100644
--- a/offapi/com/sun/star/text/BaseFrameProperties.idl
+++ b/offapi/com/sun/star/text/BaseFrameProperties.idl
@@ -373,6 +373,12 @@ published service BaseFrameProperties
 */
 [optional, property] boolean Decorative;
 
+/** If `TRUE`, the frame is allowed to be split at page breaks.
+
+@since LibreOffice 7.6
+ */
+[optional, property] boolean IsSplitAllowed;
+
 };
 
 
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 0c2da1b0524a..d17b1e19940a 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -902,6 +903,33 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testParagraphMarkerFormattedRun)
 getXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/SwFieldPortion", 
"font-weight"));
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testFlySplit)
+{
+// Given a document with a fly frame:
+createSwDoc();
+SwWrtShell* pWrtShell = getSwDocShell()->GetWrtShell();
+SwFlyFrameAttrMgr aMgr(true, pWrtShell, Frmmgr_Type::TEXT, nullptr);
+RndStdIds eAnchor = RndStdIds::FLY_AT_PARA;
+aMgr.InsertFlyFrame(eAnchor, aMgr.GetPos(), aMgr.GetSize());
+uno::Reference xDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xFrame(xDocument->getTextFrames()->getByName("Frame1"),
+   uno::UNO_QUERY);
+bool bIsSplitAllowed{};
+// Without the accompanying fix in place, this test would have failed with:
+// An uncaught exception of type 
com.sun.star.beans.UnknownPropertyException
+// - Unknown property: IsSplitAllowed
+// i.e. the property was missing.
+xFrame->getPropertyValue("IsSplitAllowed") >>= bIsSplitAllowed;
+CPPUNIT_ASSERT(!bIsSplitAllowed);
+
+// When marking it as IsSplitAllowed=true:
+xFrame->setPropertyValue("IsSplitAllowed", uno::Any(true));
+
+// Then make sure that IsSplitAllowed is true when asking back:
+xFrame->getPropertyValue("IsSplitAllowed") >>= bIsSplitAllowed;
+CPPUNIT_ASSERT(bIsSplitAllowed);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unomap1.cxx 
b/sw/source/core/unocore/unomap1.cxx
index e5fcd7779607..2d4dc92af0cd 100644
--- a/sw/source/core/unocore/unomap1.cxx
+++ b/sw/source/core/unocore/unomap1.cxx
@@ -772,6 +772,7 @@ o3tl::span 
SwUnoPropertyMapProvider::GetFrameProp
 { UNO_NAME_SIZE_TYPE, RES_FRM_SIZE,   
cppu::UnoType::get()  , PROPERTY_NONE,   
MID_FRMSIZE_SIZE_TYPE  },
 { UNO_NAME_WIDTH_TYPE, RES_FRM_SIZE,  
cppu::UnoType::get()  , PROPERTY_NONE,   
MID_FRMSIZE_WIDTH_TYPE },
 { UNO_NAME_WRITING_MODE, RES_FRAMEDIR, 
cppu::UnoType::get(), PROPERTY_NONE, 0 },
+{ UNO_NAME_IS_SPLIT_ALLOWED, RES_FLY_SPLIT, 
cppu::UnoType::get(), PropertyAttribute::MAYBEVOID, 0 },
 
 // added FillProperties for SW, same as FILL_PROPERTIES in svx
 // but need own defines in Writer due to later association of strings


[Libreoffice-commits] core.git: offapi/com offapi/UnoApi_offapi.mk sd/source sd/util solenv/bin

2023-01-24 Thread Noel Grandin (via logerrit)
 offapi/UnoApi_offapi.mk|1 
 offapi/com/sun/star/drawing/framework/ModuleController.idl |   41 ---
 sd/source/ui/framework/module/ModuleController.cxx |   46 +++--
 sd/source/ui/inc/DrawController.hxx|4 -
 sd/source/ui/inc/framework/ModuleController.hxx|   15 
 sd/source/ui/unoidl/DrawController.cxx |   11 +--
 sd/util/sd.component   |4 -
 solenv/bin/native-code.py  |1 
 8 files changed, 20 insertions(+), 103 deletions(-)

New commits:
commit e011ac1c14656df67dbb46e54402afa64ff47303
Author: Noel Grandin 
AuthorDate: Mon Jan 23 15:43:55 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Jan 24 17:28:57 2023 +

[API CHANGE] remove service sd::framework::ModuleController

It makes no sense to be constructed externally.

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

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 0f3a4a371a73..bdc6f53a1087 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -148,7 +148,6 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/drawing/framework
BasicPaneFactory \
BasicToolBarFactory \
BasicViewFactory \
-   ModuleController \
ResourceId \
 ))
 $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/embed,\
diff --git a/offapi/com/sun/star/drawing/framework/ModuleController.idl 
b/offapi/com/sun/star/drawing/framework/ModuleController.idl
deleted file mode 100644
index 2828ef92de93..
--- a/offapi/com/sun/star/drawing/framework/ModuleController.idl
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-module com { module sun { module star { module drawing { module framework {
-
-/** See XModuleController for a description of the module
-controller.
-
-See ConfigurationController for a comment why this
-service may be removed in the future.
-
-The ModuleController object for an application can be
-obtained via the XControllerManager interface.
-*/
-service ModuleController : XModuleController
-{
-/** Create a new instance of a ModuleController as sub
-controller of the given XController object.
-*/
-create ([in] ::com::sun::star::frame::XController xController);
-};
-
-}; }; }; }; }; // ::com::sun::star::drawing::framework
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/framework/module/ModuleController.cxx 
b/sd/source/ui/framework/module/ModuleController.cxx
index 4d98bbfa38c2..ab6cc1e16703 100644
--- a/sd/source/ui/framework/module/ModuleController.cxx
+++ b/sd/source/ui/framework/module/ModuleController.cxx
@@ -37,14 +37,10 @@ using ::sd::tools::ConfigurationAccess;
 
 namespace sd::framework {
 
-//= ModuleController ==
-Reference ModuleController::CreateInstance()
+ModuleController::ModuleController(const 
css::uno::Reference& rxController)
 {
-return new ModuleController();
-}
+assert(rxController);
 
-ModuleController::ModuleController()
-{
 /** Load a list of URL to service mappings.
 The mappings are stored in the
 mpResourceToFactoryMap member.
@@ -75,6 +71,15 @@ ModuleController::ModuleController()
   "private:resource/toolpanel/TableDesign",
   "private:resource/toolpanel/CustomAnimations",
   "private:resource/toolpanel/SlideTransitions" });
+
+try
+{
+mxController = rxController;
+
+InstantiateStartupServices();
+}
+catch (RuntimeException&)
+{}
 }
 
 ModuleController::~ModuleController() noexcept
@@ -161,36 +166,7 @@ void SAL_CALL ModuleController::requestResource (const 
OUString& rsResourceURL)
 maLoadedFactories[iFactory->second] = xFactory;
 }
 
-//- XInitialization -

[Libreoffice-commits] core.git: offapi/com offapi/UnoApi_offapi.mk sd/source sd/util solenv/bin

2023-01-23 Thread Noel Grandin (via logerrit)
 offapi/UnoApi_offapi.mk   |1 
 offapi/com/sun/star/drawing/framework/ConfigurationController.idl |   42 
--
 sd/source/ui/framework/configuration/ConfigurationController.cxx  |   32 
+--
 sd/source/ui/inc/DrawController.hxx   |6 -
 sd/source/ui/inc/framework/ConfigurationController.hxx|   11 --
 sd/source/ui/unoidl/DrawController.cxx|   10 --
 sd/util/sd.component  |4 
 solenv/bin/native-code.py |1 
 8 files changed, 16 insertions(+), 91 deletions(-)

New commits:
commit 31a5db6f28cd006adf5630b2c5d683accb9eeadb
Author: Noel Grandin 
AuthorDate: Mon Jan 23 12:14:25 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Jan 24 05:46:58 2023 +

[API CHANGE] remove service sd::framework::ConfigurationController

It makes no sense to be constructed externally.

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

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 0041655dac91..0f3a4a371a73 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -148,7 +148,6 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/drawing/framework
BasicPaneFactory \
BasicToolBarFactory \
BasicViewFactory \
-   ConfigurationController \
ModuleController \
ResourceId \
 ))
diff --git a/offapi/com/sun/star/drawing/framework/ConfigurationController.idl 
b/offapi/com/sun/star/drawing/framework/ConfigurationController.idl
deleted file mode 100644
index 46df3fa820f0..
--- a/offapi/com/sun/star/drawing/framework/ConfigurationController.idl
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-module com { module sun { module star { module drawing { module framework {
-
-/** See XConfigurationController for a description of the
-configuration controller.
-
-This service is used at the moment by the
-XControllerManager to create a configuration controller.
-This allows developers to replace the default implementation of the
-configuration controller with their own.  This may not be a useful
-feature.  Furthermore the sub controllers may need a tighter coupling
-than the interfaces allow.  These are reasons for removing this service
-in the future and let the controller manager create the sub controllers
-directly.
-*/
-service ConfigurationController
-: XConfigurationController
-{
-create ([in] ::com::sun::star::frame::XController xController);
-};
-
-}; }; }; }; }; // ::com::sun::star::drawing::framework
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx 
b/sd/source/ui/framework/configuration/ConfigurationController.cxx
index 3fc95adb9b96..59fdf374a74f 100644
--- a/sd/source/ui/framework/configuration/ConfigurationController.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationController.cxx
@@ -101,10 +101,15 @@ ConfigurationController::Lock::~Lock()
 
 //= ConfigurationController ===
 
-ConfigurationController::ConfigurationController() noexcept
+ConfigurationController::ConfigurationController(const 
css::uno::Reference& rxController) noexcept
 : ConfigurationControllerInterfaceBase(m_aMutex)
 , mbIsDisposed(false)
 {
+const SolarMutexGuard aSolarGuard;
+
+mpImplementation.reset(new Implementation(
+*this,
+rxController));
 }
 
 ConfigurationController::~ConfigurationController() noexcept
@@ -475,22 +480,6 @@ Reference SAL_CALL 
ConfigurationController::getResourceFactory
 return 
mpImplementation->mpResourceFactoryContainer->GetFactory(sResourceURL);
 }
 
-//- XInitialization ---
-
-void SAL_CALL ConfigurationController::initializ

[Libreoffice-commits] core.git: offapi/com offapi/UnoApi_offapi.mk sd/source sd/util solenv/bin vcl/workben

2023-01-23 Thread Noel Grandin (via logerrit)
 offapi/UnoApi_offapi.mk |1 
 offapi/com/sun/star/drawing/framework/Configuration.idl |   42 
 sd/source/ui/framework/configuration/Configuration.cxx  |   26 -
 sd/source/ui/inc/framework/Configuration.hxx|9 ---
 sd/util/sd.component|4 -
 solenv/bin/native-code.py   |1 
 vcl/workben/cgmfuzzer.cxx   |2 
 7 files changed, 1 insertion(+), 84 deletions(-)

New commits:
commit 5994aedd44bcf3fba93cdc33e33844231929afa8
Author: Noel Grandin 
AuthorDate: Mon Jan 23 08:50:57 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Jan 23 18:38:39 2023 +

[API CHANGE] sd::frame::Configuration does not need to be an UNO service

It does not ever appear to have been used as such, and it makes
no sense to be constructed externally.

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

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 4913d17747c6..0041655dac91 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -148,7 +148,6 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/drawing/framework
BasicPaneFactory \
BasicToolBarFactory \
BasicViewFactory \
-   Configuration \
ConfigurationController \
ModuleController \
ResourceId \
diff --git a/offapi/com/sun/star/drawing/framework/Configuration.idl 
b/offapi/com/sun/star/drawing/framework/Configuration.idl
deleted file mode 100644
index cf21c44ae784..
--- a/offapi/com/sun/star/drawing/framework/Configuration.idl
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-module com { module sun { module star { module drawing { module framework {
-
-/** This service provides the means for constructing new configurations.
-
-Most likely use is the XConfigurationController::restoreConfiguration()
-method.
-
-@see XConfiguration
-for a description of the configuration.
-*/
-service Configuration
-: XConfiguration
-{
-/** Create an empty configuration.
-This should not be necessary very often.  Changes to an
-existing configuration are more likely.
-*/
-create();
-};
-
-}; }; }; }; }; // ::com::sun::star::drawing::framework
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/framework/configuration/Configuration.cxx 
b/sd/source/ui/framework/configuration/Configuration.cxx
index 7b813a42bddb..56ade027b8f3 100644
--- a/sd/source/ui/framework/configuration/Configuration.cxx
+++ b/sd/source/ui/framework/configuration/Configuration.cxx
@@ -215,23 +215,6 @@ void SAL_CALL Configuration::setName (const OUString&)
 // ignored.
 }
 
-OUString Configuration::getImplementationName()
-{
-return
-"com.sun.star.comp.Draw.framework.configuration.Configuration";
-}
-
-sal_Bool Configuration::supportsService(OUString const & ServiceName)
-{
-return cppu::supportsService(this, ServiceName);
-}
-
-css::uno::Sequence Configuration::getSupportedServiceNames()
-{
-return css::uno::Sequence{
-"com.sun.star.drawing.framework.Configuration"};
-}
-
 void Configuration::PostEvent (
 const Reference& rxResourceId,
 const bool bActivation)
@@ -299,13 +282,4 @@ bool AreConfigurationsEquivalent (
 } // end of namespace sd::framework
 
 
-extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
-com_sun_star_comp_Draw_framework_configuration_Configuration_get_implementation(
-css::uno::XComponentContext*,
-css::uno::Sequence const &)
-{
-return cppu::acquire(new sd::framework::Configuration(nullptr, false));
-}
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/framework/Configuration.hxx 
b/sd/source/ui/inc/framework/Configuration.hxx
index 8f33ef4311be..1b245e47afea 100644
--- a/sd/source/ui/inc/framework/Configuration.hxx
+++ b/

[Libreoffice-commits] core.git: offapi/com officecfg/registry sd/source

2023-01-20 Thread Noel Grandin (via logerrit)
 offapi/com/sun/star/drawing/framework/XModuleController.idl |7 
 officecfg/registry/data/org/openoffice/Office/Impress.xcu   |  122 
 officecfg/registry/schema/org/openoffice/Office/Impress.xcs |   12 -
 sd/source/ui/framework/module/ModuleController.cxx  |   81 +++
 sd/source/ui/inc/framework/ModuleController.hxx |9 
 5 files changed, 38 insertions(+), 193 deletions(-)

New commits:
commit a2d093c06d047e9efe41c90e7269d0dd2293e9c8
Author: Noel Grandin 
AuthorDate: Fri Jan 20 15:07:28 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 20 19:21:50 2023 +

no need to load the list of impress/draw modules from config

this is not something that changes

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

diff --git a/offapi/com/sun/star/drawing/framework/XModuleController.idl 
b/offapi/com/sun/star/drawing/framework/XModuleController.idl
index fab24be73a5d..8d9d9b3a9d7b 100644
--- a/offapi/com/sun/star/drawing/framework/XModuleController.idl
+++ b/offapi/com/sun/star/drawing/framework/XModuleController.idl
@@ -23,12 +23,7 @@ interface XView;
 
 /** The module controller is responsible for loading a module (ad-don,
 plugin, whatever the name) when it is first used.
-For this there is a
-list in the office configuration which associates resource URLs with
-service names which in turn are associated with modules (or dlls).  The
-path to the office configuration list is
-MultiPaneGUI/Framework/ResourceFactories in the
-Impress.xcu file.
+For this there is a list in the sd::framework::ModuleController 
class.
 */
 interface XModuleController
 {
diff --git a/officecfg/registry/data/org/openoffice/Office/Impress.xcu 
b/officecfg/registry/data/org/openoffice/Office/Impress.xcu
index 37ebdf4d005f..76c79668d321 100644
--- a/officecfg/registry/data/org/openoffice/Office/Impress.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Impress.xcu
@@ -60,128 +60,6 @@
 
   
 
-
-  
-
-  
-com.sun.star.drawing.framework.BasicPaneFactory
-  
-  
-
-  
-private:resource/pane/CenterPane
-  
-
-
-  
-private:resource/pane/LeftImpressPane
-  
-
-
-  
-private:resource/pane/LeftDrawPane
-  
-
-  
-
-
-  
-com.sun.star.drawing.framework.BasicViewFactory
-  
-  
-
-  
-private:resource/view/ImpressView
-  
-
-
-  
-private:resource/view/GraphicView
-  
-
-
-  
-private:resource/view/OutlineView
-  
-
-
-  
-private:resource/view/NotesView
-  
-
-
-  
-private:resource/view/HandoutView
-  
-
-
-  
-private:resource/view/SlideSorter
-  
-
-
-  
-private:resource/view/PresentationView
-  
-
-  
-
-
-  
-com.sun.star.drawing.framework.BasicToolBarFactory
-  
-  
-
-  
-private:resource/toolbar/ViewTabBar
-  
-
-  
-
-
-  
-com.sun.star.comp.Draw.framework.TaskPanelFactory
-  
-  
-
-  
-private:resource/toolpanel/AllMasterPages
-  
-
-
-  
-private:resource/toolpanel/RecentMasterPages
-  
-
-
-  
-private:resource/toolpanel/UsedMasterPages
-  
-
-
-  
-private:resource/toolpanel/Layouts
-  
-
-
-  
-private:resource/toolpanel/TableDesign
-  
-
-
-  
-private:resource/toolpanel/CustomAnimations
-  
-
-
-  
-private:resource/toolpanel/SlideTransitions
-  
-
-  
-
-  
-
   
   
 
diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
index e650c48e9766..cd7f06b87070 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Impress.

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

2023-01-17 Thread Fred Kruse (via logerrit)
 offapi/com/sun/star/style/ParagraphProperties.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 924005b06732d6d7aea2437a9edf2550878f9324
Author: Fred Kruse 
AuthorDate: Tue Jan 17 16:07:25 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Jan 17 17:36:14 2023 +

ParagraphProperties.idl: SortedTextId: Changed 7.5 -> 7.6

Change-Id: Iebfae0952f0c2d7219cb00bf1af73e1a75f4f256
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145674
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/style/ParagraphProperties.idl 
b/offapi/com/sun/star/style/ParagraphProperties.idl
index a7d6c059bd8a..49fa8d50d4d6 100644
--- a/offapi/com/sun/star/style/ParagraphProperties.idl
+++ b/offapi/com/sun/star/style/ParagraphProperties.idl
@@ -425,7 +425,7 @@ published service ParagraphProperties
 other paragraphs of the same text, i.e. a paragraph with lower
 identifier is there before the other ones with greater values.
 This property depends on implementation details and is considered 
experimental.
-@since LibreOffice 7.5
+@since LibreOffice 7.6
  */
 [optional, property, readonly] long SortedTextId;
 };


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

2023-01-12 Thread Caolán McNamara (via logerrit)
 offapi/com/sun/star/drawing/LineJoint.idl |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 052e77bdd2b74ff068b89ecb6229e31d1854624c
Author: Caolán McNamara 
AuthorDate: Wed Jan 11 16:18:22 2023 +
Commit: Caolán McNamara 
CommitDate: Thu Jan 12 13:52:54 2023 +

document that LineJoint_MIDDLE is treated the same as MITER

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

diff --git a/offapi/com/sun/star/drawing/LineJoint.idl 
b/offapi/com/sun/star/drawing/LineJoint.idl
index 6b3443be28a9..8d749a4e6157 100644
--- a/offapi/com/sun/star/drawing/LineJoint.idl
+++ b/offapi/com/sun/star/drawing/LineJoint.idl
@@ -28,7 +28,8 @@ published enum LineJoint
 /** the joint between lines will not be connected
  */
 NONE,
-/** the middle value between the joints is used
+/**
+@deprecated - now the same as MITER
  */
 MIDDLE,
 /** the edges of the thick lines will be joined by lines


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

2023-01-09 Thread offtkp (via logerrit)
 offapi/com/sun/star/text/ContentControl.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2dd45d5d81afdd5c550b9929dde42ac04d9dd176
Author: offtkp 
AuthorDate: Tue Jan 3 15:26:51 2023 +0200
Commit: Miklos Vajna 
CommitDate: Mon Jan 9 09:01:55 2023 +

Fix wrong version in comment

Change-Id: I4185b019b8dbce7de9bf853c0416fd43201b1f60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144987
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/offapi/com/sun/star/text/ContentControl.idl 
b/offapi/com/sun/star/text/ContentControl.idl
index c2fe46757656..34beff3cb127 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -94,7 +94,7 @@ service ContentControl
 
 /** The appearance: just remembered.
 
-@since LibreOffice 7.5
+@since LibreOffice 7.6
 */
 [optional, property] string Appearance;
 


[Libreoffice-commits] core.git: offapi/com oox/source sw/inc sw/qa sw/source writerfilter/source

2023-01-03 Thread offtkp (via logerrit)
 offapi/com/sun/star/text/ContentControl.idl   |6 
 oox/source/token/tokens.txt   |1 
 sw/inc/formatcontentcontrol.hxx   |7 +
 sw/inc/unoprnms.hxx   |1 
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx|2 +
 sw/source/core/txtnode/attrcontentcontrol.cxx |2 +
 sw/source/core/unocore/unocontentcontrol.cxx  |   28 ++
 sw/source/core/unocore/unomap1.cxx|1 
 sw/source/filter/ww8/docxattributeoutput.cxx  |   18 ++
 sw/source/filter/ww8/docxattributeoutput.hxx  |1 
 writerfilter/source/dmapper/DomainMapper.cxx  |   16 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |6 
 writerfilter/source/dmapper/SdtHelper.cxx |4 +++
 writerfilter/source/dmapper/SdtHelper.hxx |6 
 writerfilter/source/ooxml/model.xml   |   12 +
 15 files changed, 111 insertions(+)

New commits:
commit a3d79543e0221ee810e0b2dd871d2afbf5ee198b
Author: offtkp 
AuthorDate: Wed Dec 28 00:10:34 2022 +0200
Commit: Miklos Vajna 
CommitDate: Tue Jan 3 08:04:12 2023 +

docx: Preserve w15:appearance SdtPr attribute

Now roundtrips the w15:appearance value which dictates whether there's
an effect when hovering a placeholder.

Change-Id: I3c911a0cfe31e235b9d981bbff0c1bb5827a85ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144845
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/offapi/com/sun/star/text/ContentControl.idl 
b/offapi/com/sun/star/text/ContentControl.idl
index cb980a24b0ff..c2fe46757656 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -92,6 +92,12 @@ service ContentControl
 */
 [optional, property] string Color;
 
+/** The appearance: just remembered.
+
+@since LibreOffice 7.5
+*/
+[optional, property] string Appearance;
+
 /** Combo box that allows free-form text as well, i.e. not dropdown.
 
 @since LibreOffice 7.5
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index b66321243320..25951891d2a7 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -600,6 +600,7 @@ anyType
 anyURI
 appName
 appWorkspace
+appearance
 apples
 applyAlignment
 applyAlignmentFormats
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index 889faeb89a07..c27253a5aab8 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -170,6 +170,9 @@ class SW_DLLPUBLIC SwContentControl : public 
sw::BroadcastingModify
 /// The color: just remembered.
 OUString m_aColor;
 
+/// The appearance: just remembered.
+OUString m_aAppearance;
+
 /// The alias: just remembered.
 OUString m_aAlias;
 
@@ -353,6 +356,10 @@ public:
 
 const OUString& GetColor() const { return m_aColor; }
 
+void SetAppearance(const OUString& rAppearance) { m_aAppearance = 
rAppearance; }
+
+const OUString& GetAppearance() const { return m_aAppearance; }
+
 void SetAlias(const OUString& rAlias) { m_aAlias = rAlias; }
 
 const OUString& GetAlias() const { return m_aAlias; }
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 17b13d02dc8e..42a38fdef0aa 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -915,6 +915,7 @@ inline constexpr OUStringLiteral 
UNO_NAME_DATA_BINDING_PREFIX_MAPPINGS
 inline constexpr OUStringLiteral UNO_NAME_DATA_BINDING_XPATH = 
u"DataBindingXpath";
 inline constexpr OUStringLiteral UNO_NAME_DATA_BINDING_STORE_ITEM_ID = 
u"DataBindingStoreItemID";
 inline constexpr OUStringLiteral UNO_NAME_COLOR = u"Color";
+inline constexpr OUStringLiteral UNO_NAME_APPEARANCE = u"Appearance";
 inline constexpr OUStringLiteral UNO_NAME_ALIAS = u"Alias";
 inline constexpr OUStringLiteral UNO_NAME_TAG = u"Tag";
 inline constexpr OUStringLiteral UNO_NAME_ID = u"Id";
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
index f3188551362a..86673055a0cd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
@@ -421,6 +421,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDateContentControlExport)
 xContentControlProps->setPropertyValue("DataBindingXpath", 
uno::Any(OUString("/ns0:employees[1]/ns0:employee[1]/ns0:hireDate[1]")));
 xContentControlProps->setPropertyValue("DataBindingStoreItemID", 
uno::Any(OUString("{241A8A02-7FFD-488D-8827-63FBE74E8BC9}")));
 xContentControlProps->setPropertyValue("Color", 
uno::Any(OUString("008000")));
+xContentControlProps->setPropertyValue("Appearance", 
uno::Any(OUString("hidden")));
 xContentControlProps->setPropertyValue("Alias", 
uno::Any(OUString("myalias")));
 xContentControlProps->setPropertyValue("Tag", uno::Any(OUString("mytag")));
 xContentControlProps->setPropertyValue("Id", 
uno

[Libreoffice-commits] core.git: offapi/com schema/libreoffice sw/qa sw/source writerfilter/qa writerfilter/source xmloff/qa xmloff/source

2022-12-15 Thread Justin Luth (via logerrit)
 offapi/com/sun/star/text/ContentControl.idl  |2 +
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng  |5 ++
 sw/qa/core/unocore/unocore.cxx   |2 +
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx   |2 +
 sw/qa/extras/ooxmlexport/ooxmlexport18.cxx   |6 +++
 sw/source/filter/ww8/docxattributeoutput.cxx |   19 
+-
 sw/source/filter/ww8/docxattributeoutput.hxx |4 +-
 writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx   |4 ++
 writerfilter/qa/cppunittests/dmapper/data/sdt-run-rich-text.docx |binary
 writerfilter/source/dmapper/DomainMapper.cxx |4 +-
 xmloff/qa/unit/data/content-control-alias.fodt   |2 -
 xmloff/qa/unit/text.cxx  |5 ++
 xmloff/source/text/txtparae.cxx  |7 +++
 xmloff/source/text/xmlcontentcontrolcontext.cxx  |   13 ++
 xmloff/source/text/xmlcontentcontrolcontext.hxx  |1 
 15 files changed, 64 insertions(+), 12 deletions(-)

New commits:
commit 54599383a2f86b83c237a10f7d9fce492e798487
Author: Justin Luth 
AuthorDate: Wed Nov 16 21:56:51 2022 -0500
Commit: Miklos Vajna 
CommitDate: Fri Dec 16 07:34:20 2022 +

sw content controls: enhance preserve id

Follow-up to 100c914d44ae8f362924fe567d7d41d0033ae8ad
which added the initial id preservation for DOCX.

adding DOCX block SDT grabbaging, ODF import/export
[content controls can't exist in DOC format]

The ID field is CRITICAL to preserve for VBA purposes.
This patch adjusts BlockSDT to also round-trip the id
instead of just creating a random one.

m_nRunSdtPrToken  FSNS(XML_w, XML_id) since 2021
with 5f3af56b2c0ef6c628a7cfe5ce6e86f8e1765f5f,
so I removed that part of the clause.

I had thought about changing the ID to use a string instead of an int,
but then the integer version was adopted to fix a regression
in the commit mentioned earlier.

I think it is AWFUL to have a number as the identifier
when it will be used in StarBASIC. The VBA guys have to deal
with it, but it would be nice to do something reasonable
for LO native access to content controls.

However, the concern would be if we allow VBA macro content created in LO
to be exported to DOCX format - that would cause problems converting
from a string ID to a number ID. VBA editing already is happening to
some extent, and mmeeks seems interested in enabling it.
So over-all it seems best to just stick with an integer ID.

I used the commits for  and  to compose this patch.
XML_ID already existed in include/xmloff/xmltoken.hxx
and "id" already exists in xmloff/source/token/tokens.txt

The ID can be used in VBA to select a specific control.
The id (which is a positive or negative integer in DOCX)
specifies a unique control - either by passing the number as a string
(of the UNSIGNED value) or by passing as a float (specified with #).

For example:
msgbox ActiveDocument.ContentControls(2587720202#).ID
msgbox ActiveDocument.ContentControls("2587720202").ID
but not as an integer since that is used for index access.
dim index as integer
index = 1
msgbox ActiveDocument.ContentControls(index).ID

make CppunitTest_writerfilter_dmapper CPPUNIT_TEST_NAME=testSdtRunRichText
make CppunitTest_sw_ooxmlexport17 
CPPUNIT_TEST_NAME=testDateContentControlExport
make CppunitTest_sw_ooxmlexport18 CPPUNIT_TEST_NAME=testTdf151912
make CppunitTest_sw_core_unocore CPPUNIT_TEST_NAME=testContentControlDate
make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlExport
make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlImport

Change-Id: I5c4022dc932d941fad9da6d75ce899ee1ff66ff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142818
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/offapi/com/sun/star/text/ContentControl.idl 
b/offapi/com/sun/star/text/ContentControl.idl
index ce741d9b2926..cb980a24b0ff 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -105,12 +105,14 @@ service ContentControl
 [optional, property] boolean DropDown;
 
 /** The alias: kind of a human-readable title / description, show up on 
the UI.
+   -also used by VBA to group controls into a smaller, indexed 
collection
 
 @since LibreOffice 7.5
 */
 [optional, property] string Alias;
 
 /** The tag: similar to Alias, but is meant to be machine-readable.
+ -also used by VBA to group controls into a smaller, indexed 
collection
 
 @since LibreOffice 7.5
 */

[Libreoffice-commits] core.git: offapi/com oox/source schema/libreoffice sw/inc sw/qa sw/source writerfilter/qa writerfilter/source xmloff/qa xmloff/source

2022-12-13 Thread Justin Luth (via logerrit)
 offapi/com/sun/star/text/ContentControl.idl  |6 ++
 oox/source/token/tokens.txt  |1 
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng  |5 +
 sw/inc/formatcontentcontrol.hxx  |7 ++
 sw/inc/unoprnms.hxx  |1 
 sw/qa/core/unocore/unocore.cxx   |2 
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx   |2 
 sw/source/core/txtnode/attrcontentcontrol.cxx|2 
 sw/source/core/unocore/unocontentcontrol.cxx |   29 
++
 sw/source/core/unocore/unomap1.cxx   |1 
 sw/source/filter/ww8/docxattributeoutput.cxx |   16 +
 sw/source/filter/ww8/docxattributeoutput.hxx |2 
 writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx   |4 +
 writerfilter/qa/cppunittests/dmapper/data/sdt-run-rich-text.docx |binary
 writerfilter/source/dmapper/DomainMapper.cxx |   15 +
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|5 +
 writerfilter/source/dmapper/SdtHelper.cxx|5 +
 writerfilter/source/dmapper/SdtHelper.hxx|6 ++
 writerfilter/source/ooxml/model.xml  |4 +
 xmloff/qa/unit/data/content-control-alias.fodt   |2 
 xmloff/qa/unit/text.cxx  |5 +
 xmloff/source/text/txtparae.cxx  |8 ++
 xmloff/source/text/xmlcontentcontrolcontext.cxx  |   14 
 xmloff/source/text/xmlcontentcontrolcontext.hxx  |1 
 24 files changed, 142 insertions(+), 1 deletion(-)

New commits:
commit 908d058c67c4efb3dc142ea8d6ad59badf01c9c6
Author: Justin Luth 
AuthorDate: Fri Dec 2 10:48:46 2022 -0500
Commit: Miklos Vajna 
CommitDate: Wed Dec 14 07:14:59 2022 +

tdf#151548 sw content controls: preserve tabIndex

This has to be vital to keyboard navigation.
Certainly it is good to have it imported
before we start to consider tab-movements
for form controls.

All tabIndex 1's are processed (in placement order)
and then the 2's etc. 0's are to be done last.

XML_TAB_INDEX already existed in include/xmloff/xmltoken.hxx
and "tab-index" already exists in xmloff/source/token/tokens.txt

make CppunitTest_writerfilter_dmapper CPPUNIT_TEST_NAME=testSdtRunRichText
make CppunitTest_sw_ooxmlexport17 
CPPUNIT_TEST_NAME=testDateContentControlExport
make CppunitTest_sw_core_unocore CPPUNIT_TEST_NAME=testContentControlDate
make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlExport
make CppunitTest_xmloff_text CPPUNIT_TEST_NAME=testAliasContentControlImport

No existing unit test found containing blockSDT with tabIndex.

Change-Id: I8a958844e6192b079a2b22a62dedfd8739021f4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143603
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/offapi/com/sun/star/text/ContentControl.idl 
b/offapi/com/sun/star/text/ContentControl.idl
index 59894741de2b..ce741d9b2926 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -128,6 +128,12 @@ service ContentControl
 */
 [optional, property] long Id;
 
+/** Describes the order in which keyboard navigation moves between controls
+
+@since LibreOffice 7.6
+*/
+[optional, property] unsigned long TabIndex;
+
 /** Describes whether the control itself and/or its data can be modified 
or deleted by the user.
 
 @since LibreOffice 7.6
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index 8ed5687983b6..b66321243320 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -5123,6 +5123,7 @@ tOff
 tR
 tab
 tabColor
+tabIndex
 tabLst
 tabRatio
 tabSelected
diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng 
b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
index 613ded76689c..ea1083bb1fbc 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -3008,6 +3008,11 @@ 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
   
 
   
+  
+
+  
+
+  
   
 
   
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index e561fa6e23fb..77e6addbca09 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -179,6 +179,9 @@ class SW_DLLPUBLIC SwContentControl : public 
sw::BroadcastingModify
 /// The id: just remembered.
 sal_Int32 m_

[Libreoffice-commits] core.git: offapi/com oox/source schema/libreoffice sw/inc sw/qa sw/source sw/uiconfig writerfilter/source xmloff/source

2022-12-09 Thread Michael Stahl (via logerrit)
 offapi/com/sun/star/text/BaseFrameProperties.idl|   10 +
 oox/source/token/namespaces-strict.txt  |2 
 oox/source/token/namespaces.txt |2 
 oox/source/token/tokens.txt |1 
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |   10 +
 sw/inc/hintids.hxx  |   32 +--
 sw/qa/extras/globalfilter/data/tdf143311-1.docx |binary
 sw/qa/extras/globalfilter/globalfilter.cxx  |  101 
 sw/source/core/bastyp/init.cxx  |4 
 sw/source/core/text/EnhancedPDFExportHelper.cxx |3 
 sw/source/core/unocore/unoframe.cxx |9 +
 sw/source/core/unocore/unomapproperties.hxx |1 
 sw/source/filter/ww8/docxattributeoutput.cxx|   15 +
 sw/source/ui/frmdlg/frmpage.cxx |   10 +
 sw/source/uibase/inc/frmpage.hxx|1 
 sw/uiconfig/swriter/ui/frmaddpage.ui|   20 ++
 writerfilter/source/dmapper/DomainMapper.cxx|3 
 writerfilter/source/dmapper/GraphicImport.cxx   |6 
 writerfilter/source/dmapper/PropertyIds.cxx |1 
 writerfilter/source/dmapper/PropertyIds.hxx |1 
 writerfilter/source/ooxml/model.xml |   32 +++
 xmloff/source/text/XMLTextFrameContext.cxx  |   10 +
 xmloff/source/text/txtparae.cxx |6 
 23 files changed, 258 insertions(+), 22 deletions(-)

New commits:
commit 31084ebb59093be7dfe5ab53a20fdb3bcfde34b6
Author: Michael Stahl 
AuthorDate: Thu Dec 8 10:54:18 2022 +0100
Commit: Michael Stahl 
CommitDate: Fri Dec 9 16:03:20 2022 +

tdf#143311 offapi,oox,writerfilter,xmloff,sw: decorative flag on flys

* sw core RES_DECORATIVE as a FRMATR
* sw API SwXFrame property "Decorative"
* UI checkbox "Decorative"
* ODF import/export as loext:decorative on draw:frame
* DOCX export
* DOCX import - very non-obvious how to get it from model.xml to dmapper
* PDF/UA export: tag flys with this flag as Artifact
* test for DOCX filters, ODF filters, PDF export

Change-Id: I1ceb67fdd4e1cfa212aafdeb1c5f4ccd873d433e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143815
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/offapi/com/sun/star/text/BaseFrameProperties.idl 
b/offapi/com/sun/star/text/BaseFrameProperties.idl
index 72bec7ffe63c..3108067a0ad5 100644
--- a/offapi/com/sun/star/text/BaseFrameProperties.idl
+++ b/offapi/com/sun/star/text/BaseFrameProperties.idl
@@ -363,6 +363,16 @@ published service BaseFrameProperties
 @since LibreOffice 7.4
 */
 [optional, property] string Tooltip;
+
+/** Determines if the frame is purely decorative.
+
+If `TRUE`, it is considered not part of the document content,
+and may be ignored by assistive technologies.
+
+@since LibreOffice 7.5
+*/
+[optional, property] boolean Decorative;
+
 };
 
 
diff --git a/oox/source/token/namespaces-strict.txt 
b/oox/source/token/namespaces-strict.txt
index 7449dca99a33..59631432eb2f 100644
--- a/oox/source/token/namespaces-strict.txt
+++ b/oox/source/token/namespaces-strict.txt
@@ -92,6 +92,8 @@ xr2 
http://schemas.microsoft.com/office/spreadsheetml/2015/r
 
 # extlst namespaces
 
+adec
http://schemas.microsoft.com/office/drawing/2017/decorative
+
 # xls14Lst for features introduced by excel 2010
 xls14Lst   
http://schemas.microsoft.com/office/spreadsheetml/2009/9/main
 
diff --git a/oox/source/token/namespaces.txt b/oox/source/token/namespaces.txt
index 849caa547695..0790c65d8817 100644
--- a/oox/source/token/namespaces.txt
+++ b/oox/source/token/namespaces.txt
@@ -92,6 +92,8 @@ xr2 
http://schemas.microsoft.com/office/spreadsheetml/2015/r
 
 # extlst namespaces
 
+adec
http://schemas.microsoft.com/office/drawing/2017/decorative
+
 # xls14Lst for features introduced by excel 2010
 xls14Lst   
http://schemas.microsoft.com/office/spreadsheetml/2009/9/main
 
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index d1a40140add9..8ed5687983b6 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -480,6 +480,7 @@ additive
 addlxml
 addressBook
 addressFieldName
+adec
 adj
 adjLst
 adjust
diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng 
b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
index 3b2e0d4b2bbc..ee9b89ded8a9 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -3304,4 +3304,14 @@ 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:l

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

2022-11-22 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/ContentControl.idl  |6 +++
 sw/inc/formatcontentcontrol.hxx  |7 
 sw/inc/unoprnms.hxx  |1 
 sw/qa/extras/ooxmlexport/data/sdt-duplicated-id.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport18.cxx   |   17 +++
 sw/source/core/txtnode/attrcontentcontrol.cxx|2 +
 sw/source/core/unocore/unocontentcontrol.cxx |   29 +++
 sw/source/core/unocore/unomap1.cxx   |1 
 sw/source/filter/ww8/docxattributeoutput.cxx |6 +++
 writerfilter/source/dmapper/DomainMapper.cxx |6 +++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|5 +++
 writerfilter/source/dmapper/SdtHelper.cxx|5 +++
 writerfilter/source/dmapper/SdtHelper.hxx|6 +++
 13 files changed, 91 insertions(+)

New commits:
commit 100c914d44ae8f362924fe567d7d41d0033ae8ad
Author: Miklos Vajna 
AuthorDate: Tue Nov 22 14:30:08 2022 +0100
Commit: Miklos Vajna 
CommitDate: Tue Nov 22 19:36:37 2022 +0100

DOCX filter: fix  creating both grab-bag and content control for 


Exporting the DOCX bugdoc back to DOCX resulted in a document that can't
be opened in Word.

Examining the output, the problem is that the document had 2 inline
 elements with , and we mapped such  elements to
both grab-bags and content controls, leading to duplicate 
elements on export. This is schema-valid, but it goes against the
intention of the spec and Word can't open it.

The initial fix was just a writerfilter/ tweak to avoid grab-bagging
 for inline , but CppunitTest_sw_ooxmlexport4's
testSimpleSdts points out that in other cases we already require
preserving . Fix the problem by storing  in the content
control, which is essentially a subset of
.

Thanks to Justin Luth! - he prototyped the DOCX filter for .

Change-Id: I9f002b770049ce8be30253d0b39410d9a58981dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143117
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/text/ContentControl.idl 
b/offapi/com/sun/star/text/ContentControl.idl
index 7bdb39fa5101..6abcc79fd204 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -121,6 +121,12 @@ service ContentControl
 @since LibreOffice 7.5
 */
 [optional, property, readonly] string DateString;
+
+/** A unique numeric id, used by macros to identify a specific control.
+
+@since LibreOffice 7.5
+*/
+[optional, property] long Id;
 };
 
 
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index 2d5676a1e3dd..3ac6848e388f 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -176,6 +176,9 @@ class SW_DLLPUBLIC SwContentControl : public 
sw::BroadcastingModify
 /// The tag: just remembered.
 OUString m_aTag;
 
+/// The id: just remembered.
+sal_Int32 m_nId = 0;
+
 /// Stores a list item index, in case the doc model is not yet updated.
 std::optional m_oSelectedListItem;
 
@@ -342,6 +345,10 @@ public:
 
 const OUString& GetTag() const { return m_aTag; }
 
+void SetId(sal_Int32 nId) { m_nId = nId; }
+
+sal_Int32 GetId() const { return m_nId; }
+
 void SetReadWrite(bool bReadWrite) { m_bReadWrite = bReadWrite; }
 
 bool GetReadWrite() const { return m_bReadWrite; }
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 4249949add6d..69ef10b881f9 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -893,6 +893,7 @@
 #define UNO_NAME_COLOR "Color"
 #define UNO_NAME_ALIAS "Alias"
 #define UNO_NAME_TAG "Tag"
+#define UNO_NAME_ID "Id"
 #define UNO_NAME_DATE_STRING "DateString"
 #endif
 
diff --git a/sw/qa/extras/ooxmlexport/data/sdt-duplicated-id.docx 
b/sw/qa/extras/ooxmlexport/data/sdt-duplicated-id.docx
new file mode 100644
index ..d21894df3007
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/sdt-duplicated-id.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
index af42616d778d..71d28b313d2a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
@@ -155,6 +155,23 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf150966_regularInset)
 assertXPathAttrs(pXmlDoc, "//wps:bodyPr", { { "tIns", "179640" }, { 
"bIns", "36" } });
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testSdtDuplicatedId)
+{
+// Given a document with 2 inline , with each a :
+createSwDoc("sdt-duplicated-id.docx");
+
+// When exporting that back to DOCX:
+save("Office Open XML Text");
+
+// Then make sure we write 2  and no duplicates:
+xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+// Without the accompanying fix in plac

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

2022-11-22 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/XTextViewTextRangeSupplier.idl |7 +
 sw/qa/uibase/uno/uno.cxx|   57 
 sw/source/uibase/uno/unotxvw.cxx|   18 +
 3 files changed, 81 insertions(+), 1 deletion(-)

New commits:
commit 2302ebefb2e25878e8fe1e64d208f265f87d5b9b
Author: Miklos Vajna 
AuthorDate: Tue Nov 22 08:40:47 2022 +0100
Commit: Miklos Vajna 
CommitDate: Tue Nov 22 10:07:52 2022 +0100

sw, createTextRangeByPixelPosition(): fix crash when the position is an 
image

Using createTextRangeByPixelPosition() with a pixel position that leads
to a graphic node resulted in a crash.

The direct reason for this is that the makeMark() call in
SwXTextRange::SetPositions() returns nullptr in case rPaM points to a
graphic node, but later we dereference that result unconditionally. This
also uncovers that the XTextRange returned by
createTextRangeByPixelPosition() is meant to point to a text node, but a
pixel position may be closest to a graphic node.

Fix the problem by explicitly checking for graphic nodes; and try to
look up the anchor position of such graphics, which will be definitely a
text node.

In practice this will mean that in case the image's anchor type is
as-char, then we'll return a cursor position which will be on the left
hand side of the image.

Change-Id: Ief58148247fe3cd4371ed245b4eff5b45ca2aa15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143092
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/text/XTextViewTextRangeSupplier.idl 
b/offapi/com/sun/star/text/XTextViewTextRangeSupplier.idl
index 56ea30efc070..faa85578c458 100644
--- a/offapi/com/sun/star/text/XTextViewTextRangeSupplier.idl
+++ b/offapi/com/sun/star/text/XTextViewTextRangeSupplier.idl
@@ -25,7 +25,12 @@ module com {  module sun {  module star {  module text {
  */
 interface XTextViewTextRangeSupplier: com::sun::star::uno::XInterface
 {
-/** @returns
+/** creates the text range of the document model position at a 
view-dependent pixel position.
+
+Note that in case the model position is a graphic, then the model 
position of its anchor is
+returned.
+
+@returns
 the text range of the document position.
  */
 com::sun::star::text::XTextRange createTextRangeByPixelPosition([in] 
com::sun::star::awt::Point PixelPosition);
diff --git a/sw/qa/uibase/uno/uno.cxx b/sw/qa/uibase/uno/uno.cxx
index a1484b1ce629..3364ef8b0cd2 100644
--- a/sw/qa/uibase/uno/uno.cxx
+++ b/sw/qa/uibase/uno/uno.cxx
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -20,6 +21,11 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 /// Covers sw/source/uibase/uno/ fixes.
 class SwUibaseUnoTest : public SwModelTestBase
@@ -94,6 +100,57 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, 
testCreateTextRangeByPixelPosition)
 CPPUNIT_ASSERT_EQUAL(static_cast(1), nActual);
 }
 
+CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, 
testCreateTextRangeByPixelPositionGraphic)
+{
+// Given a document with an as-char image and the center of that image in 
pixels:
+createSwDoc();
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xTextGraphic(
+xFactory->createInstance("com.sun.star.text.TextGraphicObject"), 
uno::UNO_QUERY);
+xTextGraphic->setPropertyValue("AnchorType",
+   
uno::Any(text::TextContentAnchorType_AS_CHARACTER));
+xTextGraphic->setPropertyValue("Width", 
uno::Any(static_cast(1)));
+xTextGraphic->setPropertyValue("Height", 
uno::Any(static_cast(1)));
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xBodyText = xTextDocument->getText();
+uno::Reference xCursor(xBodyText->createTextCursor());
+uno::Reference xTextContent(xTextGraphic, 
uno::UNO_QUERY);
+xBodyText->insertTextContent(xCursor, xTextContent, false);
+SwDoc* pDoc = getSwDoc();
+SwDocShell* pDocShell = pDoc->GetDocShell();
+SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+SwRootFrame* pLayout = pWrtShell->GetLayout();
+SwFrame* pPage = pLayout->GetLower();
+SwFrame* pBody = pPage->GetLower();
+SwFrame* pText = pBody->GetLower();
+SwSortedObjs& rDrawObjs = *pText->GetDrawObjs();
+SwAnchoredObject* pAnchored = rDrawObjs[0];
+Point aLogic = pAnchored->GetObjRect().Center();
+SwView* pView = pDocShell->GetView();
+SwEditWin& rEditWin = pView->GetEditWin();
+Point aPixel = rEditWin.LogicToPixel(aLogic);
+
+// When converting that pixel position to a document model position (text 
range):
+uno::Reference xModel(mxComponent, uno::UNO_QUERY);
+uno::Reference xControllers = 
xModel->getControllers();
+uno::Reference 
xController(xControllers->nextElement(),
+ 

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

2022-11-19 Thread Andrea Gelmini (via logerrit)
 offapi/com/sun/star/chart2/XChartTypeTemplate.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 16a7e944ab1b318fafb7dd48d48379168403d2e8
Author: Andrea Gelmini 
AuthorDate: Sat Nov 19 17:13:48 2022 +0100
Commit: Julien Nabet 
CommitDate: Sat Nov 19 23:02:12 2022 +0100

Fix typo

Change-Id: Iaa40db0f7799c70f39bb74d9768f84ff236502ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142977
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/offapi/com/sun/star/chart2/XChartTypeTemplate.idl 
b/offapi/com/sun/star/chart2/XChartTypeTemplate.idl
index 147343d4b685..994f5e9ea876 100644
--- a/offapi/com/sun/star/chart2/XChartTypeTemplate.idl
+++ b/offapi/com/sun/star/chart2/XChartTypeTemplate.idl
@@ -164,7 +164,7 @@ interface XChartTypeTemplate : 
::com::sun::star::uno::XInterface
  Then I removed the whole XChartTypeTemplate interface in
  commit 58766f997d59e4684f2887fd8cdeb12d2f8a9366.
  Which turned out to be a bad idea, so I restored it.
- I restored it in this form because I want to restore binary compatibily 
with vtable
+ I restored it in this form because I want to restore binary compatibility 
with vtable
  layout, but I don't want to restore the XDataInterpreter stuff, which was 
not
  useful for external use.
 */


[Libreoffice-commits] core.git: offapi/com offapi/UnoApi_offapi.mk sw/source

2022-11-10 Thread Miklos Vajna (via logerrit)
 offapi/UnoApi_offapi.mk  |1 
 offapi/com/sun/star/text/ContentControls.idl |   39 ---
 sw/source/core/inc/unocontentcontrol.hxx |8 +
 sw/source/core/unocore/unocontentcontrol.cxx |   12 
 4 files changed, 2 insertions(+), 58 deletions(-)

New commits:
commit 652df8c733f381cac4e22286acd12a2ec72d41ae
Author: Miklos Vajna 
AuthorDate: Thu Nov 10 08:58:11 2022 +0100
Commit: Miklos Vajna 
CommitDate: Thu Nov 10 09:58:25 2022 +0100

sw content controls: drop not needed XServiceInfo impl

As noted in

,
introducing a dedicated css.text.ContentControls service is actually not
needed and client code should be fine with just an "anonymous" object
returned by getContentControls() + implementing XIndexAccess.

Remove it before somebody starts to depend on it. Let's rather have a
bit of inconsistency (e.g. SwXFootnotes implements XServiceInfo, while
SwXContentControls not) than an XServiceInfo implementation that we'll
have to support from now on, without a user.

Change-Id: Ifde4fb6bcafdffabb189447415b89b01c9675296
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142511
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 550422ded680..a64d2154bfd4 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1344,7 +1344,6 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_noheader,offapi,com/sun/star/text,\
ChainedTextFrame \
ChapterNumberingRule \
ContentControl \
-   ContentControls \
ContentIndex \
ContentIndexMark \
Defaults \
diff --git a/offapi/com/sun/star/text/ContentControls.idl 
b/offapi/com/sun/star/text/ContentControls.idl
deleted file mode 100644
index d544b4ee767f..
--- a/offapi/com/sun/star/text/ContentControls.idl
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
- module com {  module sun {  module star {  module text {
-
-/** provides access to the content controls of a (text)
-document.
-
-@since LibreOffice 7.5
- */
-service ContentControls
-{
-
-/** provides access to the content controls of the document.
- */
-interface com::sun::star::container::XIndexAccess;
-
-};
-
-
-}; }; }; };
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/unocontentcontrol.hxx 
b/sw/source/core/inc/unocontentcontrol.hxx
index c77aad1d9853..a541313c6e55 100644
--- a/sw/source/core/inc/unocontentcontrol.hxx
+++ b/sw/source/core/inc/unocontentcontrol.hxx
@@ -156,7 +156,8 @@ public:
 };
 
 /// UNO wrapper around SwContentControlManager.
-class SwXContentControls final : public SwSimpleIndexAccessBaseClass, public 
SwUnoCollection
+class SwXContentControls final : public 
cppu::WeakImplHelper,
+ public SwUnoCollection
 {
 ~SwXContentControls() override;
 
@@ -170,11 +171,6 @@ public:
 // XElementAccess
 css::uno::Type SAL_CALL getElementType() override;
 sal_Bool SAL_CALL hasElements() override;
-
-// XServiceInfo
-OUString SAL_CALL getImplementationName() override;
-sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override;
-css::uno::Sequence SAL_CALL getSupportedServiceNames() override;
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unocontentcontrol.cxx 
b/sw/source/core/unocore/unocontentcontrol.cxx
index fbded5b45baf..175e12f35165 100644
--- a/sw/source/core/unocore/unocontentcontrol.cxx
+++ b/sw/source/core/unocore/unocontentcontrol.cxx
@@ -1359,16 +1359,4 @@ sal_Bool SwXContentControls::hasElements()
 return !GetDoc()->GetContentControlManager().IsEmpty();
 }
 
-OUString SwXContentControls::getImplementationName() { return 
"SwXContentControls"; }
-
-sal_Bool SwXContentControls::supportsService(const OUString& rServiceName)
-{
-return cppu::supportsService(this, rServiceName);
-}

[Libreoffice-commits] core.git: offapi/com schema/libreoffice sw/inc sw/qa sw/source writerfilter/source xmloff/qa xmloff/source

2022-11-09 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/ContentControl.idl |8 +-
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |6 +
 sw/inc/formatcontentcontrol.hxx |9 ++
 sw/inc/unoprnms.hxx |1 
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx  |1 
 sw/source/core/crsr/viscrs.cxx  |4 -
 sw/source/core/txtnode/attrcontentcontrol.cxx   |   17 +++--
 sw/source/core/unocore/unocontentcontrol.cxx|   40 
 sw/source/core/unocore/unomap1.cxx  |1 
 sw/source/filter/ww8/docxattributeoutput.cxx|2 
 sw/source/ui/misc/contentcontroldlg.cxx |2 
 sw/source/uibase/uno/unotxdoc.cxx   |2 
 sw/source/uibase/wrtsh/wrtsh1.cxx   |   13 ++-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx   |6 +
 xmloff/qa/unit/data/content-control-dropdown.fodt   |2 
 xmloff/qa/unit/text.cxx |2 
 xmloff/source/text/txtparae.cxx |9 ++
 xmloff/source/text/xmlcontentcontrolcontext.cxx |   13 +++
 xmloff/source/text/xmlcontentcontrolcontext.hxx |1 
 19 files changed, 120 insertions(+), 19 deletions(-)

New commits:
commit 56db6406b0b63a2d2d99024e7c311ebd874f3893
Author: Miklos Vajna 
AuthorDate: Wed Nov 9 15:50:01 2022 +0100
Commit: Miklos Vajna 
CommitDate: Wed Nov 9 17:00:00 2022 +0100

sw content controls: allow no list items in a dropdown

- Replace SwContentControl::HasListItems(), which assumed that the type
  is dropdown if we have list items. This is not valid, it's OK to have
  a dropdown with no list items. Add a GetDropDown() instead to check
  for the type, explicitly.

- UNO API sets the dropdown bit when list items are set and the type is
  not expilcitly combo box or drop down, to keep backwards
  compatibility with existing documents.

- No change to the edit shell, SwDropDownContentControlButton already
  checked if items are empty and used STR_DROP_DOWN_EMPTY_LIST in that
  case, but that was dead code previously.

- ODT & DOCX filters are now updated, ODF has a new
   attribute to specify that
  the type is a dropdown, explicitly.

Change-Id: Id577ba9639151549a8f953aab31685a73a898504
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142491
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/text/ContentControl.idl 
b/offapi/com/sun/star/text/ContentControl.idl
index ae8a0e1a9396..7bdb39fa5101 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -43,8 +43,6 @@ service ContentControl
 [optional, property] string UncheckedState;
 
 /** List items of a dropdown: DisplayText + Value pairs with string values 
for each item.
-
-If the list is non-empty, a dropdown control is provided on the UI.
 */
 [optional, property] sequence< sequence< 
com::sun::star::beans::PropertyValue > > ListItems;
 
@@ -100,6 +98,12 @@ service ContentControl
 */
 [optional, property] boolean ComboBox;
 
+/** Drop-down that does not allow free-form text, i.e. not combo box.
+
+@since LibreOffice 7.5
+*/
+[optional, property] boolean DropDown;
+
 /** The alias: kind of a human-readable title / description, show up on 
the UI.
 
 @since LibreOffice 7.5
diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng 
b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
index d475e90319b4..3b2e0d4b2bbc 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -2992,6 +2992,12 @@ 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
   
 
   
+  
+
+
+  
+
+  
   
 
   
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index adbc4c10a3e6..2d5676a1e3dd 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -152,6 +152,9 @@ class SW_DLLPUBLIC SwContentControl : public 
sw::BroadcastingModify
 /// Same as drop-down, but free-form input is also accepted.
 bool m_bComboBox = false;
 
+/// Same as combo box, but free-form input is not accepted.
+bool m_bDropDown = false;
+
 /// The placeholder's doc part: just remembered.
 OUString m_aPlaceholderDocPart;
 
@@ -234,8 +237,6 @@ public:
 
 const std::vector& GetListItems() const { return 
m_aListItems; }
 
-bool HasListItems() const { return !m_aListItems.empty(); }
-
 void SetListItems(const std::vector& rListItems)
 {
 m_aListItems = rListItems;
@@

[Libreoffice-commits] core.git: offapi/com offapi/UnoApi_offapi.mk sw/inc sw/qa sw/source

2022-11-08 Thread Miklos Vajna (via logerrit)
 offapi/UnoApi_offapi.mk   |2 
 offapi/com/sun/star/text/ContentControls.idl  |   39 ++
 offapi/com/sun/star/text/GenericTextDocument.idl  |3 
 offapi/com/sun/star/text/XContentControlsSupplier.idl |   36 +
 sw/inc/textcontentcontrol.hxx |3 
 sw/inc/unotxdoc.hxx   |6 +
 sw/qa/core/unocore/unocore.cxx|   50 
 sw/source/core/inc/unocontentcontrol.hxx  |   24 ++
 sw/source/core/txtnode/attrcontentcontrol.cxx |   19 
 sw/source/core/unocore/unocontentcontrol.cxx  |   70 ++
 sw/source/uibase/uno/unotxdoc.cxx |   20 +
 11 files changed, 272 insertions(+)

New commits:
commit a8448ded947925b0e9ddb4aeea7043f03933
Author: Miklos Vajna 
AuthorDate: Tue Nov 8 16:45:00 2022 +0100
Commit: Miklos Vajna 
CommitDate: Tue Nov 8 18:09:15 2022 +0100

sw: introduce an UNO manager for content controls

This builds on top of commit ad950f10dc382ea169f94a0c301ca8c424e7103e
(sw: introduce a manager for content controls, 2022-11-08) and exposes
it on the UNO API:

- add a new css.text.ContentControls service, backed by 
SwContentControlManager

- add a new css.text.XContentControlsSupplier interface, implemented by
  SwXTextDocument

- implement XIndexAccess in ContentControls

This allows UNO (and later VBA) clients to have random access to the
content controls in a document, which is much easier than the relatively
complex traversal of the whole doc model.

Change-Id: I26240c9ddbd06f4f57f5f65460ef75a2ace94825
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142454
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 331e5eadaf5f..550422ded680 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1344,6 +1344,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_noheader,offapi,com/sun/star/text,\
ChainedTextFrame \
ChapterNumberingRule \
ContentControl \
+   ContentControls \
ContentIndex \
ContentIndexMark \
Defaults \
@@ -3787,6 +3788,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/text,\
XAutoTextGroup \
XBookmarkInsertTool \
XBookmarksSupplier \
+   XContentControlsSupplier \
XChapterNumberingSupplier \
XDefaultNumberingProvider \
XDependentTextField \
diff --git a/offapi/com/sun/star/text/ContentControls.idl 
b/offapi/com/sun/star/text/ContentControls.idl
new file mode 100644
index ..d544b4ee767f
--- /dev/null
+++ b/offapi/com/sun/star/text/ContentControls.idl
@@ -0,0 +1,39 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+ module com {  module sun {  module star {  module text {
+
+/** provides access to the content controls of a (text)
+document.
+
+@since LibreOffice 7.5
+ */
+service ContentControls
+{
+
+/** provides access to the content controls of the document.
+ */
+interface com::sun::star::container::XIndexAccess;
+
+};
+
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/text/GenericTextDocument.idl 
b/offapi/com/sun/star/text/GenericTextDocument.idl
index 708e913353bc..6823df32f4e0 100644
--- a/offapi/com/sun/star/text/GenericTextDocument.idl
+++ b/offapi/com/sun/star/text/GenericTextDocument.idl
@@ -58,6 +58,9 @@ published service GenericTextDocument
 
 [optional] interface com::sun::star::text::XEndnotesSupplier;
 
+/** @since LibreOffice 7.5 */
+[optional] interface com::sun::star::text::XContentControlsSupplier;
+
 [optional] interface com::sun::star::util::XReplaceable;
 
 [optional] interface com::sun::star::text::XPagePrintable;
diff --git a/offapi/com/sun/star/text/XContentControlsSupplier.idl 
b/offapi/com/sun/star/text/XContentControlsSupplier.idl
new file mode 100644
index ..646e380cc12e
--- /dev/null
+++ b/offapi/

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

2022-10-26 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/ContentControl.idl
  |   10 +++-
 sw/inc/unoprnms.hxx
  |1 
 sw/source/core/txtnode/attrcontentcontrol.cxx  
  |   11 +++-
 sw/source/core/unocore/unocontentcontrol.cxx   
  |7 +++
 sw/source/core/unocore/unomap1.cxx 
  |1 
 writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx 
  |   23 ++
 
writerfilter/qa/cppunittests/dmapper/data/content-control-date-data-binding.docx
 |binary
 writerfilter/source/dmapper/DomainMapper_Impl.cxx  
  |   18 ++-
 8 files changed, 64 insertions(+), 7 deletions(-)

New commits:
commit 58002ab85d992c7ac44d8bb4d135246b67aa5cc7
Author: Miklos Vajna 
AuthorDate: Wed Oct 26 10:03:04 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Oct 26 10:47:59 2022 +0200

sw content controls: enable data binding for date

The document had a 2022 date in document.xml, but had a 2012 date in
data binding. Writer used to show 2022, while Word picks 2012.

Data binding for dates were disabled in commit
de90c192cb8f1f03a4028493d8bfe9a127a76b2a (sw content controls, plain
text: enable DOCX filter with data binding, 2022-09-19), because the
formatting of those date timestamps were missing, so it was better to
just not update them from data binding, temporarily.

Fix the problem by adding a new read-only DateString property on
SwXContentControl, this way the import filter can set not only the
timestamp but the formatted date as well.

This shares the SwContentControl::GetDateString() code with the UI,
which already had the need in the past to turn a timestamp into a
date string, based on a provided language and date format.

Change-Id: I842a9483a675f895129a9854caec347be6b6b84e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141859
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/text/ContentControl.idl 
b/offapi/com/sun/star/text/ContentControl.idl
index 8f390665c2b3..ae8a0e1a9396 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -100,17 +100,23 @@ service ContentControl
 */
 [optional, property] boolean ComboBox;
 
-/** The alias: just remembered.
+/** The alias: kind of a human-readable title / description, show up on 
the UI.
 
 @since LibreOffice 7.5
 */
 [optional, property] string Alias;
 
-/** The tag: just remembered.
+/** The tag: similar to Alias, but is meant to be machine-readable.
 
 @since LibreOffice 7.5
 */
 [optional, property] string Tag;
+
+/** The formatted date string, based on DateFormat, DateLanguage and 
CurrentDate.
+
+@since LibreOffice 7.5
+*/
+[optional, property, readonly] string DateString;
 };
 
 
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 0a21fd182690..61cdcbb05938 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -892,6 +892,7 @@
 #define UNO_NAME_COLOR "Color"
 #define UNO_NAME_ALIAS "Alias"
 #define UNO_NAME_TAG "Tag"
+#define UNO_NAME_DATE_STRING "DateString"
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/attrcontentcontrol.cxx 
b/sw/source/core/txtnode/attrcontentcontrol.cxx
index 587d2f53ed74..fe530f8b9128 100644
--- a/sw/source/core/txtnode/attrcontentcontrol.cxx
+++ b/sw/source/core/txtnode/attrcontentcontrol.cxx
@@ -240,9 +240,14 @@ OUString SwContentControl::GetDateString() const
 
 const Color* pColor = nullptr;
 OUString aFormatted;
-if (!m_oSelectedDate)
+double fSelectedDate = 0;
+if (m_oSelectedDate)
 {
-return OUString();
+fSelectedDate = *m_oSelectedDate;
+}
+else
+{
+fSelectedDate = GetCurrentDateValue();
 }
 
 if (nFormat == NUMBERFORMAT_ENTRY_NOT_FOUND)
@@ -250,7 +255,7 @@ OUString SwContentControl::GetDateString() const
 return OUString();
 }
 
-pNumberFormatter->GetOutputString(*m_oSelectedDate, nFormat, aFormatted, 
&pColor, false);
+pNumberFormatter->GetOutputString(fSelectedDate, nFormat, aFormatted, 
&pColor, false);
 return aFormatted;
 }
 
diff --git a/sw/source/core/unocore/unocontentcontrol.cxx 
b/sw/source/core/unocore/unocontentcontrol.cxx
index a0d7d96099cc..189cdb9ba316 100644
--- a/sw/source/core/unocore/unocontentcontrol.cxx
+++ b/sw/source/core/unocore/unocontentcontrol.cxx
@@ -1168,6 +1168,13 @@ uno::Any SAL_CALL 
SwXContentControl::getPropertyValue(const OUString& rPropertyN
 aRet <<= m_pImpl->m_pContentControl->GetTag();
 }
 }
+else if (rPropertyName == UNO_NAME_DATE_STRING)
+{
+if (!m_pImpl->m_bIsDescriptor)
+{
+aRet <<= m_pImpl->m_

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

2022-10-11 Thread Justin Luth (via logerrit)
 offapi/com/sun/star/script/vba/VBAEventId.idl  |5 --
 sw/source/ui/vba/vbaeventshelper.cxx   |   23 -
 sw/source/uibase/app/docsh2.cxx|6 +-
 vbahelper/source/vbahelper/vbaeventshelperbase.cxx |   50 +
 4 files changed, 37 insertions(+), 47 deletions(-)

New commits:
commit 73911ed8d35294a9e15771d8aaa1e9121ef10309
Author: Justin Luth 
AuthorDate: Tue Oct 11 12:14:34 2022 -0400
Commit: Justin Luth 
CommitDate: Wed Oct 12 01:12:17 2022 +0200

tdf#148806 doc vba: highest priority is ThisDocument AutoOpen V2

A review by Stephan Bergmann made me re-think adding a separate
event for this. It really is only one event and not two
(or three as I initially imagined). In the end, I like this better
because it highlights the difference between Excel and Word
by keeping all the differentiating logic in one place.

The inability to properly document the purpose of these new events
was the impetus to redesign this. Thanks Stephan for the prompt.

Change-Id: Ic2d461c13c4a52e279224cb485d2b6c4a3c57b54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141233
Tested-by: Justin Luth 
Reviewed-by: Justin Luth 

diff --git a/offapi/com/sun/star/script/vba/VBAEventId.idl 
b/offapi/com/sun/star/script/vba/VBAEventId.idl
index 00a524a1ef3b..00989fccd053 100644
--- a/offapi/com/sun/star/script/vba/VBAEventId.idl
+++ b/offapi/com/sun/star/script/vba/VBAEventId.idl
@@ -58,11 +58,6 @@ constants VBAEventId
 const long DOCUMENT_OPEN= 1002;
 /** Document about to be closed. No arguments. */
 const long DOCUMENT_CLOSE   = 1003;
-// auto* subroutines in ThisDocument have highest priority
-const long DOCUMENT_AUTO_NEW = 1004;
-const long DOCUMENT_AUTO_OPEN = 1005;
-const long DOCUMENT_AUTO_CLOSE = 1006;
-
 
 // MS Excel (identifiers from 2001 to 2999)
 
diff --git a/sw/source/ui/vba/vbaeventshelper.cxx 
b/sw/source/ui/vba/vbaeventshelper.cxx
index d083940106b5..d928eaba16f2 100644
--- a/sw/source/ui/vba/vbaeventshelper.cxx
+++ b/sw/source/ui/vba/vbaeventshelper.cxx
@@ -32,13 +32,10 @@ SwVbaEventsHelper::SwVbaEventsHelper( uno::Sequence< 
css::uno::Any > const& aArg
 {
 using namespace ::com::sun::star::script::ModuleType;
 registerEventHandler( DOCUMENT_NEW, DOCUMENT,   "Document_New" );
-registerEventHandler(DOCUMENT_AUTO_NEW, DOCUMENT, "AutoNew");
 registerEventHandler( AUTO_NEW, NORMAL, "AutoNew" );
 registerEventHandler( DOCUMENT_OPEN,DOCUMENT,   "Document_Open" );
-registerEventHandler(DOCUMENT_AUTO_OPEN, DOCUMENT, "AutoOpen");
 registerEventHandler( AUTO_OPEN,NORMAL, "AutoOpen" );
 registerEventHandler( DOCUMENT_CLOSE,   DOCUMENT,   "Document_Close" );
-registerEventHandler(DOCUMENT_AUTO_CLOSE, DOCUMENT, "AutoClose");
 registerEventHandler( AUTO_CLOSE,   NORMAL, "AutoClose" );
 }
 
@@ -46,25 +43,9 @@ SwVbaEventsHelper::~SwVbaEventsHelper()
 {
 }
 
-bool SwVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue,
-const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& rArgs)
+bool SwVbaEventsHelper::implPrepareEvent(EventQueue& /*rEventQueue*/,
+const EventHandlerInfo& /*rInfo*/, const uno::Sequence& 
/*rArgs*/)
 {
-switch( rInfo.mnEventId )
-{
-case DOCUMENT_AUTO_NEW:
-// Only one "AutoNew" subroutine can run. ThisDocument is highest 
priority.
-if (!hasVbaEventHandler(rInfo.mnEventId, rArgs))
-rEventQueue.emplace_back(AUTO_NEW);
-break;
-case DOCUMENT_AUTO_OPEN:
-if (!hasVbaEventHandler(rInfo.mnEventId, rArgs))
-rEventQueue.emplace_back(AUTO_OPEN);
-break;
-case DOCUMENT_AUTO_CLOSE:
-if (!hasVbaEventHandler(rInfo.mnEventId, rArgs))
-rEventQueue.emplace_back(AUTO_CLOSE);
-break;
-}
 return true;
 }
 
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 51082a682c2d..a5e79881e342 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -221,11 +221,11 @@ static void lcl_processCompatibleSfxHint( const 
uno::Reference< script::vba::XVB
 switch( pSfxEventHint->GetEventId() )
 {
 case SfxEventHintId::CreateDoc:
-xVbaEvents->processVbaEvent(DOCUMENT_AUTO_NEW, aArgs);
+xVbaEvents->processVbaEvent(AUTO_NEW, aArgs);
 xVbaEvents->processVbaEvent(DOCUMENT_NEW, aArgs);
 break;
 case SfxEventHintId::OpenDoc:
-xVbaEvents->processVbaEvent(DOCUMENT_AUTO_OPEN, aArgs);
+xVbaEvents->processVbaEvent(AUTO_OPEN, aArgs);
 xVbaEvents->processVbaEvent(DOCUMENT_OPEN, aArgs);
 break;
 default: break;
@@ -387,7 +387,7 @@ bool SwDocShell::PrepareClose( bool bUI )
 {
 using namespace com::

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

2022-10-08 Thread Justin Luth (via logerrit)
 offapi/com/sun/star/script/vba/VBAEventId.idl |5 +
 sw/source/ui/vba/vbaeventshelper.cxx  |   21 ++---
 sw/source/uibase/app/docsh2.cxx   |9 ++---
 3 files changed, 25 insertions(+), 10 deletions(-)

New commits:
commit 3d77fe0af515830001448fde0d394ef20a89002b
Author: Justin Luth 
AuthorDate: Thu Oct 6 19:35:21 2022 -0400
Commit: Justin Luth 
CommitDate: Sat Oct 8 16:14:05 2022 +0200

tdf#148806 doc vba: highest priority is ThisDocument AutoOpen

Word has three ways of running events at doc open,
although the two AutoOpen methods are exclusive.

One is the special ThisDocument Document_open subroutine.

Another is the AutoOpen subroutine, which is what this
patch is about. It can exist in any module - first come
first served (alphabetically) in doc - except that
ThisDocument is checked first.
[This is very different from Calc - which IGNORES these
functions in ThisWorksheet.]
//TODO: The subroutine must be public

And finally, there can be an AutoOpen module with a Main subroutine.
It is ignored if there is any AutoOpen subroutine.
//TODO: fix the third way.

I tried to create a unit test, but LO's Selection.TypeText
always starts at position 0 for each call, unlike Word
which also starts at position 0 for the first call,
but then remembers where it left off.

Change-Id: I4caf29eefd432c320b5acaf6210222f50a111e89
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141037
Tested-by: Justin Luth 
Reviewed-by: Justin Luth 

diff --git a/offapi/com/sun/star/script/vba/VBAEventId.idl 
b/offapi/com/sun/star/script/vba/VBAEventId.idl
index 00989fccd053..00a524a1ef3b 100644
--- a/offapi/com/sun/star/script/vba/VBAEventId.idl
+++ b/offapi/com/sun/star/script/vba/VBAEventId.idl
@@ -58,6 +58,11 @@ constants VBAEventId
 const long DOCUMENT_OPEN= 1002;
 /** Document about to be closed. No arguments. */
 const long DOCUMENT_CLOSE   = 1003;
+// auto* subroutines in ThisDocument have highest priority
+const long DOCUMENT_AUTO_NEW = 1004;
+const long DOCUMENT_AUTO_OPEN = 1005;
+const long DOCUMENT_AUTO_CLOSE = 1006;
+
 
 // MS Excel (identifiers from 2001 to 2999)
 
diff --git a/sw/source/ui/vba/vbaeventshelper.cxx 
b/sw/source/ui/vba/vbaeventshelper.cxx
index ccdb10548ca2..d083940106b5 100644
--- a/sw/source/ui/vba/vbaeventshelper.cxx
+++ b/sw/source/ui/vba/vbaeventshelper.cxx
@@ -32,10 +32,13 @@ SwVbaEventsHelper::SwVbaEventsHelper( uno::Sequence< 
css::uno::Any > const& aArg
 {
 using namespace ::com::sun::star::script::ModuleType;
 registerEventHandler( DOCUMENT_NEW, DOCUMENT,   "Document_New" );
+registerEventHandler(DOCUMENT_AUTO_NEW, DOCUMENT, "AutoNew");
 registerEventHandler( AUTO_NEW, NORMAL, "AutoNew" );
 registerEventHandler( DOCUMENT_OPEN,DOCUMENT,   "Document_Open" );
+registerEventHandler(DOCUMENT_AUTO_OPEN, DOCUMENT, "AutoOpen");
 registerEventHandler( AUTO_OPEN,NORMAL, "AutoOpen" );
 registerEventHandler( DOCUMENT_CLOSE,   DOCUMENT,   "Document_Close" );
+registerEventHandler(DOCUMENT_AUTO_CLOSE, DOCUMENT, "AutoClose");
 registerEventHandler( AUTO_CLOSE,   NORMAL, "AutoClose" );
 }
 
@@ -44,18 +47,22 @@ SwVbaEventsHelper::~SwVbaEventsHelper()
 }
 
 bool SwVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue,
-const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& 
/*rArgs*/ )
+const EventHandlerInfo& rInfo, const uno::Sequence< uno::Any >& rArgs)
 {
 switch( rInfo.mnEventId )
 {
-case AUTO_NEW:
-rEventQueue.emplace_back(DOCUMENT_NEW);
+case DOCUMENT_AUTO_NEW:
+// Only one "AutoNew" subroutine can run. ThisDocument is highest 
priority.
+if (!hasVbaEventHandler(rInfo.mnEventId, rArgs))
+rEventQueue.emplace_back(AUTO_NEW);
 break;
-case AUTO_OPEN:
-rEventQueue.emplace_back(DOCUMENT_OPEN);
+case DOCUMENT_AUTO_OPEN:
+if (!hasVbaEventHandler(rInfo.mnEventId, rArgs))
+rEventQueue.emplace_back(AUTO_OPEN);
 break;
-case AUTO_CLOSE:
-rEventQueue.emplace_back(DOCUMENT_CLOSE);
+case DOCUMENT_AUTO_CLOSE:
+if (!hasVbaEventHandler(rInfo.mnEventId, rArgs))
+rEventQueue.emplace_back(AUTO_CLOSE);
 break;
 }
 return true;
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index d9e1486e0e3a..51082a682c2d 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -221,10 +221,12 @@ static void lcl_processCompatibleSfxHint( const 
uno::Reference< script::vba::XVB
 switch( pSfxEventHint->GetEventId() )
 {
 case SfxEventHintId::CreateDoc:
-xVbaEvents->processVbaEvent(AUTO_NEW, 

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

2022-10-05 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/ContentControl.idl  |6 ++
 sw/inc/formatcontentcontrol.hxx  |7 ++
 sw/inc/unoprnms.hxx  |1 
 sw/qa/core/unocore/unocore.cxx   |2 
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx   |2 
 sw/source/core/txtnode/attrcontentcontrol.cxx|1 
 sw/source/core/unocore/unocontentcontrol.cxx |   28 
++
 sw/source/core/unocore/unomap1.cxx   |1 
 sw/source/filter/ww8/docxattributeoutput.cxx |6 ++
 writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx   |4 +
 writerfilter/qa/cppunittests/dmapper/data/sdt-run-rich-text.docx |binary
 writerfilter/source/dmapper/DomainMapper.cxx |   15 +
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|6 ++
 writerfilter/source/dmapper/SdtHelper.cxx|4 +
 writerfilter/source/dmapper/SdtHelper.hxx|6 ++
 15 files changed, 89 insertions(+)

New commits:
commit 5262aab9d220675f616579720b4bb43ee03cccfb
Author: Miklos Vajna 
AuthorDate: Wed Oct 5 15:18:53 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Oct 5 16:05:19 2022 +0200

sw content controls: preserve tag

This is similar to  to preserve .

Resolves

.

Change-Id: I4fdab44aaf13ca812502ae79f38f32ec9468db11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140981
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/text/ContentControl.idl 
b/offapi/com/sun/star/text/ContentControl.idl
index d07dbfc49256..8f390665c2b3 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -105,6 +105,12 @@ service ContentControl
 @since LibreOffice 7.5
 */
 [optional, property] string Alias;
+
+/** The tag: just remembered.
+
+@since LibreOffice 7.5
+*/
+[optional, property] string Tag;
 };
 
 
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index 6462bf49cd06..8cfa71dd04ba 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -169,6 +169,9 @@ class SW_DLLPUBLIC SwContentControl : public 
sw::BroadcastingModify
 /// The alias: just remembered.
 OUString m_aAlias;
 
+/// The tag: just remembered.
+OUString m_aTag;
+
 /// Stores a list item index, in case the doc model is not yet updated.
 std::optional m_oSelectedListItem;
 
@@ -329,6 +332,10 @@ public:
 
 const OUString& GetAlias() const { return m_aAlias; }
 
+void SetTag(const OUString& rTag) { m_aTag = rTag; }
+
+const OUString& GetTag() const { return m_aTag; }
+
 void SetReadWrite(bool bReadWrite) { m_bReadWrite = bReadWrite; }
 
 bool GetReadWrite() const { return m_bReadWrite; }
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 850a789900df..0a21fd182690 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -891,6 +891,7 @@
 #define UNO_NAME_DATA_BINDING_STORE_ITEM_ID "DataBindingStoreItemID"
 #define UNO_NAME_COLOR "Color"
 #define UNO_NAME_ALIAS "Alias"
+#define UNO_NAME_TAG "Tag"
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 23811a497566..ee1592110157 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -625,6 +625,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testContentControlDate)
 "DataBindingStoreItemID", 
uno::Any(OUString("{241A8A02-7FFD-488D-8827-63FBE74E8BC9}")));
 xContentControlProps->setPropertyValue("Color", 
uno::Any(OUString("008000")));
 xContentControlProps->setPropertyValue("Alias", 
uno::Any(OUString("myalias")));
+xContentControlProps->setPropertyValue("Tag", uno::Any(OUString("mytag")));
 xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
 
 // Then make sure that the specified properties are set:
@@ -649,6 +650,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testContentControlDate)
  pContentControl->GetDataBindingStoreItemID());
 CPPUNIT_ASSERT_EQUAL(OUString("008000"), pContentControl->GetColor());
 CPPUNIT_ASSERT_EQUAL(OUString("myalias"), pContentControl->GetAlias());
+CPPUNIT_ASSERT_EQUAL(OUString("mytag"), pContentControl->GetTag());
 }
 
 CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testListIdState)
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
index 5246edc2a1e7..a487e86d3269 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
@@ -427,6 +427,7 @@ CPPUNIT_TEST_FIXTUR

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

2022-10-05 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/ContentControl.idl  |6 ++
 sw/inc/formatcontentcontrol.hxx  |7 ++
 sw/inc/unoprnms.hxx  |1 
 sw/qa/core/unocore/unocore.cxx   |2 
 sw/qa/extras/ooxmlexport/ooxmlexport17.cxx   |2 
 sw/source/core/txtnode/attrcontentcontrol.cxx|2 
 sw/source/core/unocore/unocontentcontrol.cxx |   28 
++
 sw/source/core/unocore/unomap1.cxx   |1 
 sw/source/filter/ww8/docxattributeoutput.cxx |6 ++
 writerfilter/qa/cppunittests/dmapper/SdtHelper.cxx   |5 +
 writerfilter/qa/cppunittests/dmapper/data/sdt-run-rich-text.docx |binary
 writerfilter/source/dmapper/DomainMapper.cxx |6 ++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|6 ++
 writerfilter/source/dmapper/SdtHelper.cxx|4 +
 writerfilter/source/dmapper/SdtHelper.hxx|6 ++
 15 files changed, 82 insertions(+)

New commits:
commit 481a082469802ffce08cd8c110e715260015eb97
Author: Miklos Vajna 
AuthorDate: Wed Oct 5 08:22:19 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Oct 5 14:53:03 2022 +0200

sw content controls: preserve alias

This is similar to  to preserve .

Related to

.

Change-Id: I774b7204c5ca02ec6db89f5cbd3a6de6f2bf82a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140975
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/text/ContentControl.idl 
b/offapi/com/sun/star/text/ContentControl.idl
index af5be9ac251e..d07dbfc49256 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -99,6 +99,12 @@ service ContentControl
 @since LibreOffice 7.5
 */
 [optional, property] boolean ComboBox;
+
+/** The alias: just remembered.
+
+@since LibreOffice 7.5
+*/
+[optional, property] string Alias;
 };
 
 
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index 41d35fd10fb8..6462bf49cd06 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -166,6 +166,9 @@ class SW_DLLPUBLIC SwContentControl : public 
sw::BroadcastingModify
 /// The color: just remembered.
 OUString m_aColor;
 
+/// The alias: just remembered.
+OUString m_aAlias;
+
 /// Stores a list item index, in case the doc model is not yet updated.
 std::optional m_oSelectedListItem;
 
@@ -322,6 +325,10 @@ public:
 
 const OUString& GetColor() const { return m_aColor; }
 
+void SetAlias(const OUString& rAlias) { m_aAlias = rAlias; }
+
+const OUString& GetAlias() const { return m_aAlias; }
+
 void SetReadWrite(bool bReadWrite) { m_bReadWrite = bReadWrite; }
 
 bool GetReadWrite() const { return m_bReadWrite; }
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index bb82bf3a1eef..850a789900df 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -890,6 +890,7 @@
 #define UNO_NAME_DATA_BINDING_XPATH "DataBindingXpath"
 #define UNO_NAME_DATA_BINDING_STORE_ITEM_ID "DataBindingStoreItemID"
 #define UNO_NAME_COLOR "Color"
+#define UNO_NAME_ALIAS "Alias"
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 83efc0f9e5c2..23811a497566 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -624,6 +624,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testContentControlDate)
 xContentControlProps->setPropertyValue(
 "DataBindingStoreItemID", 
uno::Any(OUString("{241A8A02-7FFD-488D-8827-63FBE74E8BC9}")));
 xContentControlProps->setPropertyValue("Color", 
uno::Any(OUString("008000")));
+xContentControlProps->setPropertyValue("Alias", 
uno::Any(OUString("myalias")));
 xText->insertTextContent(xCursor, xContentControl, /*bAbsorb=*/true);
 
 // Then make sure that the specified properties are set:
@@ -647,6 +648,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testContentControlDate)
 CPPUNIT_ASSERT_EQUAL(OUString("{241A8A02-7FFD-488D-8827-63FBE74E8BC9}"),
  pContentControl->GetDataBindingStoreItemID());
 CPPUNIT_ASSERT_EQUAL(OUString("008000"), pContentControl->GetColor());
+CPPUNIT_ASSERT_EQUAL(OUString("myalias"), pContentControl->GetAlias());
 }
 
 CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testListIdState)
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
index d6488db0326e..5246edc2a1e7 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx
@@ -426,6 +426,7 @@

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

2022-09-26 Thread Stephan Bergmann (via logerrit)
 offapi/com/sun/star/accessibility/AccessibleRole.idl |4 
 1 file changed, 4 insertions(+)

New commits:
commit 92166dba58980fddb234cd7069694cbbca69a8f7
Author: Stephan Bergmann 
AuthorDate: Mon Sep 26 09:57:31 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Sep 26 11:00:27 2022 +0200

Add some missing @since tags

...for constants introduced with 4917430c1c5e8105987e81d65d31df21955ad60e
"tdf#116542 a11y: introduce STATIC role" and
947fe0d89dee75ee43515ef7dfb43837d65a45bc "tdf#119788 tdf#117173 add
accessibility NOTIFICATION role", resp.

Change-Id: I1533f3bfcac5e7014078dd891dc05571f1186bb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140587
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/offapi/com/sun/star/accessibility/AccessibleRole.idl 
b/offapi/com/sun/star/accessibility/AccessibleRole.idl
index c8e8ccc03ec2..c25b3d465d1a 100644
--- a/offapi/com/sun/star/accessibility/AccessibleRole.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleRole.idl
@@ -734,6 +734,8 @@ constants AccessibleRole
label.
 
 See also LABEL and TEXT.
+
+@since LibreOffice 6.2
 */
 const short STATIC = 86;
 
@@ -741,6 +743,8 @@ constants AccessibleRole
 
 An object that presents information to the user when the SHOWING 
state change event is
fired for the object.
+
+@since LibreOffice 7.5
 */
 const short NOTIFICATION = 87;
 


[Libreoffice-commits] core.git: offapi/com svx/source svx/uiconfig vcl/osx vcl/qt5 vcl/source vcl/unx winaccessibility/source

2022-09-25 Thread Jim Raykowski (via logerrit)
 offapi/com/sun/star/accessibility/AccessibleRole.idl  |7 +
 svx/source/dialog/srchdlg.cxx |   14 ++
 svx/uiconfig/ui/findreplacedialog.ui  |3 +-
 vcl/osx/a11yrolehelper.mm |2 +
 vcl/qt5/QtAccessibleWidget.cxx|6 
 vcl/source/window/builder.cxx |2 -
 vcl/unx/gtk3/a11y/atkwrapper.cxx  |2 +
 winaccessibility/source/service/AccComponentEventListener.cxx |1 
 winaccessibility/source/service/AccObject.cxx |6 ++--
 winaccessibility/source/service/AccObjectWinManager.cxx   |1 
 10 files changed, 35 insertions(+), 9 deletions(-)

New commits:
commit 947fe0d89dee75ee43515ef7dfb43837d65a45bc
Author: Jim Raykowski 
AuthorDate: Thu Sep 8 19:27:31 2022 -0800
Commit: Jim Raykowski 
CommitDate: Mon Sep 26 05:55:25 2022 +0200

tdf#119788 tdf#117173 add accessibility NOTIFICATION role

and use it to make screen readers announce notifications from the
'Find and Replace' dialog

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

diff --git a/offapi/com/sun/star/accessibility/AccessibleRole.idl 
b/offapi/com/sun/star/accessibility/AccessibleRole.idl
index 6c7e9fbcf790..c8e8ccc03ec2 100644
--- a/offapi/com/sun/star/accessibility/AccessibleRole.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleRole.idl
@@ -737,6 +737,13 @@ constants AccessibleRole
 */
 const short STATIC = 86;
 
+/** Notification text role.
+
+An object that presents information to the user when the SHOWING 
state change event is
+   fired for the object.
+*/
+const short NOTIFICATION = 87;
+
 };
 
 }; }; }; };
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 4f2378881867..69483c124770 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -332,7 +332,6 @@ SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, 
SfxChildWindow* pChildWi
 
 m_xSearchTmplLB->make_sorted();
 m_xSearchAttrText->hide();
-m_xSearchLabel->show();
 
 m_xReplaceTmplLB->make_sorted();
 m_xReplaceAttrText->hide();
@@ -574,6 +573,13 @@ void SvxSearchDialog::SetSaveToModule(bool b)
 void SvxSearchDialog::SetSearchLabel(const OUString& rStr)
 {
 m_xSearchLabel->set_label(rStr);
+if (!rStr.isEmpty())
+{
+// hide/show to fire SHOWING state change event so search label text
+// is announced by screen reader
+m_xSearchLabel->hide();
+m_xSearchLabel->show();
+}
 
 if (rStr == SvxResId(RID_SVXSTR_SEARCH_NOT_FOUND))
 m_xSearchLB->set_entry_message_type(weld::EntryMessageType::Error);
@@ -1360,9 +1366,6 @@ IMPL_LINK(SvxSearchDialog, CommandHdl_Impl, 
weld::Button&, rBtn, void)
 nModifyFlag = ModifyFlags::NONE;
 const SfxPoolItem* ppArgs[] = { pSearchItem.get(), nullptr };
 rBindings.ExecuteSynchron( FID_SEARCH_NOW, ppArgs );
-
-// grabbing focus to the search combo box makes the search label read 
by the screen reader
-m_xSearchLB->grab_focus();
 }
 else if ( &rBtn == m_xCloseBtn.get() )
 {
@@ -2208,7 +2211,8 @@ void SvxSearchDialog::SetModifyFlag_Impl( const 
weld::Widget* pCtrl )
 {
 nModifyFlag |= ModifyFlags::Search;
 m_xSearchLB->set_entry_message_type(weld::EntryMessageType::Normal);
-SvxSearchDialogWrapper::SetSearchLabel("");
+if (!SvxSearchDialogWrapper::GetSearchLabel().isEmpty())
+SvxSearchDialogWrapper::SetSearchLabel("");
 }
 else if ( m_xReplaceLB.get() == pCtrl )
 nModifyFlag |= ModifyFlags::Replace;
diff --git a/svx/uiconfig/ui/findreplacedialog.ui 
b/svx/uiconfig/ui/findreplacedialog.ui
index 4c1e9d2bc45f..a8401616d339 100644
--- a/svx/uiconfig/ui/findreplacedialog.ui
+++ b/svx/uiconfig/ui/findreplacedialog.ui
@@ -173,6 +173,7 @@
 
 
   
+True
 False
 True
 True
@@ -181,7 +182,7 @@
 0
 
   
-static
+notification
   
 
   
diff --git a/vcl/osx/a11yrolehelper.mm b/vcl/osx/a11yrolehelper.mm
index 0ea7075277eb..5cb75c94a86f 100644
--- a/vcl/osx/a11yrolehelper.mm
+++ b/vcl/osx/a11yrolehelper.mm
@@ -126,6 +126,7 @@ using namespace ::com::sun::star::uno;
 MAP( AccessibleRole::DOCUMENT_SPREADSHEET, NSAccessibilityGroupRole );
 MAP( AccessibleRole::DOCUMENT_TEXT, NSAccessibilityGroupRole );
 MAP( AccessibleRole::STATIC, NS

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

2022-09-21 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/ContentControl.idl   |6 ++
 sw/inc/formatcontentcontrol.hxx   |8 +++
 sw/inc/unoprnms.hxx   |1 
 sw/qa/core/unocore/unocore.cxx|   53 ++
 sw/source/core/txtnode/attrcontentcontrol.cxx |7 +++
 sw/source/core/unocore/unocontentcontrol.cxx  |   29 ++
 sw/source/core/unocore/unomap1.cxx|1 
 sw/source/uibase/wrtsh/wrtsh1.cxx |5 ++
 8 files changed, 110 insertions(+)

New commits:
commit 276f3a3ce52ca422bf5ebccfa2c926d3e87d5eab
Author: Miklos Vajna 
AuthorDate: Wed Sep 21 08:24:17 2022 +0200
Commit: Miklos Vajna 
CommitDate: Wed Sep 21 12:07:35 2022 +0200

sw content controls, combo box: add doc model & UNO API

This is similar to dropdowns, but combo box allow free-form user input,
while dropdown is meant to enforce that the content is one of the list
items.

Change-Id: I4ae226c55f70b2b3237021348e21b7d184e8a5ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140302
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/text/ContentControl.idl 
b/offapi/com/sun/star/text/ContentControl.idl
index 641ffd9cebd4..af5be9ac251e 100644
--- a/offapi/com/sun/star/text/ContentControl.idl
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -93,6 +93,12 @@ service ContentControl
 /** The color: just remembered.
 */
 [optional, property] string Color;
+
+/** Combo box that allows free-form text as well, i.e. not dropdown.
+
+@since LibreOffice 7.5
+*/
+[optional, property] boolean ComboBox;
 };
 
 
diff --git a/sw/inc/formatcontentcontrol.hxx b/sw/inc/formatcontentcontrol.hxx
index fa7c237acaf7..41d35fd10fb8 100644
--- a/sw/inc/formatcontentcontrol.hxx
+++ b/sw/inc/formatcontentcontrol.hxx
@@ -47,6 +47,7 @@ enum class SwContentControlType
 PICTURE,
 DATE,
 PLAIN_TEXT,
+COMBO_BOX,
 };
 
 /// SfxPoolItem subclass that wraps an SwContentControl.
@@ -147,6 +148,9 @@ class SW_DLLPUBLIC SwContentControl : public 
sw::BroadcastingModify
 /// Plain text, i.e. not rich text.
 bool m_bPlainText = false;
 
+/// Same as drop-down, but free-form input is also accepted.
+bool m_bComboBox = false;
+
 /// The placeholder's doc part: just remembered.
 OUString m_aPlaceholderDocPart;
 
@@ -263,6 +267,10 @@ public:
 
 bool GetPlainText() const { return m_bPlainText; }
 
+void SetComboBox(bool bComboBox) { m_bComboBox = bComboBox; }
+
+bool GetComboBox() const { return m_bComboBox; }
+
 void SetPlaceholderDocPart(const OUString& rPlaceholderDocPart)
 {
 m_aPlaceholderDocPart = rPlaceholderDocPart;
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 4f95a99c3a1f..bb82bf3a1eef 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -884,6 +884,7 @@
 #define UNO_NAME_DATE_LANGUAGE "DateLanguage"
 #define UNO_NAME_CURRENT_DATE "CurrentDate"
 #define UNO_NAME_PLAIN_TEXT "PlainText"
+#define UNO_NAME_COMBO_BOX "ComboBox"
 #define UNO_NAME_PLACEHOLDER_DOC_PART "PlaceholderDocPart"
 #define UNO_NAME_DATA_BINDING_PREFIX_MAPPINGS "DataBindingPrefixMappings"
 #define UNO_NAME_DATA_BINDING_XPATH "DataBindingXpath"
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 86683e4e9506..83efc0f9e5c2 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -741,6 +741,59 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testContentControlPlainText)
 CPPUNIT_ASSERT_EQUAL(static_cast(6), *pAttr->End());
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlComboBox)
+{
+// Given an empty document:
+SwDoc* pDoc = createSwDoc();
+
+// When inserting a combobox content control:
+uno::Reference xMSF(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xTextDocument(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xText = xTextDocument->getText();
+uno::Reference xCursor = xText->createTextCursor();
+xText->insertString(xCursor, "test", /*bAbsorb=*/false);
+xCursor->gotoStart(/*bExpand=*/false);
+xCursor->gotoEnd(/*bExpand=*/true);
+uno::Reference xContentControl(
+xMSF->createInstance("com.sun.star.text.ContentControl"), 
uno::UNO_QUERY);
+uno::Reference xContentControlProps(xContentControl, 
uno::UNO_QUERY);
+{
+uno::Sequence aListItems = {
+{
+comphelper::makePropertyValue("DisplayText", 
uno::Any(OUString("red"))),
+comphelper::makePropertyValue("Value", 
uno::Any(OUString("R"))),
+},
+{
+comphelper::makePropertyValue("DisplayText", 
uno::Any(OUString("green"))),
+comphelper::makePropertyValue("Value", 
uno::Any(OUString("G"))),
+},
+{
+comphelper::makePropertyValue("DisplayText", 
uno::Any(OUString("blue"))),
+comphelper::makePropertyValue("

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

2022-09-06 Thread Eike Rathke (via logerrit)
 offapi/com/sun/star/i18n/XCharacterClassification.idl |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit bb571bb225a5a5f3fa81b7aaea6cd559ebf1a94b
Author: Eike Rathke 
AuthorDate: Tue Sep 6 20:34:32 2022 +0200
Commit: Eike Rathke 
CommitDate: Tue Sep 6 21:38:16 2022 +0200

Add note to XCharacterClassification::getStringType() about meaninglessness

Given how it works that's almost deprecated, almost..

Change-Id: Ife2fe012db5568e4646b98b0ba55df8418069062
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139534
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/i18n/XCharacterClassification.idl 
b/offapi/com/sun/star/i18n/XCharacterClassification.idl
index 72f69f850f49..2d8da610f4f7 100644
--- a/offapi/com/sun/star/i18n/XCharacterClassification.idl
+++ b/offapi/com/sun/star/i18n/XCharacterClassification.idl
@@ -106,6 +106,16 @@ published interface XCharacterClassification : 
com::sun::star::uno::XInterface
 A number with appropriate flags set to indicate what type of
 characters the string contains, each flag value being one of
 KCharacterType values.
+
+@note The accumulated bits of several characters are meaningless
+as soon as characters of different classifications are
+involved, which even may have a common subset like
+KCharacterType::LETTER or KCharacterType::PRINTABLE, unless
+it is to be determined what overall character properties are
+present in the string. Use getCharacterType() of single
+characters instead and handle bits as needed if sets of
+character properties are to be obtained.
+
 */
 long getStringType( [in] string aText, [in] long nPos, [in] long nCount,
 [in] com::sun::star::lang::Locale aLocale );


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

2022-09-05 Thread Miklos Vajna (via logerrit)
 offapi/UnoApi_offapi.mk |1 
 offapi/com/sun/star/text/ContentControl.idl |  101 
 offapi/com/sun/star/text/TextRangeContentProperties.idl |6 
 3 files changed, 108 insertions(+)

New commits:
commit b9da26fac9cd17cff0ed56327fade37f5105d500
Author: Miklos Vajna 
AuthorDate: Mon Sep 5 10:16:21 2022 +0200
Commit: Miklos Vajna 
CommitDate: Mon Sep 5 13:15:57 2022 +0200

offapi: document com.sun.star.text.ContentControl

It has a lot of properties and what's inside ListItems was also rather
unclear.

Change-Id: Iaef719d72b95374da6d0dfa8247870fa5f76d18d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139406
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 6abbddc21b5d..331e5eadaf5f 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1343,6 +1343,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_noheader,offapi,com/sun/star/text,\
CellRange \
ChainedTextFrame \
ChapterNumberingRule \
+   ContentControl \
ContentIndex \
ContentIndexMark \
Defaults \
diff --git a/offapi/com/sun/star/text/ContentControl.idl 
b/offapi/com/sun/star/text/ContentControl.idl
new file mode 100644
index ..641ffd9cebd4
--- /dev/null
+++ b/offapi/com/sun/star/text/ContentControl.idl
@@ -0,0 +1,101 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+module com { module sun { module star { module text {
+
+/** This service specifies a content control with properties in a TextDocument.
+
+A content control wraps one or more text portions and controls the 
behavior of that content.
+
+@since LibreOffice 7.4
+*/
+service ContentControl
+{
+
+/** Provides a way to insert the content control using insertTextContent().
+*/
+interface com::sun::star::text::XTextContent;
+
+/** Current content is placeholder text.
+*/
+[optional, property] boolean ShowingPlaceHolder;
+
+/** Display the content control as a checkbox.
+*/
+[optional, property] boolean Checkbox;
+
+/** If Checkbox is true, is the checkbox checked?
+*/
+[optional, property] boolean Checked;
+
+/** If Checkbox is true, the value of a checked checkbox.
+*/
+[optional, property] string CheckedState;
+
+/** If Checkbox is true, the value of an unchecked checkbox.
+*/
+[optional, property] string UncheckedState;
+
+/** List items of a dropdown: DisplayText + Value pairs with string values 
for each item.
+
+If the list is non-empty, a dropdown control is provided on the UI.
+*/
+[optional, property] sequence< sequence< 
com::sun::star::beans::PropertyValue > > ListItems;
+
+/** Display the content control as a picture.
+*/
+[optional, property] boolean Picture;
+
+/** Display the content control as a date.
+
+If true, a date picker is provided on the UI.
+*/
+[optional, property] boolean Date;
+
+/** If Date is true, the date format in a syntax accepted by the 
NumberFormatter.
+*/
+[optional, property] string DateFormat;
+
+/** If Date is true, the date's BCP 47 language tag.
+*/
+[optional, property] string DateLanguage;
+
+/** Date in -MM-DDT00:00:00Z format.
+*/
+[optional, property] string CurrentDate;
+
+/** Plain text, i.e. not rich text.
+*/
+[optional, property] boolean PlainText;
+
+/** The placeholder's doc part: just remembered.
+*/
+[optional, property] string PlaceholderDocPart;
+
+/** The data bindings's prefix mappings: just remembered.
+*/
+[optional, property] string DataBindingPrefixMappings;
+
+/** The data bindings's XPath: just remembered.
+*/
+[optional, property] string DataBindingXpath;
+
+/** The data bindings's store item ID: just remembered.
+*/
+[optional, property] string DataBindingStoreItemID;
+
+/** The color: just remembered.
+*/
+[optional, property] string Color;
+};
+
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/text/TextRangeContentProperties.idl 
b/offapi/com/sun/star/text/TextRangeContentProperties.idl
index 7ba4068ddd17..1f12a475375b 100644
--- a/offapi/com/sun/star/text/TextRangeContentProperties.idl
+++ b/offapi/com/sun/star/text/TextRangeContentProperties.idl
@@ -81,6 +81,12 @@ service TextRangeContentProperties
  */
 [optional, readonly, property] com::sun::star::text::XTextContent 
LineBreak;
 
+/** may contain a content control.
+
+@since LibreOffice 7.4
+ */
+[optional,

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

2022-09-05 Thread Miklos Vajna (via logerrit)
 offapi/UnoApi_offapi.mk |1 
 offapi/com/sun/star/text/LineBreak.idl  |   35 
 offapi/com/sun/star/text/TextRangeContentProperties.idl |6 ++
 3 files changed, 42 insertions(+)

New commits:
commit c8d41a03d478935b481aba27915601972468caea
Author: Miklos Vajna 
AuthorDate: Mon Sep 5 08:45:22 2022 +0200
Commit: Miklos Vajna 
CommitDate: Mon Sep 5 10:13:46 2022 +0200

offapi: document com.sun.star.text.LineBreak

It's an XTextContent and also document the possible values of the Clear
property.

Change-Id: Ic1c338e4461ceea75cf16ce896e98e732d9af859
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139397
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index fb3be9253e51..6abbddc21b5d 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1364,6 +1364,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles_noheader,offapi,com/sun/star/text,\
GlobalSettings \
IllustrationsIndex \
InContentMetadata \
+   LineBreak \
LineNumberingProperties \
MailMerge \
NumberingLevel \
diff --git a/offapi/com/sun/star/text/LineBreak.idl 
b/offapi/com/sun/star/text/LineBreak.idl
new file mode 100644
index ..2ba8e1ced200
--- /dev/null
+++ b/offapi/com/sun/star/text/LineBreak.idl
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+module com { module sun { module star { module text {
+
+/** This service specifies a line break with properties in a TextDocument.
+
+@since LibreOffice 7.4
+*/
+service LineBreak
+{
+
+/** Provides a way to insert the line break using insertTextContent().
+*/
+interface com::sun::star::text::XTextContent;
+
+/** The type of the clearing break. Possible values:
+0: None
+1: Left
+2: Right
+3: All
+ */
+[optional, property] short Clear;
+};
+
+
+}; }; }; };
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/text/TextRangeContentProperties.idl 
b/offapi/com/sun/star/text/TextRangeContentProperties.idl
index 2649727ad81d..7ba4068ddd17 100644
--- a/offapi/com/sun/star/text/TextRangeContentProperties.idl
+++ b/offapi/com/sun/star/text/TextRangeContentProperties.idl
@@ -75,6 +75,12 @@ service TextRangeContentProperties
  */
 [optional, readonly, property] com::sun::star::text::XTextContent 
TextParagraph;
 
+/** Properties of the linebreak, e.g. for clearing break purposes.
+
+@since LibreOffice 7.4
+ */
+[optional, readonly, property] com::sun::star::text::XTextContent 
LineBreak;
+
 };
 
 


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

2022-08-31 Thread Michael Weghorn (via logerrit)
 offapi/com/sun/star/accessibility/XAccessibleTable.idl |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 16d1ec5955333b72da05b3d8ab029a939a0642a3
Author: Michael Weghorn 
AuthorDate: Wed Aug 31 15:13:59 2022 +0200
Commit: Michael Weghorn 
CommitDate: Wed Aug 31 19:22:40 2022 +0200

a11y: Remove historical Calc table dimensions from XAccessibleTable doc

The mention of Calc tables having 256 columns
and 32000 rows is a bit outdated.
I actually started looking here because with
16k columns, the 32-bit a11y child indices aren't sufficient
for all cells anymore...  (tdf#150683)

Also remove duplicated words.

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

diff --git a/offapi/com/sun/star/accessibility/XAccessibleTable.idl 
b/offapi/com/sun/star/accessibility/XAccessibleTable.idl
index 03b4e2ead8af..2a3e19b88ae8 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleTable.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleTable.idl
@@ -38,13 +38,13 @@ module com { module sun { module star { module 
accessibility {
XAccessibleTable::getAccessibleColumn().
 
The range of valid coordinates for this interface are implementation
-   dependent.  However, that range includes at least the intervals from the
+   dependent. However, that range includes at least the intervals
from the first row or column with the index 0 up to the last (but not
including) used row or column as returned by
XAccessibleTable::getAccessibleRowCount() and
XAccessibleTable::getAccessibleColumnCount().  In case of
-   the Calc the current range of valid indices for retrieving data include
-   the maximal table size--256 columns and 32000 rows--minus one.
+   Calc the current range of valid indices for retrieving data include
+   the maximum table size minus one.
 
 @since OOo 1.1.2
 */


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

2022-08-26 Thread Michael Weghorn (via logerrit)
 offapi/com/sun/star/accessibility/AccessibleEventId.idl |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f46ae9132d562ac3f881a663a70c50d27da4049a
Author: Michael Weghorn 
AuthorDate: Fri Aug 26 16:42:37 2022 +0200
Commit: Michael Weghorn 
CommitDate: Fri Aug 26 19:36:32 2022 +0200

a11y: Align SELECTION_CHANGED_REMOVE doc with reality

While the documentation for
`AccessibleEventId::SELECTION_CHANGED_REMOVE`
said that the removed item is set in
`AccessibleEventObject::OldValue`, all places that set the removed
item in that type of event actually set it in
`AccessibleEventObject::NewValue` and e.g. winaccessibility's
`AccContainerEventListener::HandleSelectionChangedRemoveEvent`
also handles the event with that assumption, so adapt the
doc accordingly.

(There are also various places that send `SELECTION_CHANGED_REMOVE`
events without setting any of the two.)

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

diff --git a/offapi/com/sun/star/accessibility/AccessibleEventId.idl 
b/offapi/com/sun/star/accessibility/AccessibleEventId.idl
index 782fe422b7ba..375d04085204 100644
--- a/offapi/com/sun/star/accessibility/AccessibleEventId.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleEventId.idl
@@ -396,8 +396,8 @@ constants AccessibleEventId
 
 /** An item in a container has been removed from the selection.
 
-AccessibleEventObject::OldValue contains the item to be removed.
-AccessibleEventObject::NewValue is empty.
+AccessibleEventObject::OldValue is empty.
+AccessibleEventObject::NewValue contains the item that has been 
removed.
 
 @since LibreOffice 4.3
 */


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

2022-08-15 Thread Tomaž Vajngerl (via logerrit)
 offapi/com/sun/star/text/NumberingRules.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f448de22e05a59307c8d968982140b182e736edc
Author: Tomaž Vajngerl 
AuthorDate: Wed Aug 10 11:58:34 2022 +0200
Commit: Tomaž Vajngerl 
CommitDate: Mon Aug 15 22:43:48 2022 +0200

correct the description of NumberingRules

duplicated text - "@see NumberingLevel"

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

diff --git a/offapi/com/sun/star/text/NumberingRules.idl 
b/offapi/com/sun/star/text/NumberingRules.idl
index 97286cd26523..9b12477f8f95 100644
--- a/offapi/com/sun/star/text/NumberingRules.idl
+++ b/offapi/com/sun/star/text/NumberingRules.idl
@@ -31,7 +31,7 @@ published service NumberingRules
 
 The numbering rules are levels of property values. Each
 level contains equal properties.
-@see NumberingLevel;@see NumberingLevel;
+@see NumberingLevel
  */
 interface com::sun::star::container::XIndexReplace;
 


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

2022-08-11 Thread Michael Weghorn (via logerrit)
 offapi/com/sun/star/accessibility/XAccessibleComponent.idl |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit c799dccfd69b69ba7e7d3a83f91ef5712798a7b6
Author: Michael Weghorn 
AuthorDate: Wed Aug 10 15:58:39 2022 +0200
Commit: Michael Weghorn 
CommitDate: Thu Aug 11 13:55:11 2022 +0200

a11y: Fix XAccessibleComponent::getAccessibleAtPoint doc

The mention of a `TRUE` value when the return type is
an `XAccessible` rather than a boolean looks like a
copy-paste error from the
`XAccessibleComponent::containsPoint` doc just above.
While at it, also fix a typo present in both.

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

diff --git a/offapi/com/sun/star/accessibility/XAccessibleComponent.idl 
b/offapi/com/sun/star/accessibility/XAccessibleComponent.idl
index baadf436fde8..be23e66193e4 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleComponent.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleComponent.idl
@@ -70,7 +70,7 @@ interface XAccessibleComponent : 
::com::sun::star::uno::XInterface
 
 The test point's coordinates are defined relative to the
 coordinate system of the object.  That means that when the object is
-an opaque rectangle then both the points (0,0) and (with-1,height-1)
+an opaque rectangle then both the points (0,0) and (width-1,height-1)
 would yield a `TRUE` value.
 
 @param Point
@@ -90,8 +90,8 @@ interface XAccessibleComponent : 
::com::sun::star::uno::XInterface
 
 The test point's coordinates are defined relative to the
 coordinate system of the object.  That means that when the object is
-an opaque rectangle then both the points (0,0) and (with-1,height-1)
-would yield a `TRUE` value.
+an opaque rectangle then both the points (0,0) and (width-1,height-1)
+are points inside of the object.
 
 @param Point
 Coordinates of the test point for which to find the Accessible


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

2022-08-04 Thread Michael Weghorn (via logerrit)
 offapi/com/sun/star/accessibility/XAccessibleText.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6cb9d45c43b525a682a5f8826f93e3981703cf4f
Author: Michael Weghorn 
AuthorDate: Thu Aug 4 15:48:48 2022 +0200
Commit: Michael Weghorn 
CommitDate: Thu Aug 4 19:36:33 2022 +0200

a11y: Add missing "not" in XAccessibleText::getTextBehindIndex doc

The doc was contradicting itself, saying (emphasis added):

> Returns the substring of the specified text type that is
> located after the given character and DOES NOT INCLUDE IT.

and

> For example, if text type is
> AccessibleTextType::WORD, then the complete word
> that is closest to and LOCATED BEHIND nIndex is returned.

but also

> The index character WILL BE PART of the returned string.

Add the missing "not" to the latter to make this
consistent and match the observed behavior when testing
this with a Writer paragraph consisting of the characters
"abcdefg":

Calling `getTextBehindIndex(2, 
css::accessibility::AccessibleTextType::CHARACTER)`
on the corresponding a11y object's `XAccessibleText` interface  returns
a TextSegment with

* "d" as text
* a start offset of 3
* an end offset of 4

This is also consistent with `XAccessibleText::getTextBeforeIndex`,
whose documentation is similar and includes the "not"
at the corresponding place. Calling
`getTextBeforeIndex(2, css::accessibility::AccessibleTextType::CHARACTER)`
returns a TextSegment with

* "b" as text
* a start offset of 1
* an end offset of 2

The commit message of the commit adding this suggests that the
semantics were changed at some point, maybe the doc just wasn't
updated to reflect this at this one place back then.

commit 161503a286e6f7e1be49f84d9ad6a6287bac486e
Date:   Thu Apr 24 16:36:13 2003 +

INTEGRATION: CWS uaa02 (1.1.2); FILE ADDED
2003/04/08 11:43:30 af 1.1.2.6: #108113# Made validity of index 
'length' implementation dependent for getCharacterBounds().
2003/04/08 10:04:41 af 1.1.2.5: #108113# Added a sequence of 
requested attributes to getCharacterAttributes().
2003/04/04 14:37:30 af 1.1.2.4: #i12332# Made position  a 
valid character for method getCharacterBounds().
->  2003/03/18 15:59:07 af 1.1.2.3: #108113# Changed the semantics of 
getText{Before,At,After}Index().
2003/03/14 10:40:54 af 1.1.2.2: #108113# Removed references to the 
drafts directory.
2003/03/11 15:00:42 af 1.1.2.1: #108113# Moved from 
drafts/com/sun/star/accessibility.

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

diff --git a/offapi/com/sun/star/accessibility/XAccessibleText.idl 
b/offapi/com/sun/star/accessibility/XAccessibleText.idl
index 19bd830fced6..4f7066a82746 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleText.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleText.idl
@@ -427,7 +427,7 @@ interface XAccessibleText : 
::com::sun::star::uno::XInterface
 
 @param nIndex
 Index of the character for which to return the text part after
-it.  The index character will be part of the returned string.
+it.  The index character will not be part of the returned string.
 The valid range is 0..length.
 
 @param nTextType


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

2022-06-17 Thread Mike Kaganski (via logerrit)
 offapi/com/sun/star/view/XMultiSelectionSupplier.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5e0b95494093de2849c5154b98917e1beab2a708
Author: Mike Kaganski 
AuthorDate: Fri Jun 17 15:15:16 2022 +0200
Commit: Mike Kaganski 
CommitDate: Fri Jun 17 18:19:20 2022 +0200

Drop a bogus slash

... added in commit eae791e82c8e138cc983c3e7058cc4e9dafa4002
  Author Jens-Heiner Rechtien 
  Date   Wed Jun 27 11:30:00 2007 +
INTEGRATION: CWS awttree01 (1.1.2); FILE ADDED

where it was misplaced (intended to be , not /).

Commit  1501e17b889b28e7394596ce4f98eab1c5b00d8f
  Author Rüdiger Timm 
  Date   Wed Jan 30 07:20:16 2008 +
INTEGRATION: CWS dba24d (1.2.92); FILE MERGED

added '/' before the '>', but kept the incorrect initial one.

Later commit 928b8640c0d1a9c49249100efbdd70f8c1090b07
  Author Michael Stahl 
  Date   Sun Apr 28 00:44:31 2013 +0200
*api: convert

removed the correctly placed slashes. This is a leftover.

Change-Id: I800f28de02dd8447509bc236614cab05c2b8c0df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136037
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/offapi/com/sun/star/view/XMultiSelectionSupplier.idl 
b/offapi/com/sun/star/view/XMultiSelectionSupplier.idl
index e6e4c48c97fe..937d3d347013 100644
--- a/offapi/com/sun/star/view/XMultiSelectionSupplier.idl
+++ b/offapi/com/sun/star/view/XMultiSelectionSupplier.idl
@@ -41,7 +41,7 @@ interface XMultiSelectionSupplier: XSelectionSupplier
 either an Object that is selectable or a sequence of objects that 
are selectable.
 
 @returns
-`TRUE`/, if Selection was added to the current 
selection.
+`TRUE`, if Selection was added to the current selection.
 `FALSE`, if Selection or parts of Selection 
could not be
 added to the current selection. For example, if the selection 
already contains
 objects that are forbidden to be selected together with 
Selection


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

2022-06-17 Thread Mike Kaganski (via logerrit)
 offapi/com/sun/star/view/XMultiSelectionSupplier.idl |6 --
 1 file changed, 6 deletions(-)

New commits:
commit 69e5d752ef20f5cd5b3a429a3546ae46bbb5f62a
Author: Mike Kaganski 
AuthorDate: Fri Jun 17 14:12:08 2022 +0200
Commit: Mike Kaganski 
CommitDate: Fri Jun 17 16:34:06 2022 +0200

Drop wrong '@returns' documentation

Caused this warning:

  
/home/tdf/jenkins/workspace/gerrit_windows/offapi/com/sun/star/view/XMultiSelectionSupplier.idl:60:
  warning: found documented return type for 
com::sun::star::view::XMultiSelectionSupplier::removeSelection
  that does not return anything

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

diff --git a/offapi/com/sun/star/view/XMultiSelectionSupplier.idl 
b/offapi/com/sun/star/view/XMultiSelectionSupplier.idl
index 15724f171717..e6e4c48c97fe 100644
--- a/offapi/com/sun/star/view/XMultiSelectionSupplier.idl
+++ b/offapi/com/sun/star/view/XMultiSelectionSupplier.idl
@@ -60,12 +60,6 @@ interface XMultiSelectionSupplier: XSelectionSupplier
 @param Selection
 either an Object that is selectable or a sequence of objects that 
are selectable.
 
-@returns
-`TRUE`/, if Selection was added to the current 
selection.
-`FALSE`, if Selection or parts of Selection 
could not be
-added to the current selection. For example, if the selection 
already contains
-objects that are forbidden to be selected together with 
Selection.
-
 @throws com::sun::star::lang::IllegalArgumentException
 If Selection is not a selectable object for this 
XMultiSelectionSupplier.
 Removing an object from the selection that is not part of the 
selection should not raise this exception


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

2022-06-17 Thread Mike Kaganski (via logerrit)
 offapi/com/sun/star/embed/XInplaceObject.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c1eba8d34a5ea13e6317c7820507d717ace4ec5c
Author: Mike Kaganski 
AuthorDate: Fri Jun 17 14:05:12 2022 +0200
Commit: Mike Kaganski 
CommitDate: Fri Jun 17 15:20:34 2022 +0200

Change '@returns' into '@param'

That was causing the warning:

  
/home/tdf/jenkins/workspace/gerrit_windows/offapi/com/sun/star/embed/XInplaceObject.idl:85:
 warning:
  found documented return type for 
com::sun::star::embed::XInplaceObject::translateAccelerators that
  does not return anything

A similar 'translateAccelerators' is in XInplaceClient.idl.

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

diff --git a/offapi/com/sun/star/embed/XInplaceObject.idl 
b/offapi/com/sun/star/embed/XInplaceObject.idl
index ba04393aaa3e..dd41dcfa5697 100644
--- a/offapi/com/sun/star/embed/XInplaceObject.idl
+++ b/offapi/com/sun/star/embed/XInplaceObject.idl
@@ -82,7 +82,7 @@ published interface XInplaceObject: 
com::sun::star::uno::XInterface
 /** provides accelerator table the container wants to use during inplace
 editing.
 
-@return
+@param aKeys
 an accelerator table from container
 
 @throws com::sun::star::embed::WrongStateException


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

2022-06-17 Thread Mike Kaganski (via logerrit)
 offapi/com/sun/star/sheet/XDataPilotTable2.idl |2 --
 1 file changed, 2 deletions(-)

New commits:
commit dfdeb1bd67a7e1ce3bad26e5d02b54e4ece5f0f2
Author: Mike Kaganski 
AuthorDate: Fri Jun 17 14:01:13 2022 +0200
Commit: Mike Kaganski 
CommitDate: Fri Jun 17 14:49:57 2022 +0200

Drop useless '@returns `VOID`'

... which caused the warning:

  
/home/tdf/jenkins/workspace/gerrit_windows/offapi/com/sun/star/sheet/XDataPilotTable2.idl:62:
 warning: found documented return type for 
com::sun::star::sheet::XDataPilotTable2::insertDrillDownSheet that does not 
return anything

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

diff --git a/offapi/com/sun/star/sheet/XDataPilotTable2.idl 
b/offapi/com/sun/star/sheet/XDataPilotTable2.idl
index 0d8a58283b25..d3dd6becd5a3 100644
--- a/offapi/com/sun/star/sheet/XDataPilotTable2.idl
+++ b/offapi/com/sun/star/sheet/XDataPilotTable2.idl
@@ -69,8 +69,6 @@ interface XDataPilotTable2: 
com::sun::star::sheet::XDataPilotTable
 is empty, no new sheet is inserted.
 
 @param aAddr address of a result cell
-
-@returns `VOID`
  */
 void insertDrillDownSheet( [in] com::sun::star::table::CellAddress aAddr );
 


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

2022-06-16 Thread Samuel Mehrbrodt (via logerrit)
 offapi/com/sun/star/drawing/FillProperties.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit df454a21c6f15404b312f06ae99620bc720258ef
Author: Samuel Mehrbrodt 
AuthorDate: Thu Jun 16 16:13:26 2022 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jun 16 19:09:24 2022 +0200

Next release is 7.5

According to 27ebceb366356f65c836e7edcc3609193f6e009c

Change-Id: I0fe247ca398a3c4607840c1a190453c52204749b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135986
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/drawing/FillProperties.idl 
b/offapi/com/sun/star/drawing/FillProperties.idl
index 2e6ff1927424..e96c3f57a01c 100644
--- a/offapi/com/sun/star/drawing/FillProperties.idl
+++ b/offapi/com/sun/star/drawing/FillProperties.idl
@@ -219,7 +219,7 @@ published service FillProperties
 /** If this is `TRUE`, and FillStyle is FillStyle::NONE:
 The area displays the slide background
 
-@since LibreOffice 8.0
+@since LibreOffice 7.5
 */
 [optional, property] boolean FillUseSlideBackground;
 


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

2022-06-16 Thread Andrea Gelmini (via logerrit)
 offapi/com/sun/star/ucb/MissingPropertiesException.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fcdfd309345afaf88fac587e837e51e741c60400
Author: Andrea Gelmini 
AuthorDate: Tue Jun 14 11:58:18 2022 +0200
Commit: Julien Nabet 
CommitDate: Thu Jun 16 13:01:48 2022 +0200

Fix typo

Change-Id: I7ff6efac1edd171f65ebd901d8f03f38364496b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135927
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/offapi/com/sun/star/ucb/MissingPropertiesException.idl 
b/offapi/com/sun/star/ucb/MissingPropertiesException.idl
index a4f55c1903b0..a56193d407da 100644
--- a/offapi/com/sun/star/ucb/MissingPropertiesException.idl
+++ b/offapi/com/sun/star/ucb/MissingPropertiesException.idl
@@ -22,7 +22,7 @@ module com { module sun { module star { module ucb {
 
 /** This exception is used to indicate that there are properties missing.
 
-For example, to create a new resource, usually one ore more property
+For example, to create a new resource, usually one or more property
 values must be set prior to executing the command "insert", which makes
 the new resource persistent.
 


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

2022-06-16 Thread Andrea Gelmini (via logerrit)
 offapi/com/sun/star/form/binding/ListEntrySource.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 965bad9abb9b07245cce525694bc0b52c08c05fa
Author: Andrea Gelmini 
AuthorDate: Tue Jun 14 11:59:05 2022 +0200
Commit: Julien Nabet 
CommitDate: Thu Jun 16 13:01:22 2022 +0200

Fix typo

Change-Id: I0ccce1c6e143b819dbb78d6fb74ccde8ce737f84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135928
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/offapi/com/sun/star/form/binding/ListEntrySource.idl 
b/offapi/com/sun/star/form/binding/ListEntrySource.idl
index ebad2c15e166..4da8e751ef02 100644
--- a/offapi/com/sun/star/form/binding/ListEntrySource.idl
+++ b/offapi/com/sun/star/form/binding/ListEntrySource.idl
@@ -31,7 +31,7 @@ service ListEntrySource
 
 /** allows life time control for the component
 
-An ListEntrySource will be known to one ore more components
+An ListEntrySource will be known to one or more components
 supporting the XListEntrySink interface, which all work with
 this source. However, they will not own the ListEntrySource.
 The ownership is with another instance, which may also decide to 
obsolete


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

2022-06-16 Thread Andrea Gelmini (via logerrit)
 offapi/com/sun/star/awt/MouseEvent.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7c4481e3c41547773db3fa1f53391430cff8d3cb
Author: Andrea Gelmini 
AuthorDate: Tue Jun 14 11:59:47 2022 +0200
Commit: Julien Nabet 
CommitDate: Thu Jun 16 12:33:18 2022 +0200

Fix typo

Change-Id: Ic6252987b61d0f55a96193bdc5da5fecc1a36171
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135930
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/offapi/com/sun/star/awt/MouseEvent.idl 
b/offapi/com/sun/star/awt/MouseEvent.idl
index c0dc2816ffd1..1bac81bc55a0 100644
--- a/offapi/com/sun/star/awt/MouseEvent.idl
+++ b/offapi/com/sun/star/awt/MouseEvent.idl
@@ -36,7 +36,7 @@ published struct MouseEvent: com::sun::star::awt::InputEvent
 
 /** contains the pressed mouse buttons.
 
-Zero ore more constants from the
+Zero or more constants from the
 com::sun::star::awt::MouseButton group.
  */
 short Buttons;


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

2022-06-16 Thread Andrea Gelmini (via logerrit)
 offapi/com/sun/star/form/binding/ValueBinding.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 81d14fa410079bd55397754b1b9af3645df3e100
Author: Andrea Gelmini 
AuthorDate: Tue Jun 14 11:59:25 2022 +0200
Commit: Julien Nabet 
CommitDate: Thu Jun 16 12:18:20 2022 +0200

Fix typo

Change-Id: I38f2e4011f348574d1d2adb7eb34cac6b2df43da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135929
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/offapi/com/sun/star/form/binding/ValueBinding.idl 
b/offapi/com/sun/star/form/binding/ValueBinding.idl
index 5010ba1f20b4..3562e6d23240 100644
--- a/offapi/com/sun/star/form/binding/ValueBinding.idl
+++ b/offapi/com/sun/star/form/binding/ValueBinding.idl
@@ -77,7 +77,7 @@ service ValueBinding
 
 /** allows life time control for the component
 
-An ValueBinding may be known to one ore more components
+A ValueBinding may be known to one or more components
 supporting the XBindableValue interface, which all work with
 this binding. However, they will not own the ValueBinding.
 The ownership is with another instance, which may also decide to 
obsolete


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

2022-05-30 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/util/XCacheInfo.idl |   14 ++
 1 file changed, 2 insertions(+), 12 deletions(-)

New commits:
commit 99eab75edd636fbb3e01e9a59e84b7729d999738
Author: Miklos Vajna 
AuthorDate: Mon May 30 14:12:23 2022 +0200
Commit: Miklos Vajna 
CommitDate: Mon May 30 16:37:36 2022 +0200

offapi: fix util::XCacheInfo header/footer

Addresses

.

Change-Id: I36d48288be1456f06813befbb24e896767957eb6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135126
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/util/XCacheInfo.idl 
b/offapi/com/sun/star/util/XCacheInfo.idl
index 299d49690246..d7c403974d28 100644
--- a/offapi/com/sun/star/util/XCacheInfo.idl
+++ b/offapi/com/sun/star/util/XCacheInfo.idl
@@ -1,20 +1,10 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
 /*
  * This file is part of the LibreOffice project.
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 #ifndef __com_sun_star_util_XCacheInfo_idl__
 #define __com_sun_star_util_XCacheInfo_idl__
@@ -37,4 +27,4 @@ interface XCacheInfo: com::sun::star::uno::XInterface
 
 #endif
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */


[Libreoffice-commits] core.git: offapi/com sc/inc sc/source test/source

2022-05-03 Thread Samuel Mehrbrodt (via logerrit)
 offapi/com/sun/star/sheet/SpreadsheetViewSettings.idl |7 ++
 sc/inc/ViewSettingsSequenceDefines.hxx|3 +
 sc/inc/unonames.hxx   |1 
 sc/source/ui/app/inputwin.cxx |   43 ++
 sc/source/ui/inc/inputwin.hxx |8 ++-
 sc/source/ui/inc/viewdata.hxx |   10 
 sc/source/ui/unoobj/viewuno.cxx   |   24 +-
 sc/source/ui/view/viewdata.cxx|   21 
 test/source/sheet/spreadsheetviewsettings.cxx |   10 
 9 files changed, 115 insertions(+), 12 deletions(-)

New commits:
commit d0cacf09a1105d89bf3df84b18623d790e3aeb82
Author: Samuel Mehrbrodt 
AuthorDate: Wed Apr 27 11:45:04 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue May 3 14:52:07 2022 +0200

tdf#99708 Save formula bar height to document

Save the current state of the Calc formula bar to the document.
Number of visible lines is saved into the document settings
and restored when loading that document.

Also adds a UNO property, so that the formula bar height can be
changed via UNO.

Change-Id: Ifef0c9e42cb4f7465516629d2c22974367e0eb33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133499
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/offapi/com/sun/star/sheet/SpreadsheetViewSettings.idl 
b/offapi/com/sun/star/sheet/SpreadsheetViewSettings.idl
index 9dc5b853f61d..69da69013db0 100644
--- a/offapi/com/sun/star/sheet/SpreadsheetViewSettings.idl
+++ b/offapi/com/sun/star/sheet/SpreadsheetViewSettings.idl
@@ -152,6 +152,13 @@ published service SpreadsheetViewSettings
 com::sun::star::view::DocumentZoomType::BY_VALUE.
 */
 [property] short ZoomValue;
+
+/** Number of lines shown in the Formula bar
+Default is 1, maximum value is 25.
+
+@since LibreOffice 7.4
+*/
+[optional, property] short FormulaBarHeight;
 };
 
 
diff --git a/sc/inc/ViewSettingsSequenceDefines.hxx 
b/sc/inc/ViewSettingsSequenceDefines.hxx
index 8fdbb5bb16ec..7fd754a07b6d 100644
--- a/sc/inc/ViewSettingsSequenceDefines.hxx
+++ b/sc/inc/ViewSettingsSequenceDefines.hxx
@@ -50,6 +50,7 @@
 #define SC_RASTERSUBX   21
 #define SC_RASTERSUBY   22
 #define SC_RASTERSYNC   23
+#define SC_FORMULA_BAR_HEIGHT   24
 
 // this are the defines for the position of the settings in the
 // TableViewSettingsSequence
@@ -70,6 +71,7 @@
 #define SC_TABLE_ZOOM_TYPE  11
 #define SC_TABLE_ZOOM_VALUE 12
 #define SC_TABLE_PAGE_VIEW_ZOOM_VALUE   13
+#define SC_FORMULA_BAR_HEIGHT_VALUE 14
 #define SC_TABLE_SHOWGRID   15
 
 inline constexpr OUStringLiteral SC_CURSORPOSITIONX = u"CursorPositionX";
@@ -95,6 +97,7 @@ inline constexpr OUStringLiteral SC_ZOOMTYPE = u"ZoomType";
 inline constexpr OUStringLiteral SC_ZOOMVALUE = u"ZoomValue";
 inline constexpr OUStringLiteral SC_PAGEVIEWZOOMVALUE = u"PageViewZoomValue";
 inline constexpr OUStringLiteral SC_SHOWPAGEBREAKPREVIEW = 
u"ShowPageBreakPreview";
+inline constexpr OUStringLiteral SC_FORMULABARHEIGHT = u"FormulaBarHeight";
 inline constexpr OUStringLiteral SC_VIEWID = u"ViewId";
 #define SC_VIEW "view"
 
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 7a73176cfd29..b21f7405d035 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -576,6 +576,7 @@ inline constexpr OUStringLiteral 
SC_SERVICENAME_CHART_PIVOTTABLE_DATAPROVIDER =
 #define SC_UNO_UPDTEMPL "UpdateFromTemplate"
 #define SC_UNO_FILTERED_RANGE_SELECTION   "FilteredRangeSelection"
 #define SC_UNO_VISAREASCREEN"VisibleAreaOnScreen"
+#define SC_UNO_FORMULABARHEIGHT "FormulaBarHeight"
 #define SC_UNO_IMAGE_PREFERRED_DPI  "ImagePreferredDPI"
 
 /*Stampit enable/disable print cancel */
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index e50c682a1703..ab258fe6368c 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -677,6 +677,11 @@ void ScInputWindow::EnableButtons( bool bEnable )
 //  Invalidate();
 }
 
+void ScInputWindow::NumLinesChanged()
+{
+mxTextWindow->NumLinesChanged();
+}
+
 void ScInputWindow::StateChanged( StateChangedType nType )
 {
 ToolBox::StateChanged( nType );
@@ -908,6 +913,7 @@ void ScInputBarGroup::Resize()
 {
 mxTextWndGroup->SetScrollPolicy();
 InterimItemWindow::Resize();
+TriggerToolboxLayout();
 }
 
 void ScInputBarGroup::StopEditEngine(bool bAll)
@@ -1034,16 +1040,25 @@ IMPL_LINK_NOARG(ScInputWindow, DropdownClickHdl, 
ToolBox *, void)
 IMPL_LINK_NOARG(ScInputBarGroup, ClickHdl, weld::Button&, void)
 {
 if (mxTextWndGroup->GetNumLines() > 1)
-{
 mxTextWndGroup->SetNumLines(1);
-mxButtonUp->hide();
-mxButtonDown->show();
-}
 else
-{

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

2022-04-26 Thread Samuel Mehrbrodt (via logerrit)
 offapi/com/sun/star/system/windows/XJumpList.idl |  118 +---
 shell/source/win32/jumplist/JumpList.cxx |  224 ---
 2 files changed, 296 insertions(+), 46 deletions(-)

New commits:
commit 675788b208a7c775f8eaa51cd90528b1bb92ed79
Author: Samuel Mehrbrodt 
AuthorDate: Mon Apr 25 10:53:09 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Apr 26 11:46:17 2022 +0200

Extend UNO API for custom jump lists

* Allow to display the recent/frequent files
* Allow adding items to the "Tasks" category
* Allow adding multiple categories

Follow-up to 7efd22c912262f7bf4e4735dae70db0b31ab3d5b

Change-Id: I860d44c1a0d9bc8200529c908b6103741dc37bb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133367
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/offapi/com/sun/star/system/windows/XJumpList.idl 
b/offapi/com/sun/star/system/windows/XJumpList.idl
index 80fef03b60aa..ddf9415243c2 100644
--- a/offapi/com/sun/star/system/windows/XJumpList.idl
+++ b/offapi/com/sun/star/system/windows/XJumpList.idl
@@ -19,16 +19,48 @@ module com { module sun { module star { module system { 
module windows {
 
 /** Specifies an interface for adding custom jump lists to the task bar 
(Windows only)
 
+To add a new jump list, call
+1. XJumpList::beginList
+2. XJumpList::appendCategory / XJumpList::addTasks / 
XJumpList::showRecentFiles / XJumpList::showFrequentFiles
+3. XJumpList::commitList
+
+Use XJumpList::abortList to cancel a current list building session.
+Use XJumpList::getRemovedItems to see which items were removed by the user.
+
 @since LibreOffice 7.4
 */
 interface XJumpList: com::sun::star::uno::XInterface
 {
-/** Add (or update) a jump list category.
+/**
+   Start a new jump list.
+
+   @param application
+Used to map the jump list to the correct application. Use one of the 
following values:
+
+Writer
+Calc
+Impress
+Draw
+Math
+Base
+Startcenter
+
 
-Note that it is only possible to have one jump list category per 
`application`.
+"Startcenter" will map to the generic "LibreOffice" icon.
+
+@throws com::sun::star::lang::IllegalArgumentException
+When `application` is invalid
 
-When there is already a jump list for the given `application`,
-that jump list will be cleared, and the new `category` and 
`jumpListItems` will be added.
+@throws com::sun::star::util::InvalidStateException
+When there is already an open list.
+ */
+void beginList([in] string application)
+raises( ::com::sun::star::lang::IllegalArgumentException, 
::com::sun::star::util::InvalidStateException );
+
+/** Add a jump list category.
+
+Users can pin or remove items added via this method.
+Use XJumpList::getRemovedItems to see which items were removed by the 
user.
 
 @param category
 Specifies the category name. It will appear as the title of the custom 
jump list.
@@ -44,34 +76,72 @@ interface XJumpList: com::sun::star::uno::XInterface
 If you try to add items which the user removed before,
 they will be silently ignored and not added to the list.
 
-@param application
-Used to map the jump list to the correct application. Use one of the 
following values:
-
-Writer
-Calc
-Impress
-Draw
-Math
-Base
-Startcenter
-
-
-"Startcenter" will map to the generic "LibreOffice" icon.
-
 @throws com::sun::star::lang::IllegalArgumentException
 When one of the following applies:
 
 `category` is empty
 `jumpListItems` is empty or contains only items which were 
removed by the user
-`application` is invalid
 
+
+@throws com::sun::star::util::InvalidStateException
+When there is no open list.
 */
 void appendCategory( [in] string category,
- [in] 
sequence jumpListItems,
- [in] string application )
-raises( ::com::sun::star::lang::IllegalArgumentException );
+ [in] 
sequence jumpListItems )
+raises( ::com::sun::star::lang::IllegalArgumentException, 
::com::sun::star::util::InvalidStateException );
+
+/** Add items to the "Tasks" category. This category is system-defined and 
the category title cannot be changed.
+Also the user cannot remove or pin items from this category (as he can 
with items added via XJumpList::appendCategory ).
+
+@param jumpListItems
+Specifies a list of com::sun::star::system::JumpListItem.
+Must contain at least one item.
+These will be added as entries below the "Tasks" system category.
+
+@throws com::sun::s

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

2022-04-19 Thread Samuel Mehrbrodt (via logerrit)
 offapi/com/sun/star/document/XDocumentInsertable.idl |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 7321d43155e91eeb4302ba94ab917b773695f944
Author: Samuel Mehrbrodt 
AuthorDate: Thu Apr 14 15:04:33 2022 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Tue Apr 19 11:17:46 2022 +0200

Extend insertDocumentFromURL documentation

Change-Id: I892c876ff53a0aaf2ce4d484604ef0c2a95d8801
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133035
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/offapi/com/sun/star/document/XDocumentInsertable.idl 
b/offapi/com/sun/star/document/XDocumentInsertable.idl
index 6b72864eec2f..340305c6de2b 100644
--- a/offapi/com/sun/star/document/XDocumentInsertable.idl
+++ b/offapi/com/sun/star/document/XDocumentInsertable.idl
@@ -32,12 +32,16 @@
 module com {   module sun {   module star {   module document {
 
 
-/** makes it possible to import a document from a given URL
+/** Makes it possible to import a document from a given URL
 into this document.
  */
 published interface XDocumentInsertable: com::sun::star::uno::XInterface
 {
-/** inserts the document that is specified by the URL.
+/** Inserts the document that is specified by the URL.
+The document will be inserted at the current cursor position.
+
+Make sure that you insert at a position which can be split
+in two paragraphs (i.e. not inside of a field).
  */
 void insertDocumentFromURL( [in] string aURL,
  [in] sequence aOptions )


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

2022-04-15 Thread Caolán McNamara (via logerrit)
 offapi/com/sun/star/frame/XModel2.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 53ec893208e2fb82d1569a1e2414b83b5a20bbfa
Author: Caolán McNamara 
AuthorDate: Thu Apr 14 09:39:49 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Apr 15 10:17:43 2022 +0200

warning: found  tag without matching 

so use same solution as com/sun/star/style/XStyleLoader.hdl

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

diff --git a/offapi/com/sun/star/frame/XModel2.idl 
b/offapi/com/sun/star/frame/XModel2.idl
index f6cb57d72500..615fc82446bf 100644
--- a/offapi/com/sun/star/frame/XModel2.idl
+++ b/offapi/com/sun/star/frame/XModel2.idl
@@ -147,7 +147,7 @@ interface XModel2 : com::sun::star::frame::XModel
 com::sun::star::document::MediaDescriptor::LockPrint
 com::sun::star::document::MediaDescriptor::LockSave
 com::sun::star::document::MediaDescriptor::LockEditDoc
-com::sun::star::document::MediaDescriptor::EncryptionData 
@since LibreOffice 7.0
+com::sun::star::document::MediaDescriptor::EncryptionData 
(since LibreOffice 7.0)
 
 
 @throws com::sun::star::lang::IllegalArgumentException When trying to 
set an unsupported property


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

2022-03-31 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/BaseFrameProperties.idl |6 +
 sw/inc/cmdid.h   |1 
 sw/inc/frmfmt.hxx|6 +
 sw/qa/core/unocore/unocore.cxx   |   25 +++
 sw/source/core/draw/dpage.cxx|   11 --
 sw/source/core/layout/atrfrm.cxx |   10 +
 sw/source/core/unocore/unoframe.cxx  |   12 +++
 sw/source/core/unocore/unomapproperties.hxx  |1 
 8 files changed, 70 insertions(+), 2 deletions(-)

New commits:
commit 9caf6e4a3ac05a9d2e9d695e59d4ae048bf078b2
Author: Miklos Vajna 
AuthorDate: Thu Mar 31 14:27:40 2022 +0200
Commit: Miklos Vajna 
CommitDate: Thu Mar 31 15:59:46 2022 +0200

sw fly frames: add Tooltip uno property

This is somewhat similar to commit
1acf8e3cfaf1ef92008e39514a32ace0d036e552 (sw fields: add Title uno
property, 2022-03-24), except that this is for images, and images
already had a Title, which is persisted to ODT.

So add a new Tooltip property which has priority over the tooltip
generated for URLs, in case the tooltip is non-empty. This helps in case
the URL is long / non-readable / confusing and a more helpful
popup text can be provided instead.

Change-Id: Ife34dab5e4490eb1682c55fb7c01f7509d0057fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132361
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/text/BaseFrameProperties.idl 
b/offapi/com/sun/star/text/BaseFrameProperties.idl
index bffa5ddf4770..3741f0af2710 100644
--- a/offapi/com/sun/star/text/BaseFrameProperties.idl
+++ b/offapi/com/sun/star/text/BaseFrameProperties.idl
@@ -372,6 +372,12 @@ published service BaseFrameProperties
 @since LibreOffice 6.4
 */
 [optional, property] boolean AllowOverlap;
+
+/** Contains popup text for the frame, used to for tooltip purposes if 
it's non-empty.
+
+@since LibreOffice 7.4
+*/
+[optional, property] string Tooltip;
 };
 
 
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index c42818d25fa5..4add360583bb 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -862,6 +862,7 @@ class SwUINumRuleItem;
 #define FN_SET_FRM_ALT_NAME TypedWhichId(FN_FRAME + 
18)
 #define FN_UNO_TITLE(FN_FRAME + 19)
 #define FN_UNO_DESCRIPTION  TypedWhichId(FN_FRAME + 
20)
+#define FN_UNO_TOOLTIP  (FN_FRAME + 21)
 
 #define SID_ATTR_PAGE_COLUMN(FN_SIDEBAR + 0)
 #define SID_ATTR_PAGE_HEADER(FN_SIDEBAR + 3)
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 59aee54a2f4a..12795bf10428 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -191,6 +191,8 @@ class SW_DLLPUBLIC SwFlyFrameFormat final : public 
SwFrameFormat
 friend class SwDoc;
 OUString msTitle;
 OUString msDesc;
+/// A tooltip has priority over an SwFormatURL and is not persisted to 
files.
+OUString msTooltip;
 
 /** Both not existent.
it stores the previous position of Prt rectangle from 
RequestObjectResize
@@ -220,6 +222,10 @@ public:
 
 OUString GetObjTitle() const;
 void SetObjTitle( const OUString& rTitle, bool bBroadcast = false );
+
+OUString GetObjTooltip() const;
+void SetObjTooltip(const OUString& rTooltip);
+
 OUString GetObjDescription() const;
 void SetObjDescription( const OUString& rDescription, bool bBroadcast = 
false );
 
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index f7181a22b2b1..3d5bb93f2600 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -337,6 +337,31 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testContentControlInsert)
 CPPUNIT_ASSERT(pAttr);
 }
 
+CPPUNIT_TEST_FIXTURE(SwModelTestBase, testImageTooltip)
+{
+// Given a document with an image and a hyperlink on it:
+loadURL("private:factory/swriter", nullptr);
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xDocument(mxComponent, uno::UNO_QUERY);
+uno::Reference xText = xDocument->getText();
+uno::Reference xCursor = xText->createTextCursor();
+uno::Reference xImage(
+xFactory->createInstance("com.sun.star.text.TextGraphicObject"), 
uno::UNO_QUERY);
+xText->insertTextContent(xCursor, xImage, /*bAbsorb=*/false);
+uno::Reference xImageProps(xImage, uno::UNO_QUERY);
+xImageProps->setPropertyValue("HyperLinkURL", 
uno::makeAny(OUString("http://www.example.com";)));
+
+// When setting a tooltip on the image:
+OUString aExpected("first line\nsecond line");
+xImageProps->setPropertyValue("Tooltip", uno::makeAny(aExpected));
+
+// Then make sure that the tooltip we read back matches the one previously 
specified:
+// Without the accompanying fix in place, this test would have failed with:
+// An uncaught exception of type 
com.sun.star.beans.UnknownPropertyExc

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

2022-03-28 Thread Michael Weghorn (via logerrit)
 offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl |   23 
--
 vcl/osx/a11ylistener.cxx |4 -
 vcl/unx/gtk3/a11y/atklistener.cxx|   20 

 3 files changed, 1 insertion(+), 46 deletions(-)

New commits:
commit f622149cb2ee3a8259f8e8f3b013ca5b4b5e1d80
Author: Michael Weghorn 
AuthorDate: Mon Mar 28 16:15:57 2022 +0200
Commit: Michael Weghorn 
CommitDate: Tue Mar 29 06:54:19 2022 +0200

a11y: Drop unused, deprecated table model change event types

All places that were previously emitting
`AccessibleTableModelChangeType::INSERT`
and `AccessibleTableModelChangeType::DELETE`
events have been ported to emit
the 4 new event types introduced in
Change-Id I30821a5acafa4f3d1dafdfc219f3b4568d9a6e89,
"a11y: Add new table model change types for row/col insertion/del"
instead.
Therefore, the handling of those events can be
dropped from the gtk3 VCL plugin and for macOS's
a11y listener as well.

Also, drop the now completely unused
constants from the IDL file as mentioned
in Change-Id I30821a5acafa4f3d1dafdfc219f3b4568d9a6e89:

> From a UNO API perspective, this change
> and the final removal of the
> `AccessibleTableModelChangeType::DELETE`
> and `AccessibleTableModelChangeType::INSERT`
> constants in a follow-up commit
> should be unproblematic, because the
> corresponding APIs have been unpublished in
>
> commit 70626249cd247d9acdad417b8eaf252bae22c059
> Date:   Thu Nov 29 00:27:03 2012 +0100
>
> API CHANGE a11y unpublishing and add/removeListener rename.

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

diff --git 
a/offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl 
b/offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl
index 69669eb11eda..02164df9731e 100644
--- a/offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl
+++ b/offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl
@@ -44,29 +44,6 @@ module com { module sun { module star { module accessibility 
{
 */
 constants AccessibleTableModelChangeType
 {
-/** One or more rows and/or columns have been inserted.
-
-Use the fields of the AccessibleTableModelChange
-structure to determine the indices of the rows and/or columns that
-have been inserted.
-
-@deprecated: use ROWS_INSERTED/COLUMNS_INSERTED instead.
-This constant will be removed once all remaining uses have been
-ported.
-*/
-const short INSERT = 1;
-
-/** One or more rows and/or columns have been deleted.
-
-The affected area of the table is stored in the fields of the
-AccessibleTableModelChange structure.
-
-@deprecated: use ROWS_REMOVED/COLUMNS_REMOVED instead.
-This constant will be removed once all remaining uses have been
-ported.
- */
-const short DELETE = 2;
-
 /** Some of the table data has changed.
 
 The number of rows and columns remains unchanged.  Only (some of)
diff --git a/vcl/osx/a11ylistener.cxx b/vcl/osx/a11ylistener.cxx
index fd275dab3079..b49b4509270e 100644
--- a/vcl/osx/a11ylistener.cxx
+++ b/vcl/osx/a11ylistener.cxx
@@ -42,9 +42,7 @@ static NSString * getTableNotification( const 
AccessibleEventObject& aEvent )
 
 if( (aEvent.NewValue >>= aChange) &&
 (aChange.Type == AccessibleTableModelChangeType::ROWS_INSERTED ||
- aChange.Type == AccessibleTableModelChangeType::ROWS_REMOVED ||
-(( AccessibleTableModelChangeType::INSERT == aChange.Type || 
AccessibleTableModelChangeType::DELETE == aChange.Type ) &&
-aChange.FirstRow != aChange.LastRow )))
+ aChange.Type == AccessibleTableModelChangeType::ROWS_REMOVED))
 {
 notification = NSAccessibilityRowCountChangedNotification;
 }
diff --git a/vcl/unx/gtk3/a11y/atklistener.cxx 
b/vcl/unx/gtk3/a11y/atklistener.cxx
index d73c2f753b3b..f0c2504c9acf 100644
--- a/vcl/unx/gtk3/a11y/atklistener.cxx
+++ b/vcl/unx/gtk3/a11y/atklistener.cxx
@@ -625,28 +625,8 @@ void AtkListener::notifyEvent( const 
accessibility::AccessibleEventObject& aEven
 sal_Int32 nRowsChanged = aChange.LastRow - aChange.FirstRow + 1;
 sal_Int32 nColumnsChanged = aChange.LastColumn - 
aChange.FirstColumn + 1;
 
-static const struct {
-const char *row;
-const char *col;
-} aSignalNames[] =
-{
-{ nullptr, nullptr }, // dummy
-{ "row_inserted", "column_inserted" }, // INSERT = 1
-{ "row_deleted", "column_deleted" } // DELETE = 2
-};
 switch( aChange.Type )
 {

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

2022-03-28 Thread Michael Weghorn (via logerrit)
 offapi/com/sun/star/accessibility/AccessibleTableModelChange.idl |4 
 offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl |   64 
+-
 vcl/osx/a11ylistener.cxx |6 
 vcl/unx/gtk3/a11y/atklistener.cxx|   17 ++
 4 files changed, 81 insertions(+), 10 deletions(-)

New commits:
commit 5371eef48a34acd06307a7b2bf898586938e27ff
Author: Michael Weghorn 
AuthorDate: Mon Mar 28 08:40:59 2022 +0200
Commit: Michael Weghorn 
CommitDate: Tue Mar 29 06:48:25 2022 +0200

a11y: Add new table model change types for row/col insertion/del

So far, there were two types/constants
to use in an `AcessibleTableModelChange` event to indicate
the insertion or deletion of rows and/or columns. From
`offapi/com/sun/star/accessibility/AccessibleTableModelChangeType.idl`:

> /** One or more rows and/or columns have been inserted.
>
> Use the fields of the AccessibleTableModelChange
> structure to determine the indices of the rows and/or columns that
> have been inserted.
> */
> const short INSERT = 1;
>
> /** One or more rows and/or columns have been deleted.
>
> The affected area of the table is stored in the fields of the
> AccessibleTableModelChange structure.
>  */
> const short DELETE = 2;

From the documentation, it would be possible to indicate an
insertion or deletion of both, rows and columns in a single
event. However, there is no single instance where this is
actually used to indicate the deletion/insertion of
both, whole rows and whole columns at the same time.

The way that indices are currently used is rather confusing
and results in incorrect a11y events being sent on maOS as well
as the gtk3 VCL plugin:

When only rows are inserted, row indices are set as expected
(index of the first and last inserted row), but the column
indices are set to the first and last column in the table;
i.e. the indices actually give the range of the newly
inserted cell range, rather than just the indices of the rows
that have been inserted. (The same applies
the other way around when only columns are inserted.)
That's not what I would have expected when reading the
documentation. ("Use the fields of the AccessibleTableModelChange
structure to determine the indices of the rows and/or columns that
have been inserted.")

In the same way, the range of deleted cells is set
when emitting `AccessibleTableModelChangeType::DELETE` events.
In this case, this can be seen as matching what the
documentation says. ("The affected area of the table is
stored in the fields of the AccessibleTableModelChange
structure.")

In any case, the way that the events are handled
in the gtk3 VCL plugin and for macOS results in
the emission of incorrect events,
since those are handling such indices as if both,
rows and columns had been inserted/deleted.

Example for the gtk3 VCL plugin:
Row with index 1 has been deleted from a table.

-> an AccessibleTableModelChange event is sent with

Type=AccessibleTableModelChangeType::DELETE
FirstRow=1
LastRow=1
FirstColumn=0
LastColumn=

This would then result in 2 AT-SPI events being
emitted by the gtk3 VCL plugin:

* one that indicates that row 1 has been deleted (OK)
* another event that indicates that all columns have been
  deleted (NOT OK)

Instead of changing the handling of the existing
`AccessibleTableModelChangeType`s, introduce 4 new
types to replace the existing ones that
don't mix handling of rows and columns at
the same time: one for row insertion,
one for column insertion, one for row deletion,
one for column deletion.

This commit also adds handling for the newly added
change types for macOS and the gtk3 VCL plugin on
Linux.

winaccessibility is unaffected because
it doesn't have any handling specific
to the change type.
The qt5/qt6 VCL plugins don't yet have any
handling for the `AcessibleTableModelChange`
event yet (but that will be added in a follow-up
commit).

Existing uses of
`AccessibleTableModelChangeType::INSERT` and
`AccessibleTableModelChangeType::DELETE` will
be migrated to use the new types in
follow-up commits.

From a UNO API perspective, this change
and the final removal of the
`AccessibleTableModelChangeType::DELETE`
and `AccessibleTableModelChangeType::INSERT`
constants in a follow-up commit
should be unproblematic, because the
corresponding APIs have been unpublished in

commit 70626249cd247d9acdad417b8eaf252bae22c059
Date:   Thu Nov 29 00:27:03

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

2022-03-24 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/TextField.idl |6 ++
 sw/inc/fldbas.hxx  |4 
 sw/qa/core/unocore/unocore.cxx |   29 +
 sw/source/core/fields/fldbas.cxx   |   15 +++
 sw/source/core/fields/usrfld.cxx   |1 +
 sw/source/core/inc/unofldmid.h |1 +
 sw/source/core/unocore/unomap.cxx  |1 +
 sw/source/uibase/docvw/edtwin2.cxx |   12 
 8 files changed, 69 insertions(+)

New commits:
commit 1acf8e3cfaf1ef92008e39514a32ace0d036e552
Author: Miklos Vajna 
AuthorDate: Thu Mar 24 15:18:28 2022 +0100
Commit: Miklos Vajna 
CommitDate: Thu Mar 24 17:29:52 2022 +0100

sw fields: add Title uno property

The use-case is user fields, which are kind of variables in the
document. They have a name and a value, but the name might be only
readable to an extension or macro, not to the user. In this case, it
makes sense to have a way to specify a user-readable tooltip.

Be consistent with TextFrames which already have a Title property.

Change-Id: I986792f5e55e0b96489347be482d640d155113cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132077
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/text/TextField.idl 
b/offapi/com/sun/star/text/TextField.idl
index 38c58e9afb1e..5499792b8c41 100644
--- a/offapi/com/sun/star/text/TextField.idl
+++ b/offapi/com/sun/star/text/TextField.idl
@@ -66,6 +66,12 @@ published service TextField
  */
 [optional, property, readonly] boolean IsFieldDisplayed;
 
+/** Contains short title for the field, used to for tooltip purposes if 
it's non-empty.
+
+@since LibreOffice 7.4
+*/
+[optional, property] string Title;
+
 
 };
 
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index ccef32fa7921..5a256cb1884d 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -297,6 +297,8 @@ private:
 LanguageTypem_nLang;///< Always change via 
SetLanguage!
 boolm_bUseFieldValueCache;  /// control the usage of the 
cached field value
 boolm_bIsAutomaticLanguage;
+/// Used for tooltip purposes when it's not-empty.
+OUString m_aTitle;
 
 virtual OUStringExpandImpl(SwRootFrame const* pLayout) const = 0;
 virtual std::unique_ptr Copy() const = 0;
@@ -389,6 +391,8 @@ public:
 /// Is this field clickable?
 bool IsClickable() const;
 virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
+OUString GetTitle() const { return m_aTitle; }
+void SetTitle(const OUString& rTitle) { m_aTitle = rTitle; }
 };
 
 inline SwFieldType* SwField::GetTyp() const
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 30839266a7fc..3a569d64feef 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -280,6 +281,34 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, 
testLineBreakTextPortionEnum)
 CPPUNIT_ASSERT_EQUAL(static_cast(SwLineBreakClear::ALL), 
eClear);
 }
 
+CPPUNIT_TEST_FIXTURE(SwModelTestBase, testUserFieldTooltip)
+{
+// Given a document with a user field:
+loadURL("private:factory/swriter", nullptr);
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xField(
+xFactory->createInstance("com.sun.star.text.TextField.User"), 
uno::UNO_QUERY);
+uno::Reference xMaster(
+xFactory->createInstance("com.sun.star.text.FieldMaster.User"), 
uno::UNO_QUERY);
+xMaster->setPropertyValue("Name", uno::makeAny(OUString("a_user_field")));
+xField->attachTextFieldMaster(xMaster);
+xField->getTextFieldMaster()->setPropertyValue("Content", 
uno::makeAny(OUString("42")));
+uno::Reference xDocument(mxComponent, uno::UNO_QUERY);
+uno::Reference xText = xDocument->getText();
+xText->insertTextContent(xText->createTextCursor(), xField, 
/*bAbsorb=*/false);
+uno::Reference xFieldProps(xField, uno::UNO_QUERY);
+
+// When setting a tooltip on the field:
+OUString aExpected("first line\nsecond line");
+xFieldProps->setPropertyValue("Title", uno::makeAny(aExpected));
+
+// Then make sure that the tooltip we read back matches the one previously 
specified:
+// Without the accompanying fix in place, this test would have failed with:
+// - the property is of unexpected type or void: Title
+// i.e. reading of the tooltip was broken.
+CPPUNIT_ASSERT_EQUAL(aExpected, getProperty(xFieldProps, 
"Title"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index c4272c3dadea..59e54e291dbb 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -355,6 +355,11 @@ bool  SwField::QueryValue( uno::Any& rVal, sal_uInt16 
nWhichId )

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

2022-03-02 Thread Caolán McNamara (via logerrit)
 offapi/com/sun/star/media/XPlayerListener.idl |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 615f72e74c9ac2202bce4dd95d98b6558b178f19
Author: Caolán McNamara 
AuthorDate: Tue Mar 1 20:28:05 2022 +
Commit: Caolán McNamara 
CommitDate: Wed Mar 2 11:00:37 2022 +0100

it's not for listening to a File Picker

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

diff --git a/offapi/com/sun/star/media/XPlayerListener.idl 
b/offapi/com/sun/star/media/XPlayerListener.idl
index 62e6a9633278..b0ee614055fd 100644
--- a/offapi/com/sun/star/media/XPlayerListener.idl
+++ b/offapi/com/sun/star/media/XPlayerListener.idl
@@ -14,11 +14,11 @@
 
 module com { module sun { module star { module media {
 
-/** Interface to be implemented by a FilePicker listener.
+/** Interface to be implemented by a Player listener.
 
  The XPlayerListener interface must be implemented by
-the clients of the FilePicker service which need to be informed about
-events while the FilePicker service is displayed.
+the clients of the Player service which need to be informed about
+events while the Player service is displayed.
 
 @since LibreOffice 7.4
 */


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

2022-03-01 Thread Caolán McNamara (via logerrit)
 offapi/UnoApi_offapi.mk   |2 +
 offapi/com/sun/star/media/XPlayerListener.idl |   38 +
 offapi/com/sun/star/media/XPlayerNotifier.idl |   46 ++
 3 files changed, 86 insertions(+)

New commits:
commit ae071f7d680545e284e5947d26cbea30e59bdfb5
Author: Caolán McNamara 
AuthorDate: Mon Feb 21 15:05:14 2022 +
Commit: Caolán McNamara 
CommitDate: Tue Mar 1 18:37:58 2022 +0100

add a way to get informed when the XPlayer can return useful information

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

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 28b3a41f280b..cdf62376c30f 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -2913,6 +2913,8 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/media,\
XFrameGrabber \
XManager \
XPlayer \
+   XPlayerListener \
+   XPlayerNotifier \
XPlayerWindow \
ZoomLevel \
 ))
diff --git a/offapi/com/sun/star/media/XPlayerListener.idl 
b/offapi/com/sun/star/media/XPlayerListener.idl
new file mode 100644
index ..62e6a9633278
--- /dev/null
+++ b/offapi/com/sun/star/media/XPlayerListener.idl
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __com_sun_star_ui_dialogs_XPlayerListener_idl__
+#define __com_sun_star_ui_dialogs_XPlayerListener_idl__
+
+#include 
+
+module com { module sun { module star { module media {
+
+/** Interface to be implemented by a FilePicker listener.
+
+ The XPlayerListener interface must be implemented by
+the clients of the FilePicker service which need to be informed about
+events while the FilePicker service is displayed.
+
+@since LibreOffice 7.4
+*/
+
+interface XPlayerListener : com::sun::star::lang::XEventListener
+{
+/** A client receives this event when the preferred player size of an 
XPlayer
+is available to be queried.
+*/
+void preferredPlayerWindowSizeAvailable([in] 
com::sun::star::lang::EventObject e);
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/offapi/com/sun/star/media/XPlayerNotifier.idl 
b/offapi/com/sun/star/media/XPlayerNotifier.idl
new file mode 100644
index ..b34f64f64823
--- /dev/null
+++ b/offapi/com/sun/star/media/XPlayerNotifier.idl
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __com_sun_star_ui_dialogs_XPlayerNotifier_idl__
+#define __com_sun_star_ui_dialogs_XPlayerNotifier_idl__
+
+#include 
+#include 
+
+module com {  module sun {  module star {  module media {
+
+/** Interface to be implemented in order to support listener management.
+@since LibreOffice 7.4
+*/
+interface XPlayerNotifier : com::sun::star::uno::XInterface
+{
+/** Interface for clients to register as XPlayerListener
+
+@param xListener
+The XPlayerListener interface of the listener that
+wants to receive events.
+Invalid interfaces or NULL values will be ignored.
+*/
+void addPlayerListener( [in] XPlayerListener xListener );
+
+/** Interface for clients to unregister as XPlayerListener.
+
+@param xListener
+The XPlayerListener interface of the listener that
+wants to receive events.
+Invalid interfaces or NULL values will be ignored.
+*/
+void removePlayerListener( [in] XPlayerListener xListener );
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */


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

2022-02-19 Thread Andrea Gelmini (via logerrit)
 0 files changed

New commits:
commit 8a34ce5c3a1c4feffefa8a6c9315aed61cede2e6
Author: Andrea Gelmini 
AuthorDate: Sat Feb 19 10:24:05 2022 +0100
Commit: Julien Nabet 
CommitDate: Sat Feb 19 11:52:48 2022 +0100

Removed executable bits on idl file

Change-Id: I1579cf509d3c3d50de2ebb1a03e6ca01fe27820a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130187
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/offapi/com/sun/star/drawing/EnhancedCustomShapeMetalType.idl 
b/offapi/com/sun/star/drawing/EnhancedCustomShapeMetalType.idl
old mode 100755
new mode 100644


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

2022-02-06 Thread Julien Nabet (via logerrit)
 offapi/com/sun/star/embed/EmbedVerbs.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 91bbb6522de9925c74ea99272e5153b882266bde
Author: Julien Nabet 
AuthorDate: Sun Feb 6 11:31:48 2022 +0100
Commit: Julien Nabet 
CommitDate: Sun Feb 6 12:33:01 2022 +0100

Typo in a comment of EmbedVerbs.idl

Just wonder if shouldn't copy-paste description from:

https://docs.microsoft.com/en-us/dotnet/api/microsoft.office.interop.word.wdoleverb?view=word-pia

Wonder too why we use "MS_OLEVERB_IPACTIVATE" instead of 
"MS_OLEVERB_INPLACEACTIVATE"
but now it's too late to change this since it's a public API

Change-Id: Ie782da22f4ea3d1af31026644d09a6e566b388fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129569
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/offapi/com/sun/star/embed/EmbedVerbs.idl 
b/offapi/com/sun/star/embed/EmbedVerbs.idl
index e7038305d382..a94239f7d525 100644
--- a/offapi/com/sun/star/embed/EmbedVerbs.idl
+++ b/offapi/com/sun/star/embed/EmbedVerbs.idl
@@ -33,7 +33,7 @@ published constants EmbedVerbs
  */
 const long MS_OLEVERB_PRIMARY = 0;
 
-/** lets the object open itself for editing of viewing.
+/** lets the object open itself for editing or viewing.
  */
 const long MS_OLEVERB_SHOW = -1;
 


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

2021-12-22 Thread Thorsten Behrens (via logerrit)
 offapi/com/sun/star/document/XOOXMLDocumentPropertiesImporter.idl |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 5df35405494b2726f214c852e78ad8852d7c4829
Author: Thorsten Behrens 
AuthorDate: Tue Dec 21 23:34:15 2021 +0100
Commit: Xisco Fauli 
CommitDate: Wed Dec 22 15:43:21 2021 +0100

Recent XOOXMLDocumentPropertiesImporter changes went into 7.3

Adjust @since statement to new realities

Change-Id: I8a65b4bdd2ef2ffab95f8a934ff5e5e8ffb90f03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127282
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/offapi/com/sun/star/document/XOOXMLDocumentPropertiesImporter.idl 
b/offapi/com/sun/star/document/XOOXMLDocumentPropertiesImporter.idl
index 0a2548db4dc0..840081663edb 100644
--- a/offapi/com/sun/star/document/XOOXMLDocumentPropertiesImporter.idl
+++ b/offapi/com/sun/star/document/XOOXMLDocumentPropertiesImporter.idl
@@ -75,7 +75,7 @@ interface XOOXMLDocumentPropertiesImporter: 
com::sun::star::uno::XInterface
 /** find and get core properties stream
 
 (usually it is docProps\core.xml)
-@since LibreOffice 7.4
+@since LibreOffice 7.3
  */
 
 com::sun::star::io::XInputStream getCorePropertiesStream([in] 
com::sun::star::embed::XStorage xSource);
@@ -83,7 +83,7 @@ interface XOOXMLDocumentPropertiesImporter: 
com::sun::star::uno::XInterface
 /** find and get extended properties stream
 
 (usually it is docProps/app.xml)
-@since LibreOffice 7.4
+@since LibreOffice 7.3
  */
 
 com::sun::star::io::XInputStream getExtendedPropertiesStream([in] 
com::sun::star::embed::XStorage xSource);
@@ -91,7 +91,7 @@ interface XOOXMLDocumentPropertiesImporter: 
com::sun::star::uno::XInterface
 /** find and get custom properties streams
 
 (usually it is customXml\*.xml)
-@since LibreOffice 7.4
+@since LibreOffice 7.3
  */
 
 sequence< com::sun::star::io::XInputStream > 
getCustomPropertiesStreams([in] com::sun::star::embed::XStorage xSource);


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

2021-11-17 Thread László Németh (via logerrit)
 offapi/com/sun/star/text/XRedline.idl |1 +
 sw/inc/redline.hxx|6 +-
 sw/qa/extras/layout/data/tdf104797.docx   |binary
 sw/qa/extras/layout/layout2.cxx   |   20 
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx|   20 +++-
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx|   20 
 sw/qa/extras/uiwriter/uiwriter2.cxx   |7 +++
 sw/source/core/doc/DocumentRedlineManager.cxx |7 ++-
 sw/source/core/doc/docredln.cxx   |   20 +---
 sw/source/core/text/redlnitr.cxx  |2 +-
 sw/source/core/text/txtfld.cxx|2 +-
 sw/source/core/unocore/unocrsrhelper.cxx  |6 ++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |9 -
 13 files changed, 103 insertions(+), 17 deletions(-)

New commits:
commit f51fa7534421a195a58b4a737a2e836d8c25ba81
Author: László Németh 
AuthorDate: Tue Nov 16 16:08:57 2021 +0100
Commit: László Németh 
CommitDate: Wed Nov 17 20:05:46 2021 +0100

tdf#145718 sw, DOCX import: complete tracked text moving

Add IsMoved bit to SwRangeRedline, and keep it in both
parts of a split Delete/Insert redline. Set this bit
during DOCX import, fixing incomplete import of
moveFrom/moveTo elements.

Details:

- Search text moving only at redline Insert() and AppendRedline()
  instead in the layout code (which was much slower, because
  triggered by also mouse hovering):

- detect text moving in Hide Changes mode, too;

- Insertion inside or directly after tracked text moving keeps
  "moved text" layout of the original moved text parts (before
  and after the insertion).

- at detection of text moving, invalidate (update) layout of the
  redline pair, too.

- fix DOCX import: extend makeRedline() with property RedlineMoved
  to keep all moveFrom/moveTo stored in DOCX instead of
  losing them (joining them with normal redlines) in the case
  of missing Delete/Insert pair (see unit test document);

Follow-up to commit ec577f566fa3e6d2666069180f8ec8474054aea9
"tdf#145233 sw track changes: show moved text in green color",
commit bcdebc832b272662d28035007a4796e42d1305ae
"tdf#104797 DOCX change tracking: handle moveFrom and moveTo"
and commit d32d9a2b3c5e3963f4a18f6c7bbf50fab2e9b2be
"tdf#123460 DOCX track changes: moveFrom completely".

Change-Id: Iaca80e5e326a172bc7ba5fec64b63668b9378e2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125317
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/offapi/com/sun/star/text/XRedline.idl 
b/offapi/com/sun/star/text/XRedline.idl
index 9b259e8b9e58..a07c92ddfc62 100644
--- a/offapi/com/sun/star/text/XRedline.idl
+++ b/offapi/com/sun/star/text/XRedline.idl
@@ -46,6 +46,7 @@ published interface XRedline
 [readonly, property] string RedlineAuthor;
 [readonly, property] com::sun::star::util::DateTime 
RedlineDateTime;
 [readonly, property] string RedlineComment;
+[readonly, optional, property] boolean RedlineMoved;
 */
 void makeRedline( [in]string RedlineType, [in] 
com::sun::star::beans::PropertyValues  RedlineProperties)
 raises( com::sun::star::lang::IllegalArgumentException 
);
diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx
index 0c5b8408d54c..8d17948205fa 100644
--- a/sw/inc/redline.hxx
+++ b/sw/inc/redline.hxx
@@ -155,6 +155,7 @@ class SW_DLLPUBLIC SwRangeRedline final : public SwPaM
 SwNodeIndex* m_pContentSect;
 bool m_bDelLastPara : 1;
 bool m_bIsVisible : 1;
+bool m_bIsMoved : 1;
 sal_uInt32 m_nId;
 
 std::optional m_oLOKLastNodeTop;
@@ -174,7 +175,7 @@ public:
 SwRangeRedline(SwRedlineData* pData, const SwPosition& rPos,
bool bDelLP) :
 SwPaM( rPos ), m_pRedlineData( pData ), m_pContentSect( nullptr ),
-m_bDelLastPara( bDelLP ), m_bIsVisible( true ), m_nId( s_nLastId++ )
+m_bDelLastPara( bDelLP ), m_bIsVisible( true ), m_bIsMoved( false ), 
m_nId( s_nLastId++ )
 {}
 SwRangeRedline( const SwRangeRedline& );
 virtual ~SwRangeRedline() override;
@@ -261,6 +262,9 @@ public:
 void dumpAsXml(xmlTextWriterPtr pWriter) const;
 
 void MaybeNotifyRedlinePositionModification(tools::Long nTop);
+
+void SetMoved() { m_bIsMoved = true; }
+bool IsMoved() const { return m_bIsMoved; }
 };
 
 void MaybeNotifyRedlineModification(SwRangeRedline& rRedline, SwDoc& rDoc);
diff --git a/sw/qa/extras/layout/data/tdf104797.docx 
b/sw/qa/extras/layout/data/tdf104797.docx
new file mode 100644
index ..6e52190ce671
Binary files /dev/null and b/sw/qa/extras/layout/data/tdf104797.docx differ
diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras

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

2021-10-28 Thread Michael Weghorn (via logerrit)
 offapi/com/sun/star/accessibility/XAccessibleSelection.idl |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit d13307b93bfc21c7e5996c43e359906c255b0830
Author: Michael Weghorn 
AuthorDate: Thu Oct 28 14:01:04 2021 +0200
Commit: Michael Weghorn 
CommitDate: Thu Oct 28 20:36:30 2021 +0200

XAccessibleSelection: Don't reference non-existing methods in doc

There are no 'XAccessibleSelection::deselectSelectedChild'
and 'XAccessibleSelection::getSelectedChild' methods, so don't
mention them in the documentation for
'getSelectedAccessibleChildCount'.

First, there's 'XAccessibleSelection::getSelectedAccessibleChild',
but not 'XAccessibleSelection::getSelectedChild', so update that
accordingly.

Second, there's no 'XAccessibleSelection::deselectSelectedChild',
and 'XAccessibleSelection::deselectAccessibleChild' doesn't take an
index into the selection, but a child index, s. its documentation
and the commit message of pending Gerrit change
Change-Id: I3c63c647e61baaa6288ffd545d8d89d8b94231de
("gtk3 a11y: Use correct index when deselecting child")
on how the semantics of AT-SPI functions with corresponding
names differ.

(The comment was added in

commit daacf7ed0bc8a1a2447c4b1cb340c97f82918af8
Date:   Thu Apr 24 16:35:46 2003 +

INTEGRATION: CWS uaa02 (1.1.2); FILE ADDED
2003/04/02 10:06:50 obr 1.1.2.3: #108113# Renamed 
deselectSelectedAccessibleChild to deselectAccessibleChild
2003/03/14 10:40:52 af 1.1.2.2: #108113# Removed references to the 
drafts directory.
2003/03/11 15:00:39 af 1.1.2.1: #108113# Moved from 
drafts/com/sun/star/accessibility.

and

> 2003/04/02 10:06:50 obr 1.1.2.3: #108113# Renamed 
deselectSelectedAccessibleChild to deselectAccessibleChild

sounds like there might temporarily have existed a draft implementation
that actually took an index into the selection rather than
a child index.)

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

diff --git a/offapi/com/sun/star/accessibility/XAccessibleSelection.idl 
b/offapi/com/sun/star/accessibility/XAccessibleSelection.idl
index cc10cca44177..0d9d18820d02 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleSelection.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleSelection.idl
@@ -97,9 +97,8 @@ interface XAccessibleSelection : 
::com::sun::star::uno::XInterface
 selected.
 
 This number specifies the valid interval of indices that can be
-used as arguments for the methods
-XAccessibleSelection::getSelectedChild() and
-XAccessibleSelection::deselectSelectedChild().
+used as arguments for the method
+XAccessibleSelection::getSelectedAccessibleChild().
 
 @return
 Returns the number of selected children of this object or 0 if


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

2021-10-19 Thread Olivier Hallot (via logerrit)
 offapi/com/sun/star/frame/XInfobarProvider.idl |   35 -
 1 file changed, 34 insertions(+), 1 deletion(-)

New commits:
commit 5c16ac64ef02481ccf19b65f5702caf4b67b888d
Author: Olivier Hallot 
AuthorDate: Tue Oct 19 20:45:41 2021 -0300
Commit: Ilmari Lauhakangas 
CommitDate: Wed Oct 20 08:21:54 2021 +0200

tdf#129209 Doc't XInfobarProvider.idl

Add examples in .idl file

Change-Id: Iea12d3088ec0006731b16e9009008fbe5793f33d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123868
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas 

diff --git a/offapi/com/sun/star/frame/XInfobarProvider.idl 
b/offapi/com/sun/star/frame/XInfobarProvider.idl
index 889be2aa4bcd..b04f50b9e70b 100644
--- a/offapi/com/sun/star/frame/XInfobarProvider.idl
+++ b/offapi/com/sun/star/frame/XInfobarProvider.idl
@@ -58,6 +58,18 @@ interface XInfobarProvider: uno::XInterface
 
 @throws com::sun::star::lang::IllegalArgumentException
 If an Infobar with the same ID already exists, or infobarType 
contains an invalid value.
+
+ The example below adds a new infobar named MyInfoBar with type 
INFO and close (x) button.
+@code{.bas}
+Sub AddInfobar
+Dim buttons(1) as new com.sun.star.beans.StringPair
+buttons(0).first = "Close doc"
+buttons(0).second = ".uno:CloseDoc"
+buttons(1).first = "Paste into doc"
+buttons(1).second = ".uno:Paste"
+ThisComponent.getCurrentController().appendInfobar("MyInfoBar", 
"Hello world", "Things happened. What now?", 
com.sun.star.frame.InfobarType.INFO, buttons, true)
+End Sub
+@endcode
  */
 void appendInfobar(
 [in] string id,
@@ -77,6 +89,13 @@ interface XInfobarProvider: uno::XInterface
 If no such Infobar exists (it might have been closed by the user 
already)
 @throws com::sun::star::lang::IllegalArgumentException
 If infobarType contains an invalid value.
+
+Update the infobar and change the type to WARNING
+@code{.bas}
+Sub UpdateInfobar
+ThisComponent.getCurrentController().updateInfobar("MyInfoBar", 
"WARNING","Do not read this message.", com.sun.star.frame.InfobarType.WARNING)
+End Sub
+@endcode
  */
 void updateInfobar(
 [in] string id,
@@ -92,7 +111,15 @@ interface XInfobarProvider: uno::XInterface
 
 @throws com::sun::star::container::NoSuchElementException
 If no such Infobar exists (it might have been closed by the user 
already)
+
+Remove MyInfoBar infobar
+@code{.bas}
+Sub RemoveInfobar
+ThisComponent.getCurrentController().removeInfobar("MyInfoBar")
+End Sub
+@endcode
  */
+
 void removeInfobar([in] string id) 
raises(com::sun::star::container::NoSuchElementException);
 
 /** Check if Infobar exists.
@@ -101,6 +128,12 @@ interface XInfobarProvider: uno::XInterface
 The ID which was used when creating this Infobar.
 
 @since LibreOffice 7.0
+
+@code{.bas}
+Function  HasMyInfobar as boolean
+hasMyInfoBar = 
ThisComponent.getCurrentController().hasInfobar("MyInfoBar")
+End Function
+@endcode
  */
 boolean hasInfobar([in] string id);
 };
@@ -110,4 +143,4 @@ interface XInfobarProvider: uno::XInterface
 
 #endif
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */


[Libreoffice-commits] core.git: offapi/com offapi/type_reference offapi/UnoApi_offapi.mk udkapi/com

2021-10-14 Thread Stephan Bergmann (via logerrit)
 offapi/UnoApi_offapi.mk  |1 
 offapi/com/sun/star/resource/XLocale.idl |  208 ---
 offapi/type_reference/offapi.idl |   21 ---
 udkapi/com/sun/star/lang/Locale.idl  |   10 -
 4 files changed, 240 deletions(-)

New commits:
commit a74d15adced66dfcd63fbec0ce23bb4f7089824b
Author: Stephan Bergmann 
AuthorDate: Wed Oct 13 09:08:25 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Oct 14 16:27:32 2021 +0200

[API CHANGE] Remove unused css.resource.XLocale

It had been present ever since at least 
88c437c597b604524d50f450506285a594bd03a5
"moved from api" from 2000, but was apparently never implemented nor used at
least in OOo/LO itself.  It is problematic as it uses reserved identifiers
("getDisplayLanguage_Default" etc.) that contain underscores and start with 
a
lowercase letter, and a planned change to unoidl-write will no longer 
tolerate
usage of such reserved identifiers (see the TODO in
unoidl/source/sourceprovider-scanner.l).

Change-Id: I76a3a3da7b7c1f4c109ca7a12c9f07857ca1be1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123544
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 46718a5c2fa2..7509d0ff5163 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -3119,7 +3119,6 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/report/meta,\
 ))
 $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/resource,\
MissingResourceException \
-   XLocale \
XStringResourceManager \
XStringResourcePersistence \
XStringResourceResolver \
diff --git a/offapi/com/sun/star/resource/XLocale.idl 
b/offapi/com/sun/star/resource/XLocale.idl
deleted file mode 100644
index 562307d82def..
--- a/offapi/com/sun/star/resource/XLocale.idl
+++ /dev/null
@@ -1,208 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef __com_sun_star_resource_XLocale_idl__
-#define __com_sun_star_resource_XLocale_idl__
-
-#include 
-
-#include 
-
-#include 
-
-
-
- module com {  module sun {  module star {  module resource {
-
-/** offers some operations on com::sun::star::lang::Locale
-structures.
-@see Locale
- */
-published interface XLocale: com::sun::star::uno::XInterface
-{
-/** creates a locale from language, country, and variant.
-
-NOTE: ISO 639 is not a stable standard; some of the
-language codes it defines (specifically iw, ji, and in) have
-changed.  This constructor accepts both the old codes (iw, ji,
-and in) and the new codes (he, yi, and id), but all other API
-on XLocale will return only the NEW codes.
-
-Note: The Java class Locale returns the 
old codes.
-
-
- */
-com::sun::star::lang::Locale create( [in] string aLanguage,
- [in] string aCountry,
- [in] string aVariant );
-
-/** the common method of getting the current default locale.
-
-It is used for the presentation (for menus, dialogs, etc.).
-It is, generally, set once when your applet or application is
-initialized, then never reset. (If you do reset the default
-locale, you probably want to reload your GUI, so that the
-change is reflected in your interface.)
-
-More advanced programs allow users to use different locales
-for different fields, for example, in a spreadsheet.
-
-Note that the initial setting will match the host system.
- */
-com::sun::star::lang::Locale getDefault();
-
-/** sets the default locale for the whole environment.
-
-It is normally set once at the beginning of an application,
-then never reset. setDefault does not reset the host
-locale.
-
-
- */
-void setDefault( [in] com::sun::star::lang::Locale newLocale );
-
-/** @returns
-a sequence of all locales which are available in the 
system.
- */
-sequence getAvailableLocales();
-
-/** @

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

2021-08-25 Thread Andrea Gelmini (via logerrit)
 offapi/com/sun/star/awt/XDialog.idl |2 +-
 sw/qa/extras/uiwriter/uiwriter2.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 7a8b697aed6eddf1dec4d3c3610359259d4468f4
Author: Andrea Gelmini 
AuthorDate: Wed Aug 25 13:22:43 2021 +0200
Commit: Julien Nabet 
CommitDate: Wed Aug 25 17:13:38 2021 +0200

Fix typos

Change-Id: I13c41a077cd54102010c8253dee2455f235087c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121033
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/offapi/com/sun/star/awt/XDialog.idl 
b/offapi/com/sun/star/awt/XDialog.idl
index 7d6ac3c71fc9..5a94924720ba 100644
--- a/offapi/com/sun/star/awt/XDialog.idl
+++ b/offapi/com/sun/star/awt/XDialog.idl
@@ -43,7 +43,7 @@ published interface XDialog: com::sun::star::uno::XInterface
 
 
 /** runs the dialog modally: shows it, and waits for the execution to end.
-Returns an exit code (e.g., indicatting the button that was used to 
end the execution).
+Returns an exit code (e.g., indicating the button that was used to end 
the execution).
  */
 short execute();
 
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 4b717b47c27e..c3ad147713bf 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -4006,7 +4006,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, 
testTdf137737_FindReplace)
 {
 createSwDoc(DATA_DIRECTORY, "tdf137737_FindReplace.docx");
 
-// Replace staight quotes with something (opening quotes in real life, but 
X is adequate here)
+// Replace straight quotes with something (opening quotes in real life, 
but X is adequate here)
 uno::Sequence 
aArgs(comphelper::InitPropertySequence({
 { "SearchItem.SearchString", uno::makeAny(OUString("^\"")) },
 { "SearchItem.ReplaceString", uno::makeAny(OUString("X")) },
@@ -4019,7 +4019,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, 
testTdf137737_FindReplace)
 // Replace the first match.
 dispatchCommand(mxComponent, ".uno:ExecuteSearch", aArgs);
 
-// Replace staight quotes with something (closing quotes in real life)
+// Replace straight quotes with something (closing quotes in real life)
 aArgs[0].Value <<= OUString("\"$");
 dispatchCommand(mxComponent, ".uno:ExecuteSearch", aArgs);
 dispatchCommand(mxComponent, ".uno:ExecuteSearch", aArgs);


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

2021-08-24 Thread Mike Kaganski (via logerrit)
 offapi/com/sun/star/awt/XDialog.idl |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c3cd4863d4c693a92f0340264b893310851445f0
Author: Mike Kaganski 
AuthorDate: Tue Aug 24 10:06:32 2021 +0200
Commit: Mike Kaganski 
CommitDate: Tue Aug 24 16:03:36 2021 +0200

Clarify that css::awt::XDialog::execute is modal.

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

diff --git a/offapi/com/sun/star/awt/XDialog.idl 
b/offapi/com/sun/star/awt/XDialog.idl
index a20fdc053fde..7d6ac3c71fc9 100644
--- a/offapi/com/sun/star/awt/XDialog.idl
+++ b/offapi/com/sun/star/awt/XDialog.idl
@@ -42,7 +42,8 @@ published interface XDialog: com::sun::star::uno::XInterface
 string getTitle();
 
 
-/** shows the dialog.
+/** runs the dialog modally: shows it, and waits for the execution to end.
+Returns an exit code (e.g., indicatting the button that was used to 
end the execution).
  */
 short execute();
 


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

2021-07-28 Thread Michael Weghorn (via logerrit)
 offapi/com/sun/star/accessibility/XAccessibleValue.idl |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 968e758f163ef5a6c8c46e3427fccae32958b6db
Author: Michael Weghorn 
AuthorDate: Wed Jul 28 16:20:57 2021 +0200
Commit: Michael Weghorn 
CommitDate: Wed Jul 28 19:14:45 2021 +0200

XAccessibleValue::getMinimumIncrement: Add "@since" annotation

Add "@since LibreOffice 7.3" annotation for the method added in

commit b5ada12ffd0b6b8677430fce117c4c1e38cc9159
Author: Michael Weghorn 
Date:   Wed Jul 28 11:26:16 2021 +0200

a11y: Add XAccessibleValue::getMinimumIncrement method

Thanks to Stephan for pointing it out in above commit's Gerrit
change. [1]

[1] https://gerrit.libreoffice.org/c/core/+/119596

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

diff --git a/offapi/com/sun/star/accessibility/XAccessibleValue.idl 
b/offapi/com/sun/star/accessibility/XAccessibleValue.idl
index a1f7879dcd07..45001976fd0d 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleValue.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleValue.idl
@@ -101,6 +101,8 @@ interface XAccessibleValue : 
::com::sun::star::uno::XInterface
 Returns the minimal increment value in an implementation dependent 
type.
 If this object has no minimum increment value, then an empty 
object is
 returned.
+
+@since LibreOffice 7.3
 */
 any getMinimumIncrement ();
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-28 Thread Mike Kaganski (via logerrit)
 offapi/com/sun/star/script/provider/XScript.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 67faef71f937a14799fd551a2751c3b61dd7a94f
Author: Mike Kaganski 
AuthorDate: Wed Jul 28 16:00:03 2021 +0200
Commit: Mike Kaganski 
CommitDate: Wed Jul 28 18:13:14 2021 +0200

A typo

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

diff --git a/offapi/com/sun/star/script/provider/XScript.idl 
b/offapi/com/sun/star/script/provider/XScript.idl
index 41c934ab32d3..d7538bc4395a 100644
--- a/offapi/com/sun/star/script/provider/XScript.idl
+++ b/offapi/com/sun/star/script/provider/XScript.idl
@@ -60,7 +60,7 @@ interface XScript : ::com::sun::star::uno::XInterface {
 the value returned from the function being invoked
 
 @throws ::com::sun::star::reflection::InvocationTargetException
-if and error occurs while attempting to invoke a script the 
information is captured. If the error or exception is generated by the script 
itself it is wrapped as either ScriptErrorRaisedException or 
ScriptExceptionRaisedException or ScriptFrameworkErrorException are wrapped as 
ScriptFrameworkErrorExceptions.
+if an error occurs while attempting to invoke a script the 
information is captured. If the error or exception is generated by the script 
itself it is wrapped as either ScriptErrorRaisedException or 
ScriptExceptionRaisedException or ScriptFrameworkErrorException are wrapped as 
ScriptFrameworkErrorExceptions.
 */
 any invoke(
 [in] sequence aParams,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-28 Thread Michael Weghorn (via logerrit)
 offapi/com/sun/star/accessibility/XAccessibleValue.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit be3764070655afb438ac4d09a73175ebcbc8fea2
Author: Michael Weghorn 
AuthorDate: Wed Jul 28 12:13:50 2021 +0200
Commit: Michael Weghorn 
CommitDate: Wed Jul 28 16:18:29 2021 +0200

Minor fix in comment for XAccessibleValue::getMinimumValue

This looks like a copy-paste error.
The *upper* bound is relevant for 'getMaximumValue', the *lower*
bound for 'getMinimumValue'.

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

diff --git a/offapi/com/sun/star/accessibility/XAccessibleValue.idl 
b/offapi/com/sun/star/accessibility/XAccessibleValue.idl
index db66c039b68a..a1f7879dcd07 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleValue.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleValue.idl
@@ -85,7 +85,7 @@ interface XAccessibleValue : ::com::sun::star::uno::XInterface
 
 @return
 Returns the minimal value in an implementation dependent type.
-If this object has no upper bound then an empty object is
+If this object has no lower bound then an empty object is
 returned.
 */
 any getMinimumValue ();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-21 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/BibliographyDataField.idl |5 ++
 sw/inc/helpids.h   |1 
 sw/inc/strings.hrc |1 
 sw/inc/toxe.hxx|1 
 sw/qa/core/unocore/unocore.cxx |   38 +
 sw/source/core/fields/authfld.cxx  |5 +-
 sw/source/core/unocore/unoidx.cxx  |2 -
 sw/source/ui/index/cnttab.cxx  |3 +
 sw/source/ui/index/swuiidxmrk.cxx  |4 +-
 sw/source/uibase/utlui/initui.cxx  |3 +
 10 files changed, 57 insertions(+), 6 deletions(-)

New commits:
commit 3b2b2eae863d1082a36c02851190e0846f90cdd1
Author: Miklos Vajna 
AuthorDate: Wed Jul 21 14:52:05 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jul 21 16:42:48 2021 +0200

sw bibliography, local copy: add document model & UNO API

The idea is that a bibliography entry (field) can have not only an URL
(which might be unavailable due to lack of network connectivity,
paywall, etc) but also a local copy, which is also a URL.

The local copy doesn't replace the original URL. The local copy is
stored part of the document, since it may be a relative URL, e.g. ODT +
several PDFs copied around in the same directory.

This commit just starts this feature, up to the extent that read and
write of the new property works.

Change-Id: I3c4df2be3a1f3b02a87c097f8a0630951def09d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119322
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/text/BibliographyDataField.idl 
b/offapi/com/sun/star/text/BibliographyDataField.idl
index 6934bf8872e7..8923224247fc 100644
--- a/offapi/com/sun/star/text/BibliographyDataField.idl
+++ b/offapi/com/sun/star/text/BibliographyDataField.idl
@@ -123,6 +123,11 @@ published constants BibliographyDataField
 /** This field contains the ISBN data of the publishing.
  */
 const short ISBN= 30;
+/** This field contains a local copy of the publishing.
+
+@since LibreOffice 7.3
+ */
+const short LOCAL_URL   = 31;
 };
 
 }; }; }; };
diff --git a/sw/inc/helpids.h b/sw/inc/helpids.h
index ad9c82557dcb..8995d9f11d3d 100644
--- a/sw/inc/helpids.h
+++ b/sw/inc/helpids.h
@@ -97,6 +97,7 @@
 #define HID_AUTH_FIELD_CUSTOM4  
"SW_HID_AUTH_FIELD_CUSTOM4"
 #define HID_AUTH_FIELD_CUSTOM5  
"SW_HID_AUTH_FIELD_CUSTOM5"
 #define HID_AUTH_FIELD_ISBN 
"SW_HID_AUTH_FIELD_ISBN"
+#define HID_AUTH_FIELD_LOCAL_URL
"SW_HID_AUTH_FIELD_LOCAL_URL"
 
 #define HID_BUSINESS_FMT_PAGE   
"SW_HID_BUSINESS_FMT_PAGE"
 #define HID_BUSINESS_FMT_PAGE_CONT  
"SW_HID_BUSINESS_FMT_PAGE_CONT"
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index de5d3da88668..a7981f2c9929 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -797,6 +797,7 @@
 #define STR_AUTH_FIELD_CUSTOM4  NC_("STR_AUTH_FIELD_CUSTOM4", 
"User-defined4")
 #define STR_AUTH_FIELD_CUSTOM5  NC_("STR_AUTH_FIELD_CUSTOM5", 
"User-defined5")
 #define STR_AUTH_FIELD_ISBN NC_("STR_AUTH_FIELD_ISBN", 
"ISBN")
+#define STR_AUTH_FIELD_LOCAL_URL
NC_("STR_AUTH_FIELD_LOCAL_URL", "Local copy")
 
 #define STR_IDXMRK_EDIT NC_("STR_IDXMRK_EDIT", "Edit 
Index Entry")
 #define STR_IDXMRK_INSERT   NC_("STR_IDXMRK_INSERT", 
"Insert Index Entry")
diff --git a/sw/inc/toxe.hxx b/sw/inc/toxe.hxx
index 7582970c1fac..b2f08e66c320 100644
--- a/sw/inc/toxe.hxx
+++ b/sw/inc/toxe.hxx
@@ -114,6 +114,7 @@ enum ToxAuthorityField
 AUTH_FIELD_CUSTOM4,
 AUTH_FIELD_CUSTOM5,
 AUTH_FIELD_ISBN,
+AUTH_FIELD_LOCAL_URL,
 AUTH_FIELD_END
 };
 
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index cf701a25d423..a1f74d46f5a6 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -9,9 +9,13 @@
 
 #include 
 
+#include 
 #include 
 #include 
 
+#include 
+#include 
+
 #include 
 #include 
 #include 
@@ -96,6 +100,40 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testRtlGutter)
 CPPUNIT_ASSERT(bRtlGutter);
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testBiblioLocalCopy)
+{
+// Given an empty document:
+createSwDoc();
+
+// When setting the LocalURL of a biblio field:
+uno::Reference xFactory(mxComponent, 
uno::UNO_QUERY);
+uno::Reference xField(
+xFactory->createInstance("com.sun.star.text.TextField.Bibliography"), 
uno::UNO_QUERY);
+uno::Sequence aFields = {
+comphelper::makePropertyValue("BibiliographicType", 
text::BibliographyDataType::WWW),
+comphelper::makePropertyValue("Identifier", OUString("ARJ00"))

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

2021-06-08 Thread Mike Kaganski (via logerrit)
 offapi/com/sun/star/drawing/TextProperties.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 25bd0c7ddf0b45c8628f0c7b1b57d3eb428bf1e5
Author: Mike Kaganski 
AuthorDate: Tue Jun 8 16:57:41 2021 +0300
Commit: Mike Kaganski 
CommitDate: Tue Jun 8 18:07:34 2021 +0200

This API change is since 7-2.

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

diff --git a/offapi/com/sun/star/drawing/TextProperties.idl 
b/offapi/com/sun/star/drawing/TextProperties.idl
index 40f8f89acd0a..eb045624aba0 100644
--- a/offapi/com/sun/star/drawing/TextProperties.idl
+++ b/offapi/com/sun/star/drawing/TextProperties.idl
@@ -254,7 +254,7 @@ published service TextProperties
 
 /** Column layout properties for the text.
 
-@since LibreOffice 7.3
+@since LibreOffice 7.2
  */
 [optional, property] ::com::sun::star::text::XTextColumns TextColumns;
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-26 Thread Stephan Bergmann (via logerrit)
 offapi/com/sun/star/rdf/URIs.idl |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 9ac3b599e65669380ab346cb2bb135a6edc3273a
Author: Stephan Bergmann 
AuthorDate: Wed May 26 10:11:52 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed May 26 13:20:41 2021 +0200

Fix documentation comment

Change-Id: If62135c82d8ab8faba0681302accf8f328e2eb3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116148
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/offapi/com/sun/star/rdf/URIs.idl b/offapi/com/sun/star/rdf/URIs.idl
index ecb74f667ae8..bfc8672d4050 100644
--- a/offapi/com/sun/star/rdf/URIs.idl
+++ b/offapi/com/sun/star/rdf/URIs.idl
@@ -312,15 +312,16 @@ constants URIs
 const short ODF_METADATAFILE= 2105;
 */
 
-/// urn:oasis:names:tc:opendocument:xmlns:text:1.0meta-field
+// urn:oasis:names:tc:opendocument:xmlns:text:1.0meta-field
 //const short TEXT_META_FIELD = 3000;
 
 /** custom shading color of an annotated text range or metadata field
 (replacement of the default field shading color)
 
+
urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0odf#shading
+
 @since LibreOffice 7.2
  */
-/// 
urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0odf#shading
 const short LO_EXT_SHADING  = 2106;
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: offapi/com schema/libreoffice sw/inc sw/qa sw/source unoxml/source

2021-05-23 Thread László Németh (via logerrit)
 offapi/com/sun/star/rdf/URIs.idl  |8 
 schema/libreoffice/OpenDocument-v1.3+libreoffice-metadata.owl |   23 ++
 sw/inc/fmtmeta.hxx|2 
 sw/qa/uitest/data/metacolor.odt   |binary
 sw/qa/uitest/styleInspector/styleInspector.py |  107 ++
 sw/source/core/inc/unometa.hxx|2 
 sw/source/core/text/inftxt.cxx|   12 -
 sw/source/core/text/inftxt.hxx|4 
 sw/source/core/text/itrform2.cxx  |   65 +-
 sw/source/core/text/txtfld.cxx|3 
 sw/source/core/txtnode/fmtatr2.cxx|4 
 sw/source/core/unocore/unorefmk.cxx   |   27 +-
 unoxml/source/rdf/CURI.cxx|7 
 13 files changed, 243 insertions(+), 21 deletions(-)

New commits:
commit a8a9b4f4635bff3f1b7ec63b62f661bc15196cd6
Author: László Németh 
AuthorDate: Sun May 23 12:46:09 2021 +0200
Commit: László Németh 
CommitDate: Sun May 23 18:51:58 2021 +0200

tdf#142448 sw offapi: add custom color metadata field shading

using the new com::sun::star::rdf::URIs::LO_EXT_SHADING
URI (modelled after odf:prefix and odf:suffix).
Custom color field shading of text:meta annotated text
ranges and text:meta-field metadata fields allows
quick visual check of metadata categories.

For example, RDF triple

content.xml#id1753384014 
urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0odf#shading 
FF

sets red (FF) shading color for the text span
with xml:id="id1753384014".

Pressing Ctrl-F8 or View->Field Shadings can disable
custom color metadata field shading on the UI.

Note: neither LO_EXT_SHADING, nor odf:prefix and
odf:suffix changes invalidate the View (MetaPortion),
but run-time update of shading color can be triggered
without save and reload of the document e.g. by using
(temporary) bookmarks on the annotated text spans.

To run unit test with enabled visibility, use

(cd sw && make UITest_sw_styleInspector 
UITEST_TEST_NAME="styleInspector.styleNavigator.test_metadata_shading_color" 
SAL_USE_VCLPLUGIN=gen)

in Linux command line.

Change-Id: I5de93cfa32ac6793d7dbdc7b64e6f4beacb2e8d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116015
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/offapi/com/sun/star/rdf/URIs.idl b/offapi/com/sun/star/rdf/URIs.idl
index 6172fa87717a..ecb74f667ae8 100644
--- a/offapi/com/sun/star/rdf/URIs.idl
+++ b/offapi/com/sun/star/rdf/URIs.idl
@@ -314,6 +314,14 @@ constants URIs
 
 /// urn:oasis:names:tc:opendocument:xmlns:text:1.0meta-field
 //const short TEXT_META_FIELD = 3000;
+
+/** custom shading color of an annotated text range or metadata field
+(replacement of the default field shading color)
+
+@since LibreOffice 7.2
+ */
+/// 
urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0odf#shading
+const short LO_EXT_SHADING  = 2106;
 };
 
 
diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-metadata.owl 
b/schema/libreoffice/OpenDocument-v1.3+libreoffice-metadata.owl
index 7fe1d94939b8..2c648cf6ce30 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-metadata.owl
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-metadata.owl
@@ -75,4 +75,27 @@
http://www.w3.org/2001/XMLSchema-datatypes#string"/>
has suffix
 
+
+
+   OpenDocument Annotated text range Element
+   http://docs.oasis-open.org/ns/office/1.2/meta/odf#Element"/>
+
+
+
+  
+
+  
+
+
+  
+
+  
+
+
+
+   http://www.w3.org/2002/07/owl#FunctionalProperty"/>
+   
+   http://www.w3.org/2001/XMLSchema-datatypes#string"/>
+   has shading color
+
 
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index 17a160bc53e6..441a7d5e6e68 100644
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -189,7 +189,7 @@ private:
 public:
 /// get prefix/suffix from the RDF repository. @throws RuntimeException
 void GetPrefixAndSuffix(
-OUString *const o_pPrefix, OUString *const o_pSuffix);
+OUString *const o_pPrefix, OUString *const o_pSuffix, OUString *const 
o_pShadingColor);
 };
 
 /// knows all meta-fields in the document.
diff --git a/sw/qa/uitest/data/metacolor.odt b/sw/qa/uitest/data/metacolor.odt
new file mode 100644
index ..88cfb7212def
Binary files /dev/null and b/sw/qa/uitest/data/metacolor.odt differ
diff --git a/sw/qa/uitest/styleInspector/styleInspector.py 
b/sw/qa/uitest/styleInspector/styleInspector.py
index 6afc4483e911..9c4abaf7191f 100644
--- a/sw/qa/uitest/styleInspector/styleInspector.py
+++ b/sw/qa/uitest/styleInspector/styleIn

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

2021-05-22 Thread László Németh (via logerrit)
 offapi/com/sun/star/text/TextTableRow.idl |2 -
 sw/qa/extras/uiwriter/uiwriter2.cxx   |   41 +-
 2 files changed, 41 insertions(+), 2 deletions(-)

New commits:
commit c1bf2a3751b6a602f2571f8642b36504b04ca3fd
Author: László Németh 
AuthorDate: Sat May 22 13:36:26 2021 +0200
Commit: László Németh 
CommitDate: Sat May 22 17:40:07 2021 +0200

tdf#60382 sw track changes: add test for Undo of IsNotTracked

TextTableRow property. Remove also maybevoid from
com::sun::star::text::TextTableRow::IsNotTracked.
(It's possible to add it later, if needed.)

Follow-up to commit 05366b8e6683363688de8708a3d88cf144c7a2bf
"itdf#60382 sw offapi: add change tracking of table/row deletion".

Change-Id: I4854dcda827cc8d5b1d0ec8bba381458b3ab17b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115988
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/offapi/com/sun/star/text/TextTableRow.idl 
b/offapi/com/sun/star/text/TextTableRow.idl
index 77191c9f57d1..e418fbbf9366 100644
--- a/offapi/com/sun/star/text/TextTableRow.idl
+++ b/offapi/com/sun/star/text/TextTableRow.idl
@@ -111,7 +111,7 @@ published service TextTableRow
 @since LibreOffice 7.2
  */
 
-[optional, property, maybevoid] boolean IsNotTracked;
+[optional, property] boolean IsNotTracked;
 
 };
 
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx 
b/sw/qa/extras/uiwriter/uiwriter2.cxx
index d1323c8104d5..3da57c948a43 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -3690,6 +3690,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, 
testRedlineTableRowDeletion)
 assertXPath(pXmlDoc, "//page[1]//body/tab");
 
 // delete table row with enabled change tracking
+// (IsNotTracked property of the row will be false)
 dispatchCommand(mxComponent, ".uno:DeleteRows", {});
 
 // This was deleted without change tracking
@@ -3698,7 +3699,6 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, 
testRedlineTableRowDeletion)
 assertXPath(pXmlDoc, "//page[1]//body/tab");
 
 // accept the deletion of the content of the first cell
-
 SwEditShell* const pEditShell(pDoc->GetEditShell());
 CPPUNIT_ASSERT_EQUAL(static_cast(2), 
pEditShell->GetRedlineCount());
 pEditShell->AcceptRedline(0);
@@ -3716,6 +3716,45 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, 
testRedlineTableRowDeletion)
 pXmlDoc = parseLayoutDump();
 assertXPath(pXmlDoc, "//page[1]//body/tab", 0);
 
+// Undo, and repeat the previous test, but only with deletion of the text 
content of the cells
+// (IsNotTracked property will be removed by Undo)
+
+dispatchCommand(mxComponent, ".uno:Undo", {});
+dispatchCommand(mxComponent, ".uno:Undo", {});
+dispatchCommand(mxComponent, ".uno:Undo", {});
+
+// table exists again
+discardDumpedLayout();
+pXmlDoc = parseLayoutDump();
+assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+// delete table row with enabled change tracking
+dispatchCommand(mxComponent, ".uno:SelectRow", {});
+dispatchCommand(mxComponent, ".uno:Delete", {});
+
+// Table row still exists
+discardDumpedLayout();
+pXmlDoc = parseLayoutDump();
+assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+// accept the deletion of the content of the first cell
+CPPUNIT_ASSERT_EQUAL(static_cast(2), 
pEditShell->GetRedlineCount());
+pEditShell->AcceptRedline(0);
+
+// table row was still not deleted
+discardDumpedLayout();
+pXmlDoc = parseLayoutDump();
+assertXPath(pXmlDoc, "//page[1]//body/tab");
+
+// accept last redline
+pEditShell->AcceptRedline(0);
+
+// table row (and the 1-row table) still exists
+// (IsNotTracked property wasn't set for table row deletion)
+discardDumpedLayout();
+pXmlDoc = parseLayoutDump();
+assertXPath(pXmlDoc, "//page[1]//body/tab");
+
 // Undo, and delete the row without change tracking
 
 dispatchCommand(mxComponent, ".uno:Undo", {});
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-05-19 Thread László Németh (via logerrit)
 offapi/com/sun/star/text/TextTableRow.idl |8 ++
 sw/inc/doc.hxx|2 
 sw/inc/swtable.hxx|2 
 sw/inc/unoprnms.hxx   |1 
 sw/qa/extras/uiwriter/uiwriter2.cxx   |   77 ++
 sw/source/core/bastyp/init.cxx|2 
 sw/source/core/doc/DocumentRedlineManager.cxx |   34 +++
 sw/source/core/docnode/ndtbl1.cxx |   26 
 sw/source/core/frmedt/fetab.cxx   |   30 ++
 sw/source/core/table/swtable.cxx  |   15 +
 sw/source/core/unocore/unomap.cxx |1 
 sw/source/filter/html/htmltab.cxx |   17 -
 12 files changed, 199 insertions(+), 16 deletions(-)

New commits:
commit 05366b8e6683363688de8708a3d88cf144c7a2bf
Author: László Németh 
AuthorDate: Wed May 19 12:22:24 2021 +0200
Commit: László Németh 
CommitDate: Thu May 20 00:01:37 2021 +0200

tdf#60382 sw offapi: add change tracking of table/row deletion

This is a minimal extension of the text range based change
tracking to record and apply table row and table deletions
with full Undo/Redo support.

Add property IsNotTracked to com::sun::star::text::TextTableRow.

During recording of track changes, deletion of table rows wasn't
recorded: the rows removed completely with their text content.
Now the deletion deletes the cell content with change tracking,
setting also IsNotTracked property of table rows to FALSE. If
all tracked deletions were accepted in a row, and the result is
an empty row, the row will be removed, if its IsNotTracked
property is FALSE.

Note: Deletion of empty lines isn't recorded (they are simply
deleted). Hiding deleted rows hasn't been supported yet in
the Hide Changes mode.

OpenDocument supports only track changes of text ranges, but
not changes of the table structure, e.g. deletion of table
rows. For the native export it needs to extend ODF, and
depending on this future extension, can be based also on
SwExtraRedlineTable (which lacks of recording and Undo/Redo,
but supports OOXML round-trip of tracked table changes).
See also commit d688069023959ab97d14eb1dbfd5bf6ad3c1b160
"Add support for 'Table Row Redlines' in SW core" and its
follow-up commits.

Change-Id: I2e3807cf8ae8212bd51c210ef1c20c85878d0da8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115804
Tested-by: László Németh 
Reviewed-by: László Németh 

diff --git a/offapi/com/sun/star/text/TextTableRow.idl 
b/offapi/com/sun/star/text/TextTableRow.idl
index d640d1c06cce..77191c9f57d1 100644
--- a/offapi/com/sun/star/text/TextTableRow.idl
+++ b/offapi/com/sun/star/text/TextTableRow.idl
@@ -105,6 +105,14 @@ published service TextTableRow
 @since LibreOffice 6.1
  */
 [optional, property] com::sun::star::graphic::XGraphic BackGraphic;
+
+/** If TRUE, the table row wasn't deleted or inserted with its tracked 
cell content
+
+@since LibreOffice 7.2
+ */
+
+[optional, property, maybevoid] boolean IsNotTracked;
+
 };
 
 
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 08510f634569..19a2b6af64b1 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1489,6 +1489,8 @@ public:
 bool BalanceRowHeight( const SwCursor& rCursor, bool bTstOnly, const bool 
bOptimize );
 void SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew );
 static bool GetRowBackground( const SwCursor& rCursor, 
std::unique_ptr& rToFill );
+/// rNotTracked = false means that the row was deleted or inserted with 
its tracked cell content
+void SetRowNotTracked( const SwCursor& rCursor, const SvxPrintItem 
&rNotTracked );
 void SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet );
 void SetTabLineStyle( const SwCursor& rCursor,
   const Color* pColor, bool bSetLine,
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 5432a24d60e4..6696c94d6cfc 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -444,6 +444,8 @@ public:
 void RemoveFromTable();
 const SwStartNode *GetSttNd() const { return m_pStartNode; }
 sal_uLong GetSttIdx() const;
+// it doesn't contain box content
+bool IsEmpty() const;
 
 // Search next/previous box with content.
 SwTableBox* FindNextBox( const SwTable&, const SwTableBox*,
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 9cceac0f8d0f..317ad79fa8ed 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -736,6 +736,7 @@
 #define UNO_NAME_ITEMS "Items"
 #define UNO_NAME_SELITEM "SelectedItem"
 #define UNO_NAME_IS_SPLIT_ALLOWED "IsSplitAllowed"
+#define UNO_NAME_IS_NOT_TRACKED "IsNotTracked"
 #define UNO_NAME_CHAR_HIDDEN "CharHidden"
 #define UNO_NAME_IS_FOLLOWING_TEXT_FLOW "IsFollowingTextFlow"
 #define UNO_NAME_WIDTH_TYPE "WidthType"
diff --git a/sw/qa/extr

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

2021-05-17 Thread Samuel Mehrbrodt (via logerrit)
 offapi/UnoApi_offapi.mk|2 +-
 offapi/com/sun/star/sheet/FilterFieldType.idl  |   10 +-
 offapi/com/sun/star/sheet/FilterFieldValue.idl |2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 5c682a5e24337ac022fb3eba585583b16718d246
Author: Samuel Mehrbrodt 
AuthorDate: Mon May 17 13:19:59 2021 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Mon May 17 16:24:46 2021 +0200

Fix types and order

Change-Id: Icd98c02a3bdc361423f668173bf6feb5f5b11e4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115703
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 3abfc388ba95..4180c1194eff 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -3421,8 +3421,8 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/sheet,\
FillDirection \
FillMode \
FilterConnection \
-   FilterFieldValue \
FilterFieldType \
+   FilterFieldValue \
FilterOperator \
FilterOperator2 \
FormulaLanguage \
diff --git a/offapi/com/sun/star/sheet/FilterFieldType.idl 
b/offapi/com/sun/star/sheet/FilterFieldType.idl
index 0a5113c7a075..59a9807379e6 100644
--- a/offapi/com/sun/star/sheet/FilterFieldType.idl
+++ b/offapi/com/sun/star/sheet/FilterFieldType.idl
@@ -18,19 +18,19 @@ module com {  module sun {  module star {  module sheet {
 constants FilterFieldType
 {
/** Filter by numeric value */
-   const short NUMERIC = 0;
+   const long NUMERIC = 0;
 
/** Filter by string value */
-   const short STRING = 1;
+   const long STRING = 1;
 
/** Filter by date */
-   const short DATE = 2;
+   const long DATE = 2;
 
/** Filter by text color */
-   const short TEXT_COLOR = 3;
+   const long TEXT_COLOR = 3;
 
/** Filter by background color */
-   const short BACKGROUND_COLOR = 4;
+   const long BACKGROUND_COLOR = 4;
 };
 
 }; }; }; };
diff --git a/offapi/com/sun/star/sheet/FilterFieldValue.idl 
b/offapi/com/sun/star/sheet/FilterFieldValue.idl
index 12e9b8ba62e8..a8930ee0f6ac 100644
--- a/offapi/com/sun/star/sheet/FilterFieldValue.idl
+++ b/offapi/com/sun/star/sheet/FilterFieldValue.idl
@@ -45,7 +45,7 @@ struct FilterFieldValue
 @see com::sun::star::sheet::FilterFieldType
 @since LibreOffice 7.2
  */
-short FilterType;
+long FilterType;
 
 /** The color which is used for filtering
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: offapi/com offapi/UnoApi_offapi.mk sc/source

2021-05-11 Thread Samuel Mehrbrodt (via logerrit)
 offapi/UnoApi_offapi.mk|1 
 offapi/com/sun/star/sheet/FilterFieldType.idl  |   40 +
 offapi/com/sun/star/sheet/FilterFieldValue.idl |   23 ++-
 sc/source/filter/inc/autofilterbuffer.hxx  |   23 +++
 sc/source/filter/oox/autofilterbuffer.cxx  |   76 +++--
 sc/source/filter/oox/autofiltercontext.cxx |5 +
 sc/source/ui/unoobj/datauno.cxx|   26 
 7 files changed, 186 insertions(+), 8 deletions(-)

New commits:
commit 3c8b248b5a7395b174fc265e3237bd79aeb2455f
Author: Samuel Mehrbrodt 
AuthorDate: Thu May 6 09:12:05 2021 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue May 11 09:17:13 2021 +0200

tdf#76258 Add OOXML import for color filter

Change-Id: I74cf4f56e0adf1cb8af8e6e932c14b30cce67c71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115168
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index c958419b7aa3..3abfc388ba95 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -3422,6 +3422,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/sheet,\
FillMode \
FilterConnection \
FilterFieldValue \
+   FilterFieldType \
FilterOperator \
FilterOperator2 \
FormulaLanguage \
diff --git a/offapi/com/sun/star/sheet/FilterFieldType.idl 
b/offapi/com/sun/star/sheet/FilterFieldType.idl
new file mode 100644
index ..0a5113c7a075
--- /dev/null
+++ b/offapi/com/sun/star/sheet/FilterFieldType.idl
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __com_sun_star_sheet_FilterFieldType_idl__
+#define __com_sun_star_sheet_FilterFieldType_idl__
+
+module com {  module sun {  module star {  module sheet {
+
+/**
+ * @since LibreOffice 7.2
+ */
+constants FilterFieldType
+{
+   /** Filter by numeric value */
+   const short NUMERIC = 0;
+
+   /** Filter by string value */
+   const short STRING = 1;
+
+   /** Filter by date */
+   const short DATE = 2;
+
+   /** Filter by text color */
+   const short TEXT_COLOR = 3;
+
+   /** Filter by background color */
+   const short BACKGROUND_COLOR = 4;
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sheet/FilterFieldValue.idl 
b/offapi/com/sun/star/sheet/FilterFieldValue.idl
index 2e3ba927dc97..12e9b8ba62e8 100644
--- a/offapi/com/sun/star/sheet/FilterFieldValue.idl
+++ b/offapi/com/sun/star/sheet/FilterFieldValue.idl
@@ -19,6 +19,8 @@ struct FilterFieldValue
 {
 /** selects whether the TableFilterFieldValue::NumericValue
 or the TableFilterFieldValue::StringValue is used.
+
+@deprecated - Use FilterType instead.
  */
 boolean IsNumeric;
 
@@ -30,12 +32,27 @@ struct FilterFieldValue
  */
 string StringValue;
 
-/** specifies whether the TableFilterFieldValue::StringValue
-is a string value or a date value.
+/** Which field should be used for filtering:
+
+
+com::sun::star::sheet::FilterFieldType::NUMERIC -> 
NumericValue
+com::sun::star::sheet::FilterFieldType::STRING -> 
StringValue
+com::sun::star::sheet::FilterFieldType::DATE -> 
StringValue
+com::sun::star::sheet::FilterFieldType::TEXT_COLOR -> 
ColorValue
+com::sun::star::sheet::FilterFieldType::BACKGROUND_COLOR -> 
ColorValue
+
 
+@see com::sun::star::sheet::FilterFieldType
 @since LibreOffice 7.2
  */
-boolean IsDateValue;
+short FilterType;
+
+/** The color which is used for filtering
+
+@since LibreOffice 7.2
+ */
+com::sun::star::util::Color ColorValue;
+
 };
 
 }; }; }; };
diff --git a/sc/source/filter/inc/autofilterbuffer.hxx 
b/sc/source/filter/inc/autofilterbuffer.hxx
index 8af001d24db4..0f9135be7123 100644
--- a/sc/source/filter/inc/autofilterbuffer.hxx
+++ b/sc/source/filter/inc/autofilterbuffer.hxx
@@ -23,6 +23,7 @@
 #include 
 #include "workbookhelper.hxx"
 #include 
+#include 
 
 namespace com::sun::star {
 namespace sheet { class XDatabaseRange; }
@@ -47,6 +48,7 @@ struct ApiFilterSettings
 
 void appendField( bool bAnd, sal_Int32 nOperator, double fValue );
 void appendField( bool bAnd, sal_Int32 nOperator, const OUString& rValue );
+void appendField( bool bAnd, css::util::Color aColor, bool 
bIsBackgroundColor );
 void appendField( bool bAnd, const std::vector>& 
rValues );
 };
 
@@ -110,6 +112,27 @@ private:
 boolmbPercent;  /// True = percentage, false = number 
of items.
 };
 
+/** Settings for a color filter. */
+cl

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

2021-05-04 Thread Caolán McNamara (via logerrit)
 offapi/com/sun/star/awt/XDockableWindow.idl |4 
 toolkit/source/awt/vclxwindow.cxx   |4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit d78f9b5cca2415c0d3bc4d081dec19a0ce976cb7
Author: Caolán McNamara 
AuthorDate: Sun May 2 20:17:34 2021 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 4 09:45:57 2021 +0200

final 'next incompatible build' TODO

from

commit 22ff1aff328874d0d42875552f9a3d2db37b83fb
Date:   Thu Sep 9 14:12:47 2004 +

INTEGRATION: CWS toolbars2 (1.47.22); FILE MERGED
2004/08/24 13:53:25 ssa 1.47.22.2: #i32185# prepare removal of useless 
interface

just mark as deprecated in the .idl and leave the stubs alone

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

diff --git a/offapi/com/sun/star/awt/XDockableWindow.idl 
b/offapi/com/sun/star/awt/XDockableWindow.idl
index 400283827bae..d34289a5bdb8 100644
--- a/offapi/com/sun/star/awt/XDockableWindow.idl
+++ b/offapi/com/sun/star/awt/XDockableWindow.idl
@@ -100,6 +100,8 @@ interface XDockableWindow : com::sun::star::uno::XInterface
 the corresponding events
 @param WindowRect
 specifies the position and size of the pop-up window in frame 
coordinates
+
+@deprecated - doesn't do anything
  */
 void startPopupMode( [in] com::sun::star::awt::Rectangle WindowRect );
 
@@ -108,6 +110,8 @@ interface XDockableWindow : com::sun::star::uno::XInterface
 @returns
 `TRUE` if the window is in pop-up mode
 `FALSE` if the window is not in pop-up mode
+
+@deprecated - always returns `FALSE`
  */
 boolean isInPopupMode();
 };
diff --git a/toolkit/source/awt/vclxwindow.cxx 
b/toolkit/source/awt/vclxwindow.cxx
index b178fc57cd58..4649a146d6e7 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -2409,12 +2409,12 @@ void SAL_CALL VCLXWindow::unlock(  )
 
 void SAL_CALL VCLXWindow::startPopupMode( const css::awt::Rectangle& )
 {
-// TODO: remove interface in the next incompatible build
+// deprecated
 }
 
 sal_Bool SAL_CALL VCLXWindow::isInPopupMode(  )
 {
-// TODO: remove interface in the next incompatible build
+// deprecated
 return false;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-04-26 Thread Julien Nabet (via logerrit)
 offapi/com/sun/star/sdb/ErrorCondition.idl |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4d60fd1d480521df43120618736465628b540070
Author: Julien Nabet 
AuthorDate: Mon Apr 26 14:53:44 2021 +0200
Commit: Julien Nabet 
CommitDate: Tue Apr 27 08:43:24 2021 +0200

"with fail with..." => "will fail with..."

Change-Id: I184224e91b204f0819c9a2d53fcd0f88d9248158
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114663
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/sdb/ErrorCondition.idl 
b/offapi/com/sun/star/sdb/ErrorCondition.idl
index 4618c7475d77..d70aed3877f8 100644
--- a/offapi/com/sun/star/sdb/ErrorCondition.idl
+++ b/offapi/com/sun/star/sdb/ErrorCondition.idl
@@ -143,7 +143,7 @@ constants ErrorCondition
 
 Some database drivers are not able to SELECT from a 
table if the
 statement does not contain a WHERE clause. In this case, 
a statement
-like SELECT * FROM "table" with fail with the error code
+like SELECT * FROM "table" will fail with the error code
 DATA_CANNOT_SELECT_UNFILTERED.
 
 It is also legitimate for the driver to report this error condition 
as warning, and provide
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-30 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/style/PageProperties.idl |6 ++
 sw/qa/core/unocore/unocore.cxx   |   14 ++
 sw/source/core/unocore/unomap1.cxx   |1 +
 3 files changed, 21 insertions(+)

New commits:
commit bcbf1c245fa13cfbae2059a996006179c7f4b747
Author: Miklos Vajna 
AuthorDate: Tue Mar 30 14:09:06 2021 +0200
Commit: Miklos Vajna 
CommitDate: Tue Mar 30 20:03:57 2021 +0200

tdf#140343 sw page rtl gutter margin: add UNO API

When true, the gutter position may be right and top, not left and top.

Change-Id: I5e3e4b4d9cb217b81b2712cb208ca5725d46ae28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113349
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/com/sun/star/style/PageProperties.idl 
b/offapi/com/sun/star/style/PageProperties.idl
index 29b561e34538..3189f569d4df 100644
--- a/offapi/com/sun/star/style/PageProperties.idl
+++ b/offapi/com/sun/star/style/PageProperties.idl
@@ -501,6 +501,12 @@ published service PageProperties
  */
 [optional, property] boolean BackgroundFullSize;
 
+/** specifies that the page gutter shall be placed on the right side of 
the page.
+
+@since LibreOffice 7.2
+ */
+[optional, property] boolean RtlGutter;
+
 };
 
 }; }; }; };
diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx
index 62c3f439c4e5..cf701a25d423 100644
--- a/sw/qa/core/unocore/unocore.cxx
+++ b/sw/qa/core/unocore/unocore.cxx
@@ -82,6 +82,20 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, flyAtParaAnchor)
 xText->insertTextContent(xAnchor, xFieldmark, false);
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testRtlGutter)
+{
+mxComponent = loadFromDesktop("private:factory/swriter", 
"com.sun.star.text.TextDocument");
+uno::Reference 
xPageStyle(getStyles("PageStyles")->getByName("Standard"),
+   uno::UNO_QUERY);
+// Without the accompanying fix in place, this test would have failed with:
+// - Unknown property: RtlGutter
+auto bRtlGutter = getProperty(xPageStyle, "RtlGutter");
+CPPUNIT_ASSERT(!bRtlGutter);
+xPageStyle->setPropertyValue("RtlGutter", uno::makeAny(true));
+bRtlGutter = getProperty(xPageStyle, "RtlGutter");
+CPPUNIT_ASSERT(bRtlGutter);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/unocore/unomap1.cxx 
b/sw/source/core/unocore/unomap1.cxx
index 572f1f752c61..803c93f94b1b 100644
--- a/sw/source/core/unocore/unomap1.cxx
+++ b/sw/source/core/unocore/unomap1.cxx
@@ -570,6 +570,7 @@ const SfxItemPropertyMapEntry*  
SwUnoPropertyMapProvider::GetPageStylePropertyMa
 // This entry is for adding that properties to style import/export
 FILL_PROPERTIES_SW
 { u"BackgroundFullSize", RES_BACKGROUND_FULL_SIZE, 
cppu::UnoType::get(), PROPERTY_NONE, 0 },
+{ u"RtlGutter", RES_RTL_GUTTER, cppu::UnoType::get(), 
PROPERTY_NONE, 0 },
 
 // Added DrawingLayer FillStyle Properties for Header. These need an 
own unique name,
 // but reuse the same WhichIDs as the regular fill. The implementation 
will decide to which
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: offapi/com offapi/UnoApi_offapi.mk sw/qa sw/source

2021-03-09 Thread Miklos Vajna (via logerrit)
 offapi/UnoApi_offapi.mk |1 
 offapi/com/sun/star/text/XTextViewTextRangeSupplier.idl |   46 
 sw/qa/uibase/uno/uno.cxx|   43 ++
 sw/source/uibase/inc/unotxvw.hxx|6 ++
 sw/source/uibase/uno/unotxvw.cxx|   27 +
 5 files changed, 123 insertions(+)

New commits:
commit 8e7dc248f2787df0e658c4ece33220944fca7f16
Author: Miklos Vajna 
AuthorDate: Tue Mar 9 11:49:06 2021 +0100
Commit: Miklos Vajna 
CommitDate: Tue Mar 9 20:12:24 2021 +0100

sw: add UNO API to find the closest doc model position based on pixel 
position

The use-case is drag&drop: if an UNO API client registers its drag&drop
listener, then it gets a DropTargetDropEvent and has to decide if it
wants to handle that event or allow Writer to handle it. In case it
decides to handle the event, it would be good to able to e.g. insert a
string at the point where the Writer UI indicates it to the user. But
DropTargetDropEvent only exposes a pixel position and Writer requires
you to have an XTextRange when inserting content.

Fix the problem by introducing a new createTextRangeByPixelPosition()
which first does a pixel -> logic coordinate conversion (this is
window-specific, in case you have multiple windows), then picks the doc
model position which is the closest to a logic coordinate.

Change-Id: I6a8e69e3c39b9d99209342469653c0e0bd99bf53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112201
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 020149df1311..21adff7c48f1 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -3841,6 +3841,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/text,\
XTextViewCursor \
XTextViewCursorSupplier \
XWordCursor \
+   XTextViewTextRangeSupplier \
 ))
 $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/ucb,\
AlreadyInitializedException \
diff --git a/offapi/com/sun/star/text/XTextViewTextRangeSupplier.idl 
b/offapi/com/sun/star/text/XTextViewTextRangeSupplier.idl
new file mode 100644
index ..57adf359f756
--- /dev/null
+++ b/offapi/com/sun/star/text/XTextViewTextRangeSupplier.idl
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_text_XTextViewTextRangeSupplier_idl__
+#define __com_sun_star_text_XTextViewTextRangeSupplier_idl__
+
+#include 
+
+#include 
+#include 
+
+module com {  module sun {  module star {  module text {
+
+/** supplies access to a document model position at a view-dependent pixel 
position.
+
+@since LibreOffice 7.2
+ */
+interface XTextViewTextRangeSupplier: com::sun::star::uno::XInterface
+{
+/** @returns
+the text range of the document position.
+ */
+com::sun::star::text::XTextRange createTextRangeByPixelPosition([in] 
com::sun::star::awt::Point PixelPosition);
+
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/uibase/uno/uno.cxx b/sw/qa/uibase/uno/uno.cxx
index 01dadbc80fee..f4b337d8f9d2 100644
--- a/sw/qa/uibase/uno/uno.cxx
+++ b/sw/qa/uibase/uno/uno.cxx
@@ -9,10 +9,18 @@
 
 #include 
 
+#include 
+#include 
 #include 
 
 #include 
 
+#include 
+#include 
+#include 
+#include 
+#include 
+
 constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/uibase/uno/data/";
 
 /// Covers sw/source/uibase/uno/ fixes.
@@ -47,6 +55,41 @@ CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, 
testCondFieldCachedValue)
 getParagraph(2, "1");
 }
 
+CPPUNIT_TEST_FIXTURE(SwUibaseUnoTest, testCreateTextRangeByPixelPosition)
+{
+// Given a document with 2 characters, and the pixel position of the point 
between them:
+SwDoc* pDoc = createSwDoc();
+SwDocShell* pDocShell = pDoc->GetDocShell();
+SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+pWrtShell->Insert2("AZ");
+pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, 
/*bBasicCall=*/false);
+Po

  1   2   3   4   5   >