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

2021-08-15 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/sidebar/PageStylesPanel.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 420fa261a1bb5db9c6367cd4bbf9984c79b296cc
Author: Caolán McNamara 
AuthorDate: Fri Aug 13 09:44:09 2021 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Aug 16 08:37:58 2021 +0200

tdf#139811 trigger layout when content changes

in writer styles panel of page deck which is similar to the draw case
of tdf#143795. Doing this always in PanelLayout::queue_resize might
make the most sense rather than these manual triggers, but do it this
way initially for a safe backport.

Change-Id: I4bd2e9cb9d52b66a73cd0615406052e19e6e8b51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120369
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sw/source/uibase/sidebar/PageStylesPanel.cxx 
b/sw/source/uibase/sidebar/PageStylesPanel.cxx
index 1815466c1df9..64260077a54c 100644
--- a/sw/source/uibase/sidebar/PageStylesPanel.cxx
+++ b/sw/source/uibase/sidebar/PageStylesPanel.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include "PageStylesPanel.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -249,6 +250,11 @@ void PageStylesPanel::Update()
 default:
 break;
 }
+
+// Need to do a relayouting, otherwise the panel size is not updated after 
show / hide controls
+sfx2::sidebar::Panel* pPanel = 
dynamic_cast(GetParent());
+if (pPanel)
+pPanel->TriggerDeckLayouting();
 }
 
 Color const & PageStylesPanel::GetColorSetOrDefault()


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

2021-08-15 Thread Hossein (via logerrit)
 desktop/source/lib/init.cxx |   15 ---
 1 file changed, 4 insertions(+), 11 deletions(-)

New commits:
commit f34146b7d5d0bb66c805504a691cb70d5b3da6b2
Author: Hossein 
AuthorDate: Mon Aug 16 00:53:12 2021 +0200
Commit: Mike Kaganski 
CommitDate: Mon Aug 16 08:24:57 2021 +0200

Cleaning up decleration and initialization of unique_ptr variables

Cleaning up decleration and initialization of unique_ptr variables
pPageSizeItem, pPageLRMarginItem, and pPageULMarginItem according to
the request:
https://gerrit.libreoffice.org/c/core/+/120456

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 9ca61d6c0a4d..be1682047ab9 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -805,9 +805,7 @@ void ExecuteMarginULChange(
 void ExecuteOrientationChange()
 {
 std::unique_ptr pPageItem(new SvxPageItem(SID_ATTR_PAGE));
-std::unique_ptr pPageSizeItem(new 
SvxSizeItem(SID_ATTR_PAGE_SIZE));
-std::unique_ptr pPageLRMarginItem(new 
SvxLongLRSpaceItem( 0, 0, SID_ATTR_PAGE_LRSPACE ));
-std::unique_ptr pPageULMarginItem(new 
SvxLongULSpaceItem( 0, 0, SID_ATTR_PAGE_ULSPACE ));
+
 // 1mm in twips rounded
 // This should be in sync with MINBODY in 
sw/source/uibase/sidebar/PageMarginControl.hxx
 constexpr tools::Long MINBODY = 56;
@@ -823,18 +821,13 @@ void ExecuteOrientationChange()
 
 
 
SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_SIZE,
 pItem);
-pPageSizeItem.reset(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_SIZE));
-
-
+std::unique_ptr 
pPageSizeItem(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_SIZE));
 
 
SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_LRSPACE,
 pItem);
-
pPageLRMarginItem.reset(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_LRSPACE));
-
-
+std::unique_ptr 
pPageLRMarginItem(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_LRSPACE));
 
 
SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_ULSPACE,
 pItem);
-
pPageULMarginItem.reset(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_ULSPACE));
-
+std::unique_ptr 
pPageULMarginItem(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_ULSPACE));
 
 {
 bool bIsLandscape = false;


Week #10 Report - GSoC - 100 Paper Cuts

2021-08-15 Thread Bayram Çiçek

Hi all,

GSoC progress for week #10.

> Blog post for week #10: 
https://bayramcicek.com.tr/libreoffice-dev/2021/08/16/week-10-gsoc.html 



> Calc: Border preview doesn’t show the diagonal borders in /Cell 
Appearance/ section


    - Bug: tdf#143890 
 - Border 
preview doesn’t show the diagonal borders
    - Commit: https://gerrit.libreoffice.org/c/core/+/120519 



In (Sidebar Tab) /Properties > Cell Appearance/, Calc always shows 
preview of the selected cell borders. For example; if LEFT border set in 
a cell, the preview shows LEFT border (as expected). But this feature 
doesn’t show the preview of diagonal borders. When we set (e.g.)diagonal 
RIGHT border in a cell, the preview doesn’t update itself to show 
diagonal RIGHT border. With the commit, everything works as expected.


> Created a new commit for tdf#51665: (WIP) Support diagonal borders in 
Writer-Tables


    - Bug: tdf#51665 
 - Support 
diagonal borders in TABLEs
    - Commit: https://gerrit.libreoffice.org/c/core/+/120262 



patchset1:
- implement RES_BOX_TLBR attribute
- add SID_ATTR_BORDER_DIAG_TLBR

patchset2:
- improve case SID_ATTR_BORDER_DIAG_TLBR (tabsh.cxx)
- add diagonal left condition in ndtbl1.cxx
- try to draw diagonal left border:
        - drawing in a cell seems complicated.
        - currently it draw TLBR line on the document layout, not in 
current cell.

        - we have to draw TLBR line in current cell. (needs improvement)


> Summary of week #10
   - Fixed: tdf#143890 
- Border 
preview doesn’t show the diagonal borders
    - Worked on diagonal borders in Writer-Tables, and published 2 new 
patchsets


    Commits:

    - https://gerrit.libreoffice.org/c/core/+/120519 

    - https://gerrit.libreoffice.org/c/core/+/120262 



> Next week TO-DO:

    - Write “Final Report” blog post
    - Make last changes on patches that on gerrit
    - try to draw diagonal borders for Writer-Tables.

Thank you all.

--

Regards, Bayram Çiçek



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

2021-08-15 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/htmlexport/data/tdf132739.odt |binary
 sw/qa/extras/htmlexport/htmlexport.cxx |   12 
 2 files changed, 12 insertions(+)

New commits:
commit 5aac78e5fb241050a86714687e9ff8804588ae3c
Author: Xisco Fauli 
AuthorDate: Sun Aug 15 19:09:59 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Aug 16 01:42:23 2021 +0200

tdf#132739: sw_htmlexport: Add unittest

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

diff --git a/sw/qa/extras/htmlexport/data/tdf132739.odt 
b/sw/qa/extras/htmlexport/data/tdf132739.odt
new file mode 100644
index ..6156aca93bd0
Binary files /dev/null and b/sw/qa/extras/htmlexport/data/tdf132739.odt differ
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx 
b/sw/qa/extras/htmlexport/htmlexport.cxx
index e58641ac6f8a..cd680b1ad12b 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -1021,6 +1021,18 @@ DECLARE_HTMLEXPORT_TEST(testFieldShade, 
"field-shade.odt")
 assertXPath(pDoc, "/html/body/p[2]/span/span", 0);
 }
 
