bin/lo-all-static-libs                           |    1 +
 chart2/IwyuFilter_chart2.yaml                    |    2 +-
 chart2/source/inc/FormattedString.hxx            |    6 +++---
 chart2/source/inc/FormattedStringHelper.hxx      |   13 +++++++------
 chart2/source/model/main/FormattedString.cxx     |    2 +-
 chart2/source/tools/FormattedStringHelper.cxx    |   23 ++++++++++-------------
 chart2/source/view/charttypes/VSeriesPlotter.cxx |    7 ++++---
 chart2/source/view/inc/LegendEntryProvider.hxx   |    4 ++--
 chart2/source/view/main/VLegend.cxx              |   15 ++++++++-------
 solenv/bin/native-code.py                        |    1 +
 solenv/clang-format/excludelist                  |    2 +-
 11 files changed, 39 insertions(+), 37 deletions(-)

New commits:
commit 49f36c83e4bb1c332028bc70606e96ebf31fbd74
Author:     Patrick Luby <patrick.l...@collabora.com>
AuthorDate: Tue Mar 21 08:38:21 2023 -0400
Commit:     Patrick Luby <plub...@neooffice.org>
CommitDate: Wed Mar 22 17:15:36 2023 +0000

    Partial fix: iOS missing text direction listbox in Format > Page Style > 
Page
    
    Add the static libraries that are required by the LibreOffice's
    CTL and CJK text layout features to the iOS app add link list.
    
    libnumbertext.a is one of the missing static libraries that are required by 
the LibreOffice's CTL and CJK text layout features.
    
    The other missing static library (which was in the ios-all-static-libs list 
but was getting stripped by Xcode) is added back by listing the 
"lingucomponent_NumberText_get_implementation" C function.
    
    Without these static library changes, enabling CTL or CJK will cause a 
crash as the "lingucomponent_NumberText_get_implementation" symbol won't be in 
the binary and that function needs libnumbertext.a.
    
    Reference-to: https://github.com/CollaboraOnline/online/issues/6050
    Change-Id: I21fddbfd29a1d326b509840127bd136c327cd3d2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149110
    Tested-by: Jenkins
    Reviewed-by: Patrick Luby <plub...@neooffice.org>

diff --git a/bin/lo-all-static-libs b/bin/lo-all-static-libs
index 3db8d803d07a..009ddce23730 100755
--- a/bin/lo-all-static-libs
+++ b/bin/lo-all-static-libs
@@ -119,6 +119,7 @@ echo $INSTDIR/$LIBO_LIB_FOLDER/lib*.a \
      $WORKDIR/UnpackedTarball/libexttextcat/src/.libs/*.a \
      $WORKDIR/UnpackedTarball/libmspub/src/lib/.libs/*.a \
      $WORKDIR/UnpackedTarball/libmwaw/src/lib/.libs/*.a \
+     $WORKDIR/UnpackedTarball/libnumbertext/src/.libs/*.a \
      $WORKDIR/UnpackedTarball/libodfgen/src/.libs/*.a \
      $WORKDIR/UnpackedTarball/liborcus/src/*/.libs/*.a \
      $WORKDIR/UnpackedTarball/librevenge/src/*/.libs/*.a \
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 4928b146df93..b8fa3634ab23 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -307,6 +307,7 @@ core_constructor_list = [
     ("lingucomponent_MacSpellChecker_get_implementation", "#ifdef IOS"),
 # lingucomponent/source/spellcheck/languagetool/LanguageTool.component
     ("lingucomponent_LanguageToolGrammarChecker_get_implementation", "#if 
!ENABLE_FUZZERS"),
+    "lingucomponent_NumberText_get_implementation",
 # lingucomponent/source/thesaurus/libnth/lnth.component
     "lingucomponent_Thesaurus_get_implementation",
     "lingucomponent_SpellChecker_get_implementation",
commit 53a3d028e6931e4443cfe8cdf18909f6bfd8e2f4
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Mar 22 09:49:34 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Mar 22 17:15:34 2023 +0000

    use more concrete type in chart2
    
    Change-Id: I568530c1db0add697f7f257a4e5560a3e50919f3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149290
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/chart2/IwyuFilter_chart2.yaml b/chart2/IwyuFilter_chart2.yaml
index 194bc932e81e..219c179a0d6b 100644
--- a/chart2/IwyuFilter_chart2.yaml
+++ b/chart2/IwyuFilter_chart2.yaml
@@ -187,7 +187,7 @@ excludelist:
     - com/sun/star/chart2/RelativeSize.hpp
     # Actually used
     - com/sun/star/uno/XComponentContext.hpp
-    chart2/source/model/main/FormattedString.hxx:
+    chart2/source/inc/FormattedString.hxx:
     # base class has to be a complete type
     - com/sun/star/chart2/XDataPointCustomLabelField.hpp
     - com/sun/star/lang/XServiceInfo.hpp
diff --git a/chart2/source/model/main/FormattedString.hxx 
b/chart2/source/inc/FormattedString.hxx
similarity index 98%
rename from chart2/source/model/main/FormattedString.hxx
rename to chart2/source/inc/FormattedString.hxx
index 229eb753ed76..d438845c7f06 100644
--- a/chart2/source/model/main/FormattedString.hxx
+++ b/chart2/source/inc/FormattedString.hxx
@@ -18,13 +18,13 @@
  */
 #pragma once
 
