sd/source/filter/html/htmlex.cxx     |   12 +++---------
 sd/source/filter/html/htmlex.hxx     |    2 +-
 sd/source/ui/inc/NotesPanelView.hxx  |    2 +-
 sd/source/ui/view/NotesPanelView.cxx |    6 ++----
 sw/inc/crsrsh.hxx                    |    4 ++--
 sw/source/core/crsr/crbm.cxx         |    8 ++++----
 sw/source/core/crsr/crstrvl.cxx      |    2 +-
 sw/source/uibase/wrtsh/wrtsh1.cxx    |    4 ++--
 8 files changed, 16 insertions(+), 24 deletions(-)

New commits:
commit 6c934fca37c747b5c77fa1ce21c7fef9c3df8689
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Apr 19 14:42:50 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Apr 20 10:02:12 2024 +0200

    loplugin:constantparam in sd
    
    Change-Id: I4943244d8c08d1d86e4c1ff9177b00cfa451e453
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166315
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index c076e3c9c2a9..ba592d75e32c 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -631,8 +631,6 @@ constexpr OUStringLiteral gaHTMLHeader(
             "     \"http://www.w3.org/TR/html4/transitional.dtd\";>
"
             "<html>
<head>
" );
 
-constexpr OUStringLiteral gaHTMLExtension = u"" STR_HTMLEXP_DEFAULT_EXTENSION;
-
 // constructor for the html export helper classes
 HtmlExport::HtmlExport(
     OUString aPath,
@@ -718,7 +716,7 @@ void HtmlExport::ExportSingleDocument()
     // close page
     aStr.append("</body>
</html>");
 
-    WriteHtml(maDocFileName, false, aStr);
+    WriteHtml(maDocFileName, aStr);
 
     pOutliner->Clear();
     ResetProgress();
@@ -758,17 +756,13 @@ OUString HtmlExport::DocumentMetadata() const
 
 /** exports the given html data into a non unicode file in the current export 
path with
     the given filename */
-bool HtmlExport::WriteHtml( const OUString& rFileName, bool bAddExtension, 
std::u16string_view rHtmlData )
+bool HtmlExport::WriteHtml( std::u16string_view rFileName, std::u16string_view 
rHtmlData )
 {
     ErrCode nErr = ERRCODE_NONE;
 
-    OUString aFileName( rFileName );
-    if( bAddExtension )
-        aFileName += gaHTMLExtension;
-
     EasyFile aFile;
     SvStream* pStr;
-    OUString aFull(maExportPath + aFileName);
+    OUString aFull(maExportPath + rFileName);
     nErr = aFile.createStream(aFull , pStr);
     if(nErr == ERRCODE_NONE)
     {
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index 719c8cf27350..2aa40700b8ab 100644
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -71,7 +71,7 @@ class HtmlExport final
     void Init();
     void ExportSingleDocument();
 
-    bool WriteHtml( const OUString& rFileName, bool bAddExtension, 
std::u16string_view rHtmlData );
+    bool WriteHtml( std::u16string_view rFileName, std::u16string_view 
rHtmlData );
 
  public:
     HtmlExport(OUString aPath,
diff --git a/sd/source/ui/inc/NotesPanelView.hxx 
b/sd/source/ui/inc/NotesPanelView.hxx
index 9f2b71523c09..c9e185b321ba 100644
--- a/sd/source/ui/inc/NotesPanelView.hxx
+++ b/sd/source/ui/inc/NotesPanelView.hxx
@@ -71,7 +71,7 @@ public:
     SdOutliner& GetOutliner() { return maOutliner; }
 
     void FillOutliner();
-    void onUpdateStyleSettings(bool bForceUpdate);
+    void onUpdateStyleSettings();
     virtual SvtScriptType GetScriptType() const override;
 
     void SetLinks();
diff --git a/sd/source/ui/view/NotesPanelView.cxx 
b/sd/source/ui/view/NotesPanelView.cxx
index a2ae58e48331..02c750db52e3 100644
--- a/sd/source/ui/view/NotesPanelView.cxx
+++ b/sd/source/ui/view/NotesPanelView.cxx
@@ -47,7 +47,7 @@ NotesPanelView::NotesPanelView(DrawDocShell& rDocSh, 
vcl::Window* pWindow,
         ::tools::Rectangle{ Point(0, 0), 
mrNotesPanelViewShell.GetActiveWindow()->GetViewSize() });
     maOutliner.InsertView(&maOutlinerView, EE_APPEND);
 
-    onUpdateStyleSettings(true);
+    onUpdateStyleSettings();
 
     // fill Outliner with contents
     FillOutliner();
@@ -178,12 +178,10 @@ void NotesPanelView::Notify(SfxBroadcaster&, const 
SfxHint& rHint)
 
 OutlinerView* NotesPanelView::GetOutlinerView() { return &maOutlinerView; }
 
-void NotesPanelView::onUpdateStyleSettings(bool bForceUpdate /* = false */)
+void NotesPanelView::onUpdateStyleSettings()
 {
     svtools::ColorConfig aColorConfig;
     const Color 
aDocColor(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor);
-    if (!(bForceUpdate || (maDocColor != aDocColor)))
-        return;
 
     maOutlinerView.SetBackgroundColor(aDocColor);
     if (vcl::Window* pWindow = maOutlinerView.GetWindow())
commit a7933203b79adc0b5f8a72a9dc51633df9ded283
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Apr 19 14:37:34 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Apr 20 10:02:03 2024 +0200

    loplugin:constantparam in sw
    
    Change-Id: Ibb4d4d1cca59ece6bcd28e887f84d657dedee756
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166314
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 5b0031882487..1d85ce278736 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -591,8 +591,8 @@ public:
 
     bool IsFormProtected();
     ::sw::mark::IFieldmark* GetCurrentFieldmark();
-    sw::mark::IFieldmark* GetFieldmarkAfter(bool bLoop);
-    sw::mark::IFieldmark* GetFieldmarkBefore(bool bLoop);
+    sw::mark::IFieldmark* GetFieldmarkAfter();
+    sw::mark::IFieldmark* GetFieldmarkBefore();
     bool GotoFieldmark( const ::sw::mark::IFieldmark* const pMark, bool 
completeSelection = false );
 
     // update Cursr, i.e. reset it into content should only be called when the
diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx
index fbc2ab28e1da..15b1bba2b1b6 100644
--- a/sw/source/core/crsr/crbm.cxx
+++ b/sw/source/core/crsr/crbm.cxx
@@ -290,16 +290,16 @@ bool SwCursorShell::IsFormProtected()
     return getIDocumentMarkAccess()->getInnerFieldmarkFor(pos);
 }
 
-sw::mark::IFieldmark* SwCursorShell::GetFieldmarkAfter(bool bLoop)
+sw::mark::IFieldmark* SwCursorShell::GetFieldmarkAfter()
 {
     SwPosition pos(*GetCursor()->GetPoint());
-    return getIDocumentMarkAccess()->getFieldmarkAfter(pos, bLoop);
+    return getIDocumentMarkAccess()->getFieldmarkAfter(pos, /*bLoop*/true);
 }
 
-sw::mark::IFieldmark* SwCursorShell::GetFieldmarkBefore(bool bLoop)
+sw::mark::IFieldmark* SwCursorShell::GetFieldmarkBefore()
 {
     SwPosition pos(*GetCursor()->GetPoint());
-    return getIDocumentMarkAccess()->getFieldmarkBefore(pos, bLoop);
+    return getIDocumentMarkAccess()->getFieldmarkBefore(pos, /*bLoop*/true);
 }
 
 bool SwCursorShell::GotoFieldmark(::sw::mark::IFieldmark const * const pMark, 
bool completeSelection)
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 3972071383ab..2abfb959a46d 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -938,7 +938,7 @@ void SwCursorShell::GotoFormControl(bool bNext)
     if (aFormMap.begin() == aFormMap.end())
     {
         // only legacy fields exist. Avoid reprocessing everything and use 
legacy code path.
-        GotoFieldmark(bNext ? GetFieldmarkAfter(/*Loop=*/true) : 
GetFieldmarkBefore(/*Loop=*/true));
+        GotoFieldmark(bNext ? GetFieldmarkAfter() : GetFieldmarkBefore());
         return;
     }
 
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index bb90ab645d1c..4337fede35d7 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -2004,7 +2004,7 @@ SwWrtShell::SwWrtShell( SwWrtShell& rSh, vcl::Window 
*_pWin, SwView &rShell )
 
     // place the cursor on the first field...
     IFieldmark *pBM = nullptr;
-    if (IsFormProtected() && (pBM = GetFieldmarkAfter(/*bLoop=*/true)) 
!=nullptr) {
+    if (IsFormProtected() && (pBM = GetFieldmarkAfter()) !=nullptr) {
         GotoFieldmark(pBM);
     }
 }
@@ -2022,7 +2022,7 @@ SwWrtShell::SwWrtShell( SwDoc& rDoc, vcl::Window *_pWin, 
SwView &rShell,
 
     // place the cursor on the first field...
     IFieldmark *pBM = nullptr;
-    if (IsFormProtected() && (pBM = GetFieldmarkAfter(/*bLoop=*/true)) 
!=nullptr) {
+    if (IsFormProtected() && (pBM = GetFieldmarkAfter()) !=nullptr) {
         GotoFieldmark(pBM);
     }
 }

Reply via email to