+DECLARE_HTMLEXPORT_TEST(testTdf132739, "tdf132739.odt")
+{
+htmlDocUniquePtr pDoc = parseHtml(maTempFile);
+CPPUNIT_ASSERT(pDoc);
+
+// Without the fix in place, this test would have failed with
+// - Expected: background: #5983b0; border: 1px solid #33; padding: 
0.04in
+// - Actual  : background: #5983b0
+assertXPath(pDoc, "/html/body/table/tr[1]/td", "style",
+"background: #5983b0; border: 1px solid #33; padding: 
0.04in");
+}
+
 DECLARE_HTMLEXPORT_TEST(testFieldShadeReqIf, "field-shade-reqif.odt")
 {
 htmlDocUniquePtr pDoc = parseHtml(maTempFile);


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

2021-08-15 Thread Caolán McNamara (via logerrit)
 sw/source/filter/ww8/docxsdrexport.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 9f84cd2766e66bf3bd7878e50a6732f8fca63ed7
Author: Caolán McNamara 
AuthorDate: Sun Aug 15 19:44:18 2021 +0100
Commit: Caolán McNamara 
CommitDate: Sun Aug 15 22:35:24 2021 +0200

crashtesting: failure on export tdf87915-2.odt to docx

in this example ConvertToPolyObj returned a SdrObjGroup* so cast to
SdrPathObj* goes wrong.

new since

commit 61ef73bb9e06ac7325abc26698314d7e35c164cc
Date:   Sun Aug 8 01:05:09 2021 +0200

tdf#143432 and more, improve wrap contour export

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

diff --git a/sw/source/filter/ww8/docxsdrexport.cxx 
b/sw/source/filter/ww8/docxsdrexport.cxx
index d4e616d1ff65..8d4a7c54e86b 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -389,11 +389,12 @@ tools::Polygon lcl_CreateContourPolygon(SdrObject* 
pSdrObj)
 // case OBJ_PLIN: disabled for unknown reason; related bug 75254.
 {
 // Includes removing any control points
-SdrObject* pConverted = pSdrObj->ConvertToPolyObj(false, 
false).release();
+SdrObjectUniquePtr pNewObj = pSdrObj->ConvertToPolyObj(false, 
false);
+SdrPathObj* pConverted = 
dynamic_cast(pNewObj.get());
 if (!pConverted)
 break;
-aPolyPolygon = 
static_cast(pConverted)->GetPathPoly();
-SdrObject::Free(pConverted);
+aPolyPolygon = pConverted->GetPathPoly();
+pNewObj.reset();
 
 // Word adds a line from last to first point. That will cut of 
indentations from being
 // filled. To prevent this, the wrap polygon is lead along the 
path back to the first


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

2021-08-15 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/ww8export/data/tdf142760.doc |binary
 sw/qa/extras/ww8export/ww8export3.cxx |   13 +
 2 files changed, 13 insertions(+)

New commits:
commit b338d215894b518098747caf0a03ea108bbd2fa3
Author: Xisco Fauli 
AuthorDate: Sun Aug 15 19:59:59 2021 +0200
Commit: Xisco Fauli 
CommitDate: Sun Aug 15 22:14:06 2021 +0200

tdf#142760: sw_ww8export3: Add unittest

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

diff --git a/sw/qa/extras/ww8export/data/tdf142760.doc 
b/sw/qa/extras/ww8export/data/tdf142760.doc
new file mode 100644
index ..1e90532fe899
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf142760.doc differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx 
b/sw/qa/extras/ww8export/ww8export3.cxx
index 831a1923d6d8..d3a22cb13013 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -930,6 +930,19 @@ DECLARE_WW8EXPORT_TEST(testTdf120394, "tdf120394.doc")
 }
 }
 
+DECLARE_WW8EXPORT_TEST(testTdf142760, "tdf142760.doc")
+{
+// Without the fix in place, this test would have failed with
+// - Expected: 2
+// - Actual  : 6
+CPPUNIT_ASSERT_EQUAL(2, getPages());
+CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+uno::Reference xTablesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+}
+
 DECLARE_WW8EXPORT_TEST(testTdf134570, "tdf134570.doc")
 {
 CPPUNIT_ASSERT_EQUAL(1, getPages());


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

2021-08-15 Thread Regina Henschel (via logerrit)
 oox/source/export/shapes.cxx|3 +-
 sw/qa/extras/ooxmlexport/data/tdf143860_NonPrimitiveCustomShape.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport16.cxx  |   11 
++
 3 files changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 24a8e3209b1d7c2f4f13d5cc3f69726253af9eff
Author: Regina Henschel 
AuthorDate: Sun Aug 15 18:48:32 2021 +0200
Commit: Regina Henschel 
CommitDate: Sun Aug 15 21:40:07 2021 +0200

tdf#143860 non-primitive needs custGeom not prstGeom

Error was, that for a custom shape with type 'non-primitive' method
DMLPresetShapeExporter::WriteShape() was called. For such shapes the
method GetOOXMLPresetGeometry() returns preset type 'rect' and in case
the shape had no handles, that preset geometry was written.
In my solution I exclude shapes of type 'non-primitive' from using
DMLPresetShapeExporter, because such shapes never belong to a OOXML
preset shape.

Change-Id: I714f69c98fe15c2b7e70dc0a474a7f85ad757034
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120511
Tested-by: Jenkins
Reviewed-by: Regina Henschel 

diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 325387f4991d..9b6bb4f8ed4f 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -843,7 +843,8 @@ ShapeExport& ShapeExport::WriteCustomShape( const 
Reference< XShape >& xShape )
 bool bPresetWriteSuccessful = false;
 // Let the custom shapes what has name and preset information in OOXML, to 
be written
 // as preset ones with parameters. Try that with this converter class.
-if (!sShapeType.startsWith("ooxml") && GetDocumentType() == DOCUMENT_DOCX
+if (!sShapeType.startsWith("ooxml") && sShapeType != "non-primitive"
+&& GetDocumentType() == DOCUMENT_DOCX
 && xShape->getShapeType() == "com.sun.star.drawing.CustomShape")
 {
 DMLPresetShapeExporter aCustomShapeConverter(this, xShape);
diff --git 
a/sw/qa/extras/ooxmlexport/data/tdf143860_NonPrimitiveCustomShape.odt 
b/sw/qa/extras/ooxmlexport/data/tdf143860_NonPrimitiveCustomShape.odt
new file mode 100644
index ..6a1222877031
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf143860_NonPrimitiveCustomShape.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index 17d6204f97fd..51b713dc0d68 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -73,6 +73,17 @@ protected:
 }
 };
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf143860NonPrimitiveCustomShape,
+"tdf143860_NonPrimitiveCustomShape.odt")
+{
+// The document has a custom shape of type non-primitive without handles. 
Make sure that the shape
+// is not exported with preset but with custom geometry.
+xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
+CPPUNIT_ASSERT(pXmlDocument);
+assertXPath(pXmlDocument, "//a:prstGeom", 0);
+assertXPath(pXmlDocument, "//a:custGeom", 1);
+}
+
 DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testWrapPolygonCurve, 
"tdf136386_WrapPolygonCurve.odt")
 {
 // Document has a curve with contour wrap and 'outside only'. Error was, 
that type 'square' was


Week #10 Report GSoC Make SVM format independent of the VCL Metafile

2021-08-15 Thread Πανος Κοροβεσης
Good evening,This week I pushed the last patches onto Gerrit. Those where:1) the remaining handlers for SvmWriter2) Move GDIMetaFile::GetChecksum to SvmWriter::GetChecksum (because the method uses MetaAction::Write)3) Remove GDIMetaFile::Read, GDIMetaFile::Write, ReadGDIMetaFile, WriteGDIMetaFile as they are not used anymore 4) Remove MetaAction::Read and MetaAction::Write as they are not used anymore You can see the patches in detail by following this link: https://gerrit.libreoffice.org/q/owner:panoskorovesis%2540outlook.comNext week TODO's:1) Go through the tests (svmtest.cxx) again trying to find edge casesIf you have any questions please let me know!Regards,Panos KorovesisPs: The link to the previous report is: https://lists.freedesktop.org/archives/libreoffice/2021-August/087714.html

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

