codemaker/source/netmaker/netproduce.cxx            |    3 ++-
 sd/source/core/stlpool.cxx                          |    4 ++--
 unodevtools/source/skeletonmaker/cpptypemaker.cxx   |    4 +++-
 unotools/source/config/bootstrap.cxx                |    4 +++-
 wizards/com/sun/star/wizards/form/FormWizard.java   |   20 ++++++++++----------
 wizards/com/sun/star/wizards/text/TextDocument.java |    7 ++++++-
 xmloff/source/core/xmlmultiimagehelper.cxx          |    4 +++-
 7 files changed, 29 insertions(+), 17 deletions(-)

New commits:
commit 08964038e1432bcda91de1a7e5454ab4e8b114a8
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Sep 22 20:21:01 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Sep 23 09:32:54 2024 +0200

    cid#1607989 Overflowed constant
    
    and
    
    cid#1607976 Overflowed constant
    cid#1607855 Overflowed constant
    cid#1607731 Overflowed constant
    
    Change-Id: I18e8ffb8a9b5a55e0ecb71862549a94ff5c2fc1a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173781
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/codemaker/source/netmaker/netproduce.cxx 
b/codemaker/source/netmaker/netproduce.cxx
index d1fa788f28de..ab3495b9e641 100644
--- a/codemaker/source/netmaker/netproduce.cxx
+++ b/codemaker/source/netmaker/netproduce.cxx
@@ -1204,7 +1204,8 @@ OString NetProducer::getNetName(std::string_view name)
     // if polymorphic, process parameters too
     if (fullNameView.ends_with('>'))
     {
-        size_t start = fullNameView.find_first_of('<') + 1;
+        const std::string_view::size_type nFirstAngle = 
fullNameView.find_first_of('<');
+        size_t start = (nFirstAngle != std::string_view::npos) ? (nFirstAngle 
+ 1) : 0;
         size_t end = fullNameView.size() - 1;
         buffer.append(fullNameView.substr(0, start));
         OString params(fullNameView.substr(start, end - start));
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx 
b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
index 1423f2739a5b..5432957b9e86 100644
--- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
@@ -68,7 +68,9 @@ static void printType(
         if (sort == codemaker::UnoType::Sort::Enum) {
             auto pEnumTypeEntity(dynamic_cast<unoidl::EnumTypeEntity 
*>(entity.get()));
             assert(pEnumTypeEntity);
-            o << OUString(nucleus.substr(nucleus.rfind('.') + 1)) << "_"
+            const std::string_view::size_type nLastDot = nucleus.rfind('.');
+            const auto nAfterDot = (nLastDot != std::string_view::npos) ? 
(nLastDot + 1) : 0;
+            o << OUString(nucleus.substr(nAfterDot)) << "_"
               << pEnumTypeEntity->getMembers()[0].name;
         }
         return;
diff --git a/unotools/source/config/bootstrap.cxx 
b/unotools/source/config/bootstrap.cxx
index 5dcf43ee2942..8804a2229f36 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -415,7 +415,9 @@ char const PERIOD[] = ". ";
 
 static void addFileError(OUStringBuffer& _rBuf, std::u16string_view _aPath, 
AsciiString _sWhat)
 {
-    std::u16string_view sSimpleFileName = _aPath.substr(1 
+_aPath.rfind(cURLSeparator));
+    const std::string_view::size_type nLastSep = _aPath.rfind(cURLSeparator);
+    const auto nAfterSep = (nLastSep != std::string_view::npos) ? (nLastSep + 
1) : 0;
+    std::u16string_view sSimpleFileName = _aPath.substr(nAfterSep);
 
     _rBuf.append("The configuration file");
     _rBuf.append(OUString::Concat(" '") + sSimpleFileName + "' ");
diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx 
b/xmloff/source/core/xmlmultiimagehelper.cxx
index 99e4b1f6080d..87b38a5bc13d 100644
--- a/xmloff/source/core/xmlmultiimagehelper.cxx
+++ b/xmloff/source/core/xmlmultiimagehelper.cxx
@@ -31,7 +31,9 @@ namespace
         OUString sMimeType;
         if (o3tl::starts_with(rString, u"vnd.sun.star.Package"))
         {
-            OString aExtension = 
OUStringToOString(rString.substr(rString.rfind('.') + 1), 
RTL_TEXTENCODING_ASCII_US);
+            const std::string_view::size_type nLastDot = rString.rfind('.');
+            const auto nAfterDot = (nLastDot != std::string_view::npos) ? 
(nLastDot + 1) : 0;
+            OString aExtension = OUStringToOString(rString.substr(nAfterDot), 
RTL_TEXTENCODING_ASCII_US);
             sMimeType = 
comphelper::GraphicMimeTypeHelper::GetMimeTypeForExtension(aExtension);
         }
         return sMimeType;
commit dcde476695d287d836e74a1cb5cc42379aa6a469
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Sep 22 20:14:39 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Sep 23 09:32:46 2024 +0200

    SfxStyleSheetBase::GetHelpId return sal_uInt32
    
    Change-Id: I52c5ed939fd4cf26bf9f94651681650047f90030
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173780
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 0c6e45677c08..8ab0716d533f 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -923,7 +923,7 @@ void SdStyleSheetPool::UpdateStdNames()
         if( !pStyle->IsUserDefined() )
         {
             OUString aOldName   = pStyle->GetName();
-            sal_uLong nHelpId   = pStyle->GetHelpId( aHelpFile );
+            sal_uInt32 nHelpId   = pStyle->GetHelpId( aHelpFile );
             SfxStyleFamily eFam = pStyle->GetFamily();
 
             bool bHelpKnown = true;
@@ -1060,7 +1060,7 @@ void SdStyleSheetPool::PutNumBulletItem( 
SfxStyleSheetBase* pSheet,
                                          vcl::Font& rBulletFont )
 {
     OUString aHelpFile;
-    sal_uLong nHelpId = pSheet->GetHelpId( aHelpFile );
+    sal_uInt32 nHelpId = pSheet->GetHelpId( aHelpFile );
     SfxItemSet& rSet = pSheet->GetItemSet();
 
     switch ( nHelpId )
commit 1db66dbdc0336c7de5916a14cbbc0d6a8be50f30
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Sep 22 19:35:38 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Sep 23 09:32:39 2024 +0200

    cid#1606721 PA: Public Attribute
    
    Change-Id: I2d5c28e7fb220426b5a7c4881e35a4d269322883
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173778
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/wizards/com/sun/star/wizards/form/FormWizard.java 
b/wizards/com/sun/star/wizards/form/FormWizard.java
index 4534d8ac5b35..70e9f01c3b73 100644
--- a/wizards/com/sun/star/wizards/form/FormWizard.java
+++ b/wizards/com/sun/star/wizards/form/FormWizard.java
@@ -215,7 +215,7 @@ public class FormWizard extends DatabaseObjectWizard
     {
         curDBCommandFieldSelection = new CommandFieldSelection(this, 
curFormDocument.oMainFormDBMetaData, 92, slblFields, slblSelFields, slblTables, 
true, 34411);
         curDBCommandFieldSelection.addFieldSelectionListener(new 
FieldSelectionListener());
-        curFormDocument.xProgressBar.setValue(20);
+        curFormDocument.getProgressBar().setValue(20);
         // Label Help Text
         insertLabel("lblBinaryHelpText",
                 new String[]
@@ -231,7 +231,7 @@ public class FormWizard extends DatabaseObjectWizard
                 });
 
         curFormConfiguration = new FormConfiguration(this);
-        curFormDocument.xProgressBar.setValue(30);
+        curFormDocument.getProgressBar().setValue(30);
 
         curSubFormFieldSelection = new CommandFieldSelection(this, 
curFormDocument.oSubFormDBMetaData, SOSUBFORMFIELDS_PAGE, 92, slblFields, 
slblSelFields, slblTables, true, 34431);
         curSubFormFieldSelection.addFieldSelectionListener(new 
FieldSelectionListener());
@@ -248,27 +248,27 @@ public class FormWizard extends DatabaseObjectWizard
                     28, sShowBinaryFields, Boolean.TRUE, 95, 154, 
Integer.valueOf(SOSUBFORMFIELDS_PAGE), 210
                 });
 
-        curFormDocument.xProgressBar.setValue(40);
+        curFormDocument.getProgressBar().setValue(40);
 
         curFieldLinker = new FieldLinker(this, SOFIELDLINKER_PAGE, 30, 34441);
-        curFormDocument.xProgressBar.setValue(50);
+        curFormDocument.getProgressBar().setValue(50);
 
         curControlArranger = new UIControlArranger(this, curFormDocument);
         curFormDocument.addUIFormController(curControlArranger);
-        curFormDocument.xProgressBar.setValue(60);
+        curFormDocument.getProgressBar().setValue(60);
 
         CurDataEntrySetter = new DataEntrySetter(this);
-        curFormDocument.xProgressBar.setValue(70);
+        curFormDocument.getProgressBar().setValue(70);
 
         curStyleApplier = new StyleApplier(this, curFormDocument);
         curFormDocument.addStyleApplier(curStyleApplier);
-        curFormDocument.xProgressBar.setValue(80);
+        curFormDocument.getProgressBar().setValue(80);
 
         curFinalizer = new Finalizer(this);
-        curFormDocument.xProgressBar.setValue(100);
+        curFormDocument.getProgressBar().setValue(100);
 
         enableNavigationButtons(false, false, false);
-        curFormDocument.xProgressBar.end();
+        curFormDocument.getProgressBar().end();
     }
 
     // @Override
@@ -340,7 +340,7 @@ public class FormWizard extends DatabaseObjectWizard
                         {
                             
Properties.createProperty(PropertyNames.ACTIVE_CONNECTION, 
curFormDocument.oMainFormDBMetaData.DBConnection)
                         });
-                curFormDocument.xProgressBar.setValue(20);
+                curFormDocument.getProgressBar().setValue(20);
                 buildSteps();
                 
this.curDBCommandFieldSelection.preselectCommand(m_wizardContext, false);
                 XWindowPeer xWindowPeer2 = 
createWindowPeer(curFormDocument.xWindowPeer);
diff --git a/wizards/com/sun/star/wizards/text/TextDocument.java 
b/wizards/com/sun/star/wizards/text/TextDocument.java
index 710c73a9b494..bc050b07d1b1 100644
--- a/wizards/com/sun/star/wizards/text/TextDocument.java
+++ b/wizards/com/sun/star/wizards/text/TextDocument.java
@@ -50,7 +50,7 @@ public class TextDocument
 
     public XComponent xComponent;
     protected com.sun.star.text.XTextDocument xTextDocument;
-    public com.sun.star.task.XStatusIndicator xProgressBar;
+    protected com.sun.star.task.XStatusIndicator xProgressBar;
     public com.sun.star.frame.XFrame xFrame;
     public XText xText;
     public XMultiServiceFactory xMSFDoc;
@@ -232,6 +232,11 @@ public class TextDocument
         return xTextDocument;
     }
 
+    public com.sun.star.task.XStatusIndicator getProgressBar()
+    {
+        return xProgressBar;
+    }
+
     private Size getPageSize()
     {
         try

Reply via email to