-#include <OPropertySet.hxx>
+#include "OPropertySet.hxx"
 #include <cppuhelper/implbase.hxx>
 #include <comphelper/uno3.hxx>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/chart2/XDataPointCustomLabelField.hpp>
 #include <com/sun/star/util/XCloneable.hpp>
-#include <ModifyListenerHelper.hxx>
+#include "ModifyListenerHelper.hxx"
 
 namespace chart
 {
@@ -71,7 +71,6 @@ public:
     virtual void SAL_CALL removeVetoableChangeListener(const OUString& p1, 
const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) override
         { ::property::OPropertySet::removeVetoableChangeListener(p1, p2); }
 
-private:
     explicit FormattedString( const FormattedString & rOther );
 
     // ____ XFormattedString ____
@@ -116,6 +115,7 @@ private:
     virtual void SAL_CALL disposing(
         const css::lang::EventObject& Source ) override;
 
+private:
     // ____ OPropertySet ____
     virtual void firePropertyChangeEvent() override;
     using OPropertySet::disposing;
diff --git a/chart2/source/inc/FormattedStringHelper.hxx 
b/chart2/source/inc/FormattedStringHelper.hxx
index 45ce0b30142e..ef2077c40f69 100644
--- a/chart2/source/inc/FormattedStringHelper.hxx
+++ b/chart2/source/inc/FormattedStringHelper.hxx
@@ -18,24 +18,25 @@
  */
 #pragma once
 
-#include <com/sun/star/uno/Sequence.h>
+#include <vector>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
 
 namespace com::sun::star::beans { class XPropertySet; }
 namespace com::sun::star::chart2 { class XFormattedString2; }
-namespace com::sun::star::uno { class XComponentContext; }
 namespace com::sun::star::uno { template <class interface_type> class 
Reference; }
 
 namespace chart
 {
+class FormattedString;
 
 class FormattedStringHelper
 {
 public:
-    static css::uno::Sequence<
-            css::uno::Reference< css::chart2::XFormattedString2 > >
+    static std::vector<
+            rtl::Reference< ::chart::FormattedString > >
             createFormattedStringSequence(
-                     const css::uno::Reference< css::uno::XComponentContext > 
& xContext
-                    , const OUString & rString
+                    const OUString & rString
                     , const css::uno::Reference< css::beans::XPropertySet > & 
xTextProperties ) noexcept;
 };
 
diff --git a/chart2/source/model/main/FormattedString.cxx 
b/chart2/source/model/main/FormattedString.cxx
index cb16bad95b1f..eed75c525f40 100644
--- a/chart2/source/model/main/FormattedString.cxx
+++ b/chart2/source/model/main/FormattedString.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "FormattedString.hxx"
+#include <FormattedString.hxx>
 
 #include <CharacterProperties.hxx>
 #include <PropertyHelper.hxx>
diff --git a/chart2/source/tools/FormattedStringHelper.cxx 
b/chart2/source/tools/FormattedStringHelper.cxx
index 60669a9f979f..3cfc04c34dcc 100644
--- a/chart2/source/tools/FormattedStringHelper.cxx
+++ b/chart2/source/tools/FormattedStringHelper.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <FormattedStringHelper.hxx>
+#include <FormattedString.hxx>
 #include <com/sun/star/chart2/FormattedString.hpp>
 #include <comphelper/diagnose_ex.hxx>
 #include <comphelper/property.hxx>
@@ -30,32 +31,28 @@ using namespace ::com::sun::star::chart2;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Sequence;
 
-Sequence< Reference< chart2::XFormattedString2 > >
+std::vector< rtl::Reference< ::chart::FormattedString > >
             FormattedStringHelper::createFormattedStringSequence(
-                     const Reference< uno::XComponentContext > & xContext
-                    , const OUString & rString
+                      const OUString & rString
                     , const Reference< beans::XPropertySet > & xTextProperties 
) noexcept
 {
-    Reference< XFormattedString2 > xFormStr;
+    rtl::Reference< FormattedString > xFormStr;
     try
     {
-        if( xContext.is() )
-        {
-            xFormStr = chart2::FormattedString::create(xContext);
+        xFormStr = new FormattedString();
 
-            xFormStr->setString( rString );
+        xFormStr->setString( rString );
 
-            // set character properties
-            comphelper::copyProperties(
-                xTextProperties, Reference< beans::XPropertySet >( xFormStr, 
uno::UNO_QUERY_THROW ) );
-        }
+        // set character properties
+        comphelper::copyProperties(
+            xTextProperties, Reference< beans::XPropertySet >( 
static_cast<cppu::OWeakObject*>(xFormStr.get()), uno::UNO_QUERY_THROW ) );
     }
     catch( const uno::Exception & )
     {
         DBG_UNHANDLED_EXCEPTION("chart2");
     }
 
-    return Sequence< Reference< XFormattedString2 > >( & xFormStr, 1 );
+    return { xFormStr };
 }
 
 } //namespace chart
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx 
b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 6b2659538b11..77b3ecdfedd2 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -30,6 +30,7 @@
 
 #include <CommonConverters.hxx>
 #include <ExplicitCategoriesProvider.hxx>
+#include <FormattedString.hxx>
 #include <ObjectIdentifier.hxx>
 #include <StatisticsHelper.hxx>
 #include <PlottingPositionHelper.hxx>
@@ -2787,7 +2788,7 @@ std::vector< ViewLegendEntry > 
VSeriesPlotter::createLegendEntriesForSeries(
                 aLabelText = aCategoryNames[nIdx];
                 if( xShape.is() || !aLabelText.isEmpty() )
                 {
-                    aEntry.aLabel = 
FormattedStringHelper::createFormattedStringSequence( xContext, aLabelText, 
xTextProperties );
+                    aEntry.aLabel = 
FormattedStringHelper::createFormattedStringSequence( aLabelText, 
xTextProperties );
                     aResult.push_back(aEntry);
                 }
             }
@@ -2813,7 +2814,7 @@ std::vector< ViewLegendEntry > 
VSeriesPlotter::createLegendEntriesForSeries(
 
             // label
             aLabelText = rSeries.getModel()->getLabelForRole( 
m_xChartTypeModel.is() ? m_xChartTypeModel->getRoleOfSequenceForSeriesLabel() : 
"values-y");
-            aEntry.aLabel = 
FormattedStringHelper::createFormattedStringSequence( xContext, aLabelText, 
xTextProperties );
+            aEntry.aLabel = 
FormattedStringHelper::createFormattedStringSequence( aLabelText, 
xTextProperties );
 
             aResult.push_back(aEntry);
         }
@@ -2833,7 +2834,7 @@ std::vector< ViewLegendEntry > 
VSeriesPlotter::createLegendEntriesForSeries(
                 //label
                 OUString aResStr( 
RegressionCurveHelper::getUINameForRegressionCurve( aCurves[i] ) );
                 replaceParamterInString( aResStr, u"%SERIESNAME", aLabelText );
-                aEntry.aLabel = 
FormattedStringHelper::createFormattedStringSequence( xContext, aResStr, 
xTextProperties );
+                aEntry.aLabel = 
FormattedStringHelper::createFormattedStringSequence( aResStr, xTextProperties 
);
 
                 // symbol
                 rtl::Reference<SvxShapeGroup> 
xSymbolGroup(ShapeFactory::createGroup2D( xTarget ));
diff --git a/chart2/source/view/inc/LegendEntryProvider.hxx 
b/chart2/source/view/inc/LegendEntryProvider.hxx
index d89447f38429..d78a367b1c58 100644
--- a/chart2/source/view/inc/LegendEntryProvider.hxx
+++ b/chart2/source/view/inc/LegendEntryProvider.hxx
@@ -36,6 +36,7 @@ namespace com::sun::star::uno { class XComponentContext; }
 
 namespace chart
 {
+class FormattedString;
 
 enum class LegendSymbolStyle
 {
@@ -62,8 +63,7 @@ struct ViewLegendEntry
 
     /** The descriptive text for a legend entry.
      */
-    css::uno::Sequence<
-        css::uno::Reference< css::chart2::XFormattedString2 > >  aLabel;
+    std::vector< rtl::Reference< ::chart::FormattedString > >  aLabel;
 };
 
 
diff --git a/chart2/source/view/main/VLegend.cxx 
b/chart2/source/view/main/VLegend.cxx
index 061cbb39976d..27bf869b8663 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -23,6 +23,7 @@
 #include <PropertyMapper.hxx>
 #include <ChartModel.hxx>
 #include <ObjectIdentifier.hxx>
+#include <FormattedString.hxx>
 #include <RelativePositionHelper.hxx>
 #include <ShapeFactory.hxx>
 #include <RelativeSizeHelper.hxx>
@@ -160,22 +161,22 @@ awt::Size lcl_createTextShapes(
         try
         {
             OUString aLabelString;
-            Sequence< Reference< XFormattedString2 > > aLabelSeq = 
rEntry.aLabel;
-            for( sal_Int32 i = 0; i < aLabelSeq.getLength(); ++i )
+            const std::vector< rtl::Reference< ::chart::FormattedString > > & 
rLabelSeq = rEntry.aLabel;
+            for( size_t i = 0; i < rLabelSeq.size(); ++i )
             {
                 // todo: support more than one text range
                 if( i == 1 )
                     break;
 
                 // tdf#150034 limit legend label text
-                if (aLabelSeq[i]->getString().getLength() > 520)
+                if (rLabelSeq[i]->getString().getLength() > 520)
                 {
-                    sal_Int32 nIndex = aLabelSeq[i]->getString().indexOf(' ', 
500);
-                    aLabelSeq[i]->setString(
-                        aLabelSeq[i]->getString().copy(0, nIndex > 500 ? 
nIndex : 500));
+                    sal_Int32 nIndex = rLabelSeq[i]->getString().indexOf(' ', 
500);
+                    rLabelSeq[i]->setString(
+                        rLabelSeq[i]->getString().copy(0, nIndex > 500 ? 
nIndex : 500));
                 }
 
-                aLabelString += aLabelSeq[i]->getString();
+                aLabelString += rLabelSeq[i]->getString();
                 // workaround for Issue #i67540#
                 if( aLabelString.isEmpty())
                     aLabelString = " ";
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 96dc3df02583..d58bad5e5c77 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -1016,6 +1016,7 @@ chart2/source/inc/EventListenerHelper.hxx
 chart2/source/inc/ExplicitCategoriesProvider.hxx
 chart2/source/inc/ExponentialRegressionCurveCalculator.hxx
 chart2/source/inc/FillProperties.hxx
+chart2/source/inc/FormattedString.hxx
 chart2/source/inc/FormattedStringHelper.hxx
 chart2/source/inc/InternalData.hxx
 chart2/source/inc/InternalDataProvider.hxx
@@ -1081,7 +1082,6 @@ chart2/source/model/main/DataSeriesProperties.cxx
 chart2/source/model/main/DataSeriesProperties.hxx
 chart2/source/model/main/Diagram.cxx
 chart2/source/model/main/FormattedString.cxx
-chart2/source/model/main/FormattedString.hxx
 chart2/source/model/main/GridProperties.cxx
 chart2/source/model/main/GridProperties.hxx
 chart2/source/model/main/Legend.cxx

Reply via email to