2021-08-15 Thread Andrea Gelmini (via logerrit)
 framework/source/services/frame.cxx |4 ++--
 include/comphelper/multiinterfacecontainer2.hxx |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d5039e7b4c79b40cf6efb70dd703629cc367fcbf
Author: Andrea Gelmini 
AuthorDate: Sun Aug 8 22:34:30 2021 +0200
Commit: Julien Nabet 
CommitDate: Sun Aug 15 20:48:29 2021 +0200

Fix typos

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

diff --git a/framework/source/services/frame.cxx 
b/framework/source/services/frame.cxx
index 9c3aeb2897ef..6603ceaaecc3 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -1698,11 +1698,11 @@ void SAL_CALL XFrameImpl::close( sal_Bool 
bDeliverOwnership )
 m_bSelfClose = true;
 }
 
-throw css::util::CloseVetoException("Frame in use for loading document 
...",static_cast< ::cppu::OWeakObject*>(this));
+throw css::util::CloseVetoException("Frame in use for loading 
document...",static_cast< ::cppu::OWeakObject*>(this));
 }
 
 if ( ! setComponent(nullptr,nullptr) )
-throw css::util::CloseVetoException("Component couldn't be deattached 
...",static_cast< ::cppu::OWeakObject*>(this));
+throw css::util::CloseVetoException("Component couldn't be 
detached...",static_cast< ::cppu::OWeakObject*>(this));
 
 // If closing is allowed... inform all listeners and dispose this frame!
 pContainer = m_aListenerContainer.getContainer( 
cppu::UnoType::get());
diff --git a/include/comphelper/multiinterfacecontainer2.hxx 
b/include/comphelper/multiinterfacecontainer2.hxx
index 59d18483baac..e15c26733198 100644
--- a/include/comphelper/multiinterfacecontainer2.hxx
+++ b/include/comphelper/multiinterfacecontainer2.hxx
@@ -41,7 +41,7 @@ namespace comphelper
 {
 /**
   A helper class to store interface references of different types.
-  This is a copy of the similiar class at 
include/cppuhelper/interfacecontainer.h,
+  This is a copy of the similar class at 
include/cppuhelper/interfacecontainer.h,
   but now uses the improved comphelper::InterfaceContainer2.
 
   @see OInterfaceIteratorHelper2


[Libreoffice-commits] core.git: comphelper/source cppuhelper/source cppu/source dbaccess/source desktop/source

2021-08-15 Thread Noel Grandin (via logerrit)
 comphelper/source/misc/namedvaluecollection.cxx |9 ++---
 cppu/source/threadpool/threadpool.cxx   |   16 ++--
 cppu/source/uno/lbenv.cxx   |5 ++---
 cppuhelper/source/macro_expander.cxx|   21 +
 dbaccess/source/core/resource/core_resource.cxx |7 ---
 desktop/source/app/app.cxx  |5 ++---
 desktop/source/app/officeipcthread.cxx  |9 ++---
 7 files changed, 15 insertions(+), 57 deletions(-)

New commits:
commit 00f257a7ef4f1ec52887bc379c14757e057e94c8
Author: Noel Grandin 
AuthorDate: Fri Aug 13 16:13:42 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Aug 15 19:17:01 2021 +0200

rtl::Static -> thread-safe static local

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

diff --git a/comphelper/source/misc/namedvaluecollection.cxx 
b/comphelper/source/misc/namedvaluecollection.cxx
index 0bda6c197267..f572f7136f0d 100644
--- a/comphelper/source/misc/namedvaluecollection.cxx
+++ b/comphelper/source/misc/namedvaluecollection.cxx
@@ -204,19 +204,14 @@ namespace comphelper
 return false;
 }
 
-namespace
-{
-class theEmptyDefault : public rtl::Static {};
-}
-
-
 const Any& NamedValueCollection::impl_get( const OUString& _rValueName ) 
const
 {
+static Any theEmptyDefault;
 auto pos = maValues.find( _rValueName );
 if ( pos != maValues.end() )
 return pos->second;
 
-return theEmptyDefault::get();
+return theEmptyDefault;
 }
 
 
diff --git a/cppu/source/threadpool/threadpool.cxx 
b/cppu/source/threadpool/threadpool.cxx
index 86c280b4b352..512ddb095cd2 100644
--- a/cppu/source/threadpool/threadpool.cxx
+++ b/cppu/source/threadpool/threadpool.cxx
@@ -25,7 +25,6 @@
 #include 
 
 #include 
-#include 
 #include 
 
 #include 
@@ -43,21 +42,10 @@ namespace cppu_threadpool
 rtl::Reference const & theThread): thread(theThread)
 {}
 
-namespace {
-
-struct theDisposedCallerAdmin :
-public rtl::StaticWithInit< DisposedCallerAdminHolder, 
theDisposedCallerAdmin >
-{
-DisposedCallerAdminHolder operator () () {
-return std::make_shared();
-}
-};
-
-}
-
 DisposedCallerAdminHolder const & DisposedCallerAdmin::getInstance()
 {
-return theDisposedCallerAdmin::get();
+static DisposedCallerAdminHolder theDisposedCallerAdmin =  
std::make_shared();
+return theDisposedCallerAdmin;
 }
 
 DisposedCallerAdmin::~DisposedCallerAdmin()
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index 03dbc99eafcc..ad61cee0cf67 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -819,11 +819,10 @@ namespace
 const OUString& getOIdPart() const { return m_sOidPart; }
 };
 
-class theStaticOIdPart : public rtl::Static 
{};
-
 const OUString & unoenv_getStaticOIdPart()
 {
-return theStaticOIdPart::get().getOIdPart();
+static makeOIdPart theStaticOIdPart;
+return theStaticOIdPart.getOIdPart();
 }
 
 }
diff --git a/cppuhelper/source/macro_expander.cxx 
b/cppuhelper/source/macro_expander.cxx
index 85c649dd437c..93f758becc12 100644
--- a/cppuhelper/source/macro_expander.cxx
+++ b/cppuhelper/source/macro_expander.cxx
@@ -69,21 +69,6 @@ OUString expandMacros(OUString const & text) {
 namespace
 {
 
-class ImplNames
-{
-private:
-Sequence m_aNames;
-public:
-ImplNames() : m_aNames(2)
-{
-m_aNames[0] = SERVICE_NAME_A;
-m_aNames[1] = SERVICE_NAME_B;
-}
-const Sequence& getNames() const { return m_aNames; }
-};
-
-class theImplNames : public rtl::Static {};
-
 OUString s_impl_name()
 {
 return IMPL_NAME;
@@ -91,7 +76,11 @@ OUString s_impl_name()
 
 Sequence< OUString > const & s_get_service_names()
 {
-return theImplNames::get().getNames();
+static const Sequence< OUString > IMPL_NAMES {
+SERVICE_NAME_A,
+SERVICE_NAME_B
+};
+return IMPL_NAMES;
 }
 
 typedef cppu::WeakComponentImplHelper<
diff --git a/dbaccess/source/core/resource/core_resource.cxx 
b/dbaccess/source/core/resource/core_resource.cxx
index ecf73939eec2..864280452d92 100644
--- a/dbaccess/source/core/resource/core_resource.cxx
+++ b/dbaccess/source/core/resource/core_resource.cxx
@@ -26,13 +26,6 @@
 
 namespace dbaccess
 {
-// ResourceManager
-namespace
-{
-// access safety
-struct theResourceManagerMutex : public rtl::Static< osl::Mutex, 
theResourceManagerMutex > {};
-}
-
 OUString ResourceManager::loadString(TranslateId pResId)
 {
 return Translate::get(pResId, Translate::Create("dba"));
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index ade68fd5efc0..f65f93d63f80 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/

[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sc/inc sc/source

2021-08-15 Thread Eike Rathke (via logerrit)
 sc/inc/compiler.hxx  |1 +
 sc/source/core/tool/compiler.cxx |   37 ++---
 2 files changed, 31 insertions(+), 7 deletions(-)

New commits:
commit c5dbe94eb71acd9ab19cd9a8d561dd75da82d3d7
Author: Eike Rathke 
AuthorDate: Wed Aug 11 20:03:36 2021 +0200
Commit: Xisco Fauli 
CommitDate: Sun Aug 15 18:25:52 2021 +0200

Resolves: tdf#143809 "INF" may be a named expression or DB area name

... to not be caught by rtl::math::stringToDouble() handling
XMLSchema-2 "INF" and "NaN" and set as error.

Change-Id: I9bf7aad416a69d4c3c0d49d6c80168097040a3e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120337
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit b37fd7f38165dadc5b1a674b73f4b18824e4789e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120435
Reviewed-by: Xisco Fauli 

diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index b051f3ad4b4e..8ff420001d2b 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -344,6 +344,7 @@ private:
 bool IsColRowName( const OUString& );
 bool IsBoolean( const OUString& );
 void AutoCorrectParsedSymbol();
+const ScRangeData* GetRangeData( SCTAB& rSheet, const OUString& rUpperName 
) const;
 
 void AdjustSheetLocalNameRelReferences( SCTAB nDelta );
 void SetRelNameReference();
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 274205f5734b..b2b008b13d55 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3093,7 +3093,24 @@ bool ScCompiler::IsValue( const OUString& rSym )
 return false;
 }
 if (eStatus == rtl_math_ConversionStatus_OutOfRange)
+{
+// rtl::math::stringToDouble() recognizes XMLSchema-2 "INF" and
+// "NaN" (case sensitive) that could be named expressions or DB
+// areas as well.
+// rSym is already upper so "NaN" is not possible here.
+if (!std::isfinite(fVal) && rSym == "INF")
+{
+SCTAB nSheet = -1;
+if (GetRangeData( nSheet, rSym))
+return false;
+if 
(rDoc.GetDBCollection()->getNamedDBs().findByUpperName(rSym))
+return false;
+}
+/* TODO: is there a specific reason why we don't accept an infinity
+ * value that would raise an error in the interpreter, instead of
+ * setting the hard error at the token array already? */
 SetError( FormulaError::IllegalArgument );
+}
 maRawToken.SetDouble( fVal );
 return true;
 }
@@ -3511,13 +3528,11 @@ bool ScCompiler::IsMacro( const OUString& rName )
 #endif
 }
 
-bool ScCompiler::IsNamedRange( const OUString& rUpperName )
+const ScRangeData* ScCompiler::GetRangeData( SCTAB& rSheet, const OUString& 
rUpperName ) const
 {
-// IsNamedRange is called only from NextNewToken, with an upper-case string
-
 // try local names first
-sal_Int16 nSheet = aPos.Tab();
-ScRangeName* pRangeName = rDoc.GetRangeName(nSheet);
+rSheet = aPos.Tab();
+const ScRangeName* pRangeName = rDoc.GetRangeName(rSheet);
 const ScRangeData* pData = nullptr;
 if (pRangeName)
 pData = pRangeName->findByUpperName(rUpperName);
@@ -3527,9 +3542,17 @@ bool ScCompiler::IsNamedRange( const OUString& 
rUpperName )
 if (pRangeName)
 pData = pRangeName->findByUpperName(rUpperName);
 if (pData)
-nSheet = -1;
+rSheet = -1;
 }
+return pData;
+}
+
+bool ScCompiler::IsNamedRange( const OUString& rUpperName )
+{
+// IsNamedRange is called only from NextNewToken, with an upper-case string
 
+SCTAB nSheet = -1;
+const ScRangeData* pData = GetRangeData( nSheet, rUpperName);
 if (pData)
 {
 maRawToken.SetName( nSheet, pData->GetIndex());
@@ -3540,7 +3563,7 @@ bool ScCompiler::IsNamedRange( const OUString& rUpperName 
)
 if (mnCurrentSheetEndPos > 0 && mnCurrentSheetTab >= 0)
 {
 OUString aName( rUpperName.copy( mnCurrentSheetEndPos));
-pRangeName = rDoc.GetRangeName( mnCurrentSheetTab);
+const ScRangeName* pRangeName = rDoc.GetRangeName( mnCurrentSheetTab);
 if (pRangeName)
 {
 pData = pRangeName->findByUpperName(aName);


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

2021-08-15 Thread Mike Kaganski (via logerrit)
 include/tools/gen.hxx|   86 ++-
 tools/source/generic/gen.cxx |   54 +--
 2 files changed, 47 insertions(+), 93 deletions(-)

New commits:
commit 6c12c659fb22aeab1d1d5d0e8298662e2a602499
Author: Mike Kaganski 
AuthorDate: Sat Aug 14 03:20:01 2021 +0300
Commit: Mike Kaganski 
CommitDate: Sun Aug 15 10:18:49 2021 +0200

Simplify tools::Rectangle a bit

1. Simplify/delegate ctors
2. Simplify getWidth/getHeight
3. Simplify expand
4. Simplify operators += / -= / + / -

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

diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index b8bd6eeb35d4..3c97728c7402 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -464,7 +464,7 @@ class SAL_WARN_UNUSED TOOLS_DLLPUBLIC Rectangle final
 {
 static constexpr short RECT_EMPTY = -32767;
 public:
-constexpr Rectangle();
+constexpr Rectangle() = default;
 constexpr Rectangle( const Point& rLT, const Point& rRB );
 constexpr Rectangle( tools::Long nLeft, tools::Long nTop,
  tools::Long nRight, tools::Long nBottom );
@@ -475,14 +475,14 @@ public:
 static RectangleJustify( const Point& rLT, const Point& rRB );
 
 constexpr tools::Long Left() const { return nLeft; }
-constexpr tools::Long Right() const { return nRight == RECT_EMPTY ? nLeft 
: nRight; }
+constexpr tools::Long Right() const { return IsWidthEmpty() ? nLeft : 
nRight; }
 constexpr tools::Long Top() const { return nTop; }
-constexpr tools::Long Bottom() const { return nBottom == RECT_EMPTY ? nTop 
: nBottom; }
+constexpr tools::Long Bottom() const { return IsHeightEmpty() ? nTop : 
nBottom; }
 
-voidSetLeft(tools::Long v){ nLeft = v;   }
-voidSetRight(tools::Long v)   { nRight = v;  }
-voidSetTop(tools::Long v) { nTop = v;}
-voidSetBottom(tools::Long v)  { nBottom = v; }
+constexpr void SetLeft(tools::Long v) { nLeft = v; }
+constexpr void SetRight(tools::Long v) { nRight = v; }
+constexpr void SetTop(tools::Long v) { nTop = v; }
+constexpr void SetBottom(tools::Long v) { nBottom = v; }
 
 constexpr Point TopLeft() const { return { Left(), Top() }; }
 constexpr Point TopRight() const { return { Right(), Top() }; }
@@ -511,7 +511,7 @@ public:
 {
 tools::Long n = 0;
 
-if (nRight != RECT_EMPTY)
+if (!IsWidthEmpty())
 {
 n = nRight - nLeft;
 if (n < 0)
@@ -528,7 +528,7 @@ public:
 {
 tools::Long n = 0;
 
-if (nBottom != RECT_EMPTY)
+if (!IsHeightEmpty())
 {
 n = nBottom - nTop;
 if (n < 0)
@@ -554,9 +554,9 @@ public:
 voidSetEmpty() { nRight = nBottom = RECT_EMPTY; }
 voidSetWidthEmpty() { nRight = RECT_EMPTY; }
 voidSetHeightEmpty() { nBottom = RECT_EMPTY; }
-constexpr bool IsEmpty() const { return (nRight == RECT_EMPTY) || (nBottom 
== RECT_EMPTY); }
-boolIsWidthEmpty() const { return nRight == RECT_EMPTY; }
-boolIsHeightEmpty() const { return nBottom == RECT_EMPTY; }
+constexpr bool IsEmpty() const { return IsWidthEmpty() || IsHeightEmpty(); 
}
+constexpr bool IsWidthEmpty() const { return nRight == RECT_EMPTY; }
+constexpr bool IsHeightEmpty() const { return nBottom == RECT_EMPTY; }
 
 inline bool operator == ( const tools::Rectangle& rRect ) const;
 inline bool operator != ( const tools::Rectangle& rRect ) const;
@@ -571,9 +571,9 @@ public:
 tools::Long getX() const { return nLeft; }
 tools::Long getY() const { return nTop; }
 /// Returns the difference between right and left, assuming the range 
includes one end, but not the other.
-tools::Long getWidth() const;
+tools::Long getWidth() const { return Right() - Left(); }
 /// Returns the difference between bottom and top, assuming the range 
includes one end, but not the other.
-tools::Long getHeight() const;
+tools::Long getHeight() const { return Bottom() - Top(); }
 /// Set the left edge of the rectangle to x, preserving the width
 voidsetX( tools::Long x );
 /// Set the top edge of the rectangle to y, preserving the height
@@ -597,25 +597,15 @@ public:
 voidSaturatingSetY(tools::Long y);
 
 private:
-tools::LongnLeft;
-tools::LongnTop;
-tools::LongnRight;
-tools::LongnBottom;
+tools::Long nLeft = 0;
+tools::Long nTop = 0;
+tools::Long nRight = RECT_EMPTY;
+tools::Long nBottom = RECT_EMPTY;
 };
 }
 
-constexpr inline t

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

2021-08-15 Thread dante (via logerrit)
 starmath/inc/mathml/attribute.hxx|   30 +-
 starmath/inc/mathml/element.hxx  |7 ++-
 starmath/source/mathml/attribute.cxx |   18 ++
 starmath/source/mathml/element.cxx   |   15 +--
 starmath/source/mathml/export.cxx|3 +++
 5 files changed, 65 insertions(+), 8 deletions(-)

New commits:
commit ffaaec23ad94f9bec5fd0fcb02603270eb660b81
Author: dante 
AuthorDate: Fri Aug 13 19:51:33 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Aug 15 09:10:13 2021 +0200

Add the possibility to check if a mathml attribute is manually set

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

diff --git a/starmath/inc/mathml/attribute.hxx 
b/starmath/inc/mathml/attribute.hxx
index cbe042827d85..946e9f463e9c 100644
--- a/starmath/inc/mathml/attribute.hxx
+++ b/starmath/inc/mathml/attribute.hxx
@@ -49,6 +49,7 @@ class SmMlAttribute
 private:
 SmMlAttributeValueType m_aSmMlAttributeValueType;
 SmMlAttributeValue m_aAttributeValue;
+bool m_bSet;
 
 private:
 void clearPreviousAttributeValue();
@@ -56,28 +57,42 @@ private:
 void setAttributeValue(const SmMlAttribute* aMlAttribute);
 
 public:
-SmMlAttribute() { m_aSmMlAttributeValueType = 
SmMlAttributeValueType::NMlEmpty; };
+SmMlAttribute()
+: m_aSmMlAttributeValueType(SmMlAttributeValueType::NMlEmpty)
+, m_bSet(false){};
 
 ~SmMlAttribute() { clearPreviousAttributeValue(); };
 
 SmMlAttribute(SmMlAttributeValueType)
+: m_aSmMlAttributeValueType(SmMlAttributeValueType::NMlEmpty)
+, m_bSet(false)
 {
-m_aSmMlAttributeValueType = SmMlAttributeValueType::NMlEmpty;
 setDefaultAttributeValue();
 };
 
 SmMlAttribute(const SmMlAttribute& aMlAttribute)
+: m_aSmMlAttributeValueType(SmMlAttributeValueType::NMlEmpty)
+, m_bSet(aMlAttribute.isSet())
 {
-m_aSmMlAttributeValueType = SmMlAttributeValueType::NMlEmpty;
 setAttributeValue(&aMlAttribute);
 }
 
 SmMlAttribute(const SmMlAttribute* aMlAttribute)
+: m_aSmMlAttributeValueType(SmMlAttributeValueType::NMlEmpty)
+, m_bSet(aMlAttribute->isSet())
 {
-m_aSmMlAttributeValueType = SmMlAttributeValueType::NMlEmpty;
 setAttributeValue(aMlAttribute);
 }
 
+public:
+/** Check if the attribute has been set
+*/
+bool isSet() const { return m_bSet; }
+
+/** Set if the attribute has been set
+*/
+void setSet(bool bSet) { m_bSet = bSet; }
+
 public:
 /**
   * Returns the type of attribute we are dealing with.
@@ -116,10 +131,15 @@ public:
 
 void setMlAttributeValue(const SmMlAttribute& aMlAttribute)
 {
+m_bSet = true;
 setAttributeValue(&aMlAttribute);
 }
 
-void setMlAttributeValue(const SmMlAttribute* aMlAttribute) { 
setAttributeValue(aMlAttribute); }
+void setMlAttributeValue(const SmMlAttribute* aMlAttribute)
+{
+m_bSet = true;
+setAttributeValue(aMlAttribute);
+}
 
 public:
 // Get values
diff --git a/starmath/inc/mathml/element.hxx b/starmath/inc/mathml/element.hxx
index 2c5ec40ab019..513b5d84b7ea 100644
--- a/starmath/inc/mathml/element.hxx
+++ b/starmath/inc/mathml/element.hxx
@@ -164,7 +164,7 @@ public: // attributes
   * @param nAttributePos
   * @return given attribute.
   */
-SmMlAttribute getAttribute(SmMlAttributeValueType aElementType) const;
+SmMlAttribute getAttribute(SmMlAttributeValueType aAttributeType) const;
 
 /**
   * Set's a given attribute.
@@ -174,6 +174,11 @@ public: // attributes
   */
 void setAttribute(const SmMlAttribute* aAttribute);
 
+/** Checks if an attribute has been manually set
+* @param aElementType
+*/
+bool isAttributeSet(SmMlAttributeValueType aAttributeType) const;
+
 protected: // attributes
 /**
   * Get's a given attribute.
diff --git a/starmath/source/mathml/attribute.cxx 
b/starmath/source/mathml/attribute.cxx
index 61c4df609452..a1be708ae656 100644
--- a/starmath/source/mathml/attribute.cxx
+++ b/starmath/source/mathml/attribute.cxx
@@ -321,36 +321,42 @@ const struct SmMlSymmetric* 
SmMlAttribute::getMlSymmetric() const
 
 void SmMlAttribute::setMlAccent(const SmMlAccent* aAccent)
 {
+m_bSet = true;
 clearPreviousAttributeValue();
 m_aAttributeValue.m_aAccent.m_aAccent = aAccent->m_aAccent;
 }
 
 void SmMlAttribute::setMlDir(const SmMlDir* aDir)
 {
+m_bSet = true;
 clearPreviousAttributeValue();
 m_aAttributeValue.m_aDir.m_aDir = aDir->m_aDir;
 }
 
 void SmMlAttribute::setMlDisplaystyle(const SmMlDisplaystyle* aDisplaystyle)
 {
+m_bSet = true;
 clearPreviousAttributeValue();
 m_aAttributeValue.m_aDisplaystyle.m_aDisplaystyle = 
aDisplaystyle->m_aDisplaystyle;
 }
 
 void SmMlAttribute::setMlFence(const SmMlFence* aFence)

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

2021-08-15 Thread dante (via logerrit)
 starmath/inc/mathml/attribute.hxx|7 --
 starmath/inc/mathml/def.hxx  |   13 +++
 starmath/source/mathml/attribute.cxx |   19 +
 starmath/source/mathml/def.cxx   |   38 ++-
 4 files changed, 57 insertions(+), 20 deletions(-)

New commits:
commit 73b6462b81080c63e6668979f4a9cd00242925e9
Author: dante 
AuthorDate: Fri Aug 13 19:13:46 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Aug 15 09:09:07 2021 +0200

Add the Form attribute to mo

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

diff --git a/starmath/inc/mathml/attribute.hxx 
b/starmath/inc/mathml/attribute.hxx
index a6b1bdec639c..cbe042827d85 100644
--- a/starmath/inc/mathml/attribute.hxx
+++ b/starmath/inc/mathml/attribute.hxx
@@ -25,6 +25,7 @@ union SmMlAttributeValue {
 struct SmMlDir m_aDir;
 struct SmMlDisplaystyle m_aDisplaystyle;
 struct SmMlFence m_aFence;
+struct SmMlForm m_aForm;
 struct SmMlHref m_aHref;
 struct SmMlLspace m_aLspace;
 struct SmMlMathbackground m_aMathbackground;
@@ -126,6 +127,7 @@ public:
 const struct SmMlDir* getMlDir() const;
 const struct SmMlDisplaystyle* getMlDisplaystyle() const;
 const struct SmMlFence* getMlFence() const;
+const struct SmMlForm* getMlForm() const;
 const struct SmMlHref* getMlHref() const;
 const struct SmMlLspace* getMlLspace() const;
 const struct SmMlMathbackground* getMlMathbackground() const;
@@ -146,6 +148,7 @@ public:
 void setMlDir(const SmMlDir* aDir);
 void setMlDisplaystyle(const SmMlDisplaystyle* aDisplaystyle);
 void setMlFence(const SmMlFence* aFence);
+void setMlForm(const SmMlForm* aForm);
 void setMlHref(const SmMlHref* aHref);
 void setMlLspace(const SmMlLspace* aLspace);
 void setMlMathbackground(const SmMlMathbackground* aMathbackground);
@@ -171,10 +174,10 @@ extern SmMlAttributePos MlAttributeListMath[1];
 extern SmMlAttributePos MlAttributeListMi[7];
 extern SmMlAttributePos MlAttributeListMerror[4];
 extern SmMlAttributePos MlAttributeListMn[7];
-extern SmMlAttributePos MlAttributeListMo[17];
+extern SmMlAttributePos MlAttributeListMo[18];
 extern SmMlAttributePos MlAttributeListMrow[4];
 extern SmMlAttributePos MlAttributeListMtext[7];
-extern SmMlAttributePos MlAttributeListMstyle[17];
+extern SmMlAttributePos MlAttributeListMstyle[18];
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/starmath/inc/mathml/def.hxx b/starmath/inc/mathml/def.hxx
index 52cf70206b2f..38073671189c 100644
--- a/starmath/inc/mathml/def.hxx
+++ b/starmath/inc/mathml/def.hxx
@@ -76,6 +76,7 @@ enum class SmMlAttributeValueType : uint_fast8_t
 MlDir,
 MlDisplaystyle,
 MlFence,
+MlForm,
 MlHref,
 MlLspace,
 MlMathbackground,
@@ -123,6 +124,13 @@ enum class SmMlAttributeValueFence : uint_fast8_t
 MlTrue = 0x01
 };
 
+enum class SmMlAttributeValueForm : uint_fast8_t
+{
+MlPrefix = 0x01,
+MlInfix = 0x02,
+MlPosfix = 0x04
+};
+
 enum class SmMlAttributeValueHref : uint_fast8_t
 {
 NMlEmpty = 0x00,
@@ -236,6 +244,11 @@ struct SmMlFence
 SmMlAttributeValueFence m_aFence;
 };
 
+struct SmMlForm
+{
+SmMlAttributeValueForm m_aForm;
+};
+
 struct SmMlHref
 {
 SmMlAttributeValueHref m_aHref;
diff --git a/starmath/source/mathml/attribute.cxx 
b/starmath/source/mathml/attribute.cxx
index da7668417327..61c4df609452 100644
--- a/starmath/source/mathml/attribute.cxx
+++ b/starmath/source/mathml/attribute.cxx
@@ -63,6 +63,9 @@ void SmMlAttribute::setDefaultAttributeValue()
 case SmMlAttributeValueType::MlFence:
 m_aAttributeValue.m_aFence.m_aFence = 
SmMlAttributeValueFence::MlFalse;
 break;
+case SmMlAttributeValueType::MlForm:
+m_aAttributeValue.m_aForm.m_aForm = 
SmMlAttributeValueForm::MlInfix;
+break;
 case SmMlAttributeValueType::MlHref:
 m_aAttributeValue.m_aHref.m_aHref = 
SmMlAttributeValueHref::NMlEmpty;
 m_aAttributeValue.m_aHref.m_aLnk = new OUString(u"");
@@ -139,6 +142,9 @@ void SmMlAttribute::setAttributeValue(const SmMlAttribute* 
aAttribute)
 case SmMlAttributeValueType::MlFence:
 setMlFence(aAttribute->getMlFence());
 break;
+case SmMlAttributeValueType::MlForm:
+setMlForm(aAttribute->getMlForm());
+break;
 case SmMlAttributeValueType::MlHref:
 setMlHref(aAttribute->getMlHref());
 break;
@@ -212,6 +218,13 @@ const struct SmMlFence* SmMlAttribute::getMlFence() const
 return nullptr;
 }
 
+const struct SmMlForm* SmMlAttribute::getMlForm() const
+{
+if (m_aSmMlAttributeValueType == SmMlAttributeValueType::MlForm)
+return &m_aAttributeValue.m_aForm;
+return nullptr;
+}
+
 con