include/svx/svdpage.hxx                         |    2 --
 sd/inc/sdpage.hxx                               |    2 +-
 sd/source/core/drawdoc3.cxx                     |    2 +-
 sd/source/core/stlfamily.cxx                    |   11 +++++------
 sd/source/ui/view/outlnvsh.cxx                  |    2 +-
 svx/source/svdraw/svdpage.cxx                   |    5 -----
 sw/inc/doc.hxx                                  |    8 ++++----
 sw/source/core/doc/DocumentStylePoolManager.cxx |    4 ++--
 sw/source/core/doc/docfmt.cxx                   |   10 +++++-----
 9 files changed, 19 insertions(+), 27 deletions(-)

New commits:
commit 235c230cd348600ce7385cc580c45a7be3572704
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Mon Oct 21 17:39:31 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Oct 22 09:17:02 2024 +0200

    We don't need a virtual here
    
    Only known SdPages need this
    
    Change-Id: Id504cd1ec318fa8cce43d11f03c628e7457f7634
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175369
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index f64af22e1353..8371d080cbe2 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -528,8 +528,6 @@ public:
     const SdrLayerAdmin& GetLayerAdmin() const;
     SdrLayerAdmin& GetLayerAdmin();
 
-    virtual OUString GetLayoutName() const;
-
     /// for snap-to-grid in Writer, also for AlignObjects if 1 object is marked
     /// if pRect != null, then the pages that are intersected by this Rect,
     /// otherwise the visible pages
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index 317e99160a18..df3a657317b5 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -248,7 +248,7 @@ public:
                          const ::tools::Rectangle& rOldBoundRect) override;
 
     void             SetLayoutName(const OUString& aName);
-    virtual OUString GetLayoutName() const override       { return 
maLayoutName; }
+    const OUString& GetLayoutName() const { return maLayoutName; }
 
     void            SetFileName(const OUString& aName) { maFileName = aName; }
     const OUString& GetFileName() const       { return maFileName; }
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 3b2c64f10888..77975328daed 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -1386,7 +1386,7 @@ static bool isMasterPageLayoutNameUnique(const 
SdDrawDocument& rDoc, std::u16str
 
     for(sal_uInt16 a(0); a < nPageCount; a++)
     {
-        const SdrPage* pCandidate = rDoc.GetMasterPage(a);
+        const SdPage* pCandidate = static_cast<const 
SdPage*>(rDoc.GetMasterPage(a));
         OUString aPageLayoutName(pCandidate->GetLayoutName());
         sal_Int32 nIndex = aPageLayoutName.indexOf(SD_LT_SEPARATOR);
         if( nIndex != -1 )
diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx
index 9696668dc326..2262ef1203d2 100644
--- a/sd/source/core/stlfamily.cxx
+++ b/sd/source/core/stlfamily.cxx
@@ -192,12 +192,11 @@ OUString SAL_CALL SdStyleFamily::getName()
         if( pPage == nullptr )
             throw DisposedException();
 
-        OUString aLayoutName( pPage->GetLayoutName() );
-        sal_Int32 nIndex = aLayoutName.indexOf(SD_LT_SEPARATOR);
-        if( nIndex != -1 )
-            aLayoutName = aLayoutName.copy(0, nIndex);
-
-        return aLayoutName;
+        const OUString& rLayoutName = pPage->GetLayoutName();
+        sal_Int32 nIndex = rLayoutName.indexOf(SD_LT_SEPARATOR);
+        if (nIndex != -1)
+            return rLayoutName.copy(0, nIndex);
+        return rLayoutName;
     }
     else
     {
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 8fcd132ff3de..90fa7e8cafdb 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1318,7 +1318,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
         if( nPos >= GetDoc()->GetSdPageCount( PageKind::Standard ) )
             nPos = 0;
 
-        SdrPage* pPage = GetDoc()->GetSdPage( static_cast<sal_uInt16>(nPos), 
PageKind::Standard );
+        SdPage* pPage = GetDoc()->GetSdPage( static_cast<sal_uInt16>(nPos), 
PageKind::Standard );
 
         if (GetDoc()->GetDocumentType() == DocumentType::Draw)
             aPageStr = SdResId(STR_SD_PAGE_COUNT_DRAW);
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index db4a041c577d..bb82ecb9289e 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1742,11 +1742,6 @@ SdrLayerAdmin& SdrPage::GetLayerAdmin()
     return *mpLayerAdmin;
 }
 
-OUString SdrPage::GetLayoutName() const
-{
-    return OUString();
-}
-
 void SdrPage::SetInserted( bool bIns )
 {
     if( mbInserted == bIns )
commit 030cca8864262b65557f99df791900d52fee2f0e
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Mon Oct 21 16:19:26 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue Oct 22 09:16:52 2024 +0200

    drop newly unused Broadcast argument
    
    Change-Id: I80b4689bb6fe48e37217d5eb45007326672303fe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175362
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 1dc75f7f352c..e90b2b0278f5 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -350,7 +350,7 @@ private:
                                 SwFrameFormat* );
     sal_Int8 SetFlyFrameAnchor( SwFrameFormat& rFlyFormat, SfxItemSet& rSet, 
bool bNewFrames );
 
-    typedef SwFormat* (SwDoc::*FNCopyFormat)( const OUString&, SwFormat*, 
bool, bool );
+    typedef SwFormat* (SwDoc::*FNCopyFormat)( const OUString&, SwFormat*, bool 
);
     SwFormat* CopyFormat( const SwFormat& rFormat, const SwFormatsBase& 
rFormatArr,
                         FNCopyFormat fnCopyFormat, const SwFormat& rDfltFormat 
);
     void CopyFormatArr( const SwFormatsBase& rSourceArr, SwFormatsBase const & 
rDestArr,
@@ -391,11 +391,11 @@ private:
     DECL_LINK( DoUpdateModifiedOLE, Timer *, void );
 
 public:
-    SW_DLLPUBLIC SwFormat *MakeCharFormat_(const OUString &, SwFormat *, bool, 
bool );
-    SwFormat *MakeFrameFormat_(const OUString &, SwFormat *, bool, bool );
+    SW_DLLPUBLIC SwFormat *MakeCharFormat_(const OUString &, SwFormat *, bool 
);
+    SwFormat *MakeFrameFormat_(const OUString &, SwFormat *, bool );
 
 private:
-    SwFormat *MakeTextFormatColl_(const OUString &, SwFormat *, bool, bool );
+    SwFormat *MakeTextFormatColl_(const OUString &, SwFormat *, bool );
 
 private:
     OUString msDocAccTitle;
diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx 
b/sw/source/core/doc/DocumentStylePoolManager.cxx
index d6b05b84c99d..03bcee46f1bf 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -1554,10 +1554,10 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( 
sal_uInt16 nId )
             switch (nId & (COLL_GET_RANGE_BITS + POOLGRP_NOCOLLID) )
             {
                 case POOLGRP_CHARFMT:
-                    pNewFormat = m_rDoc.MakeCharFormat_(aNm, pDeriveFormat, 
false, true);
+                    pNewFormat = m_rDoc.MakeCharFormat_(aNm, pDeriveFormat, 
true);
                     break;
                 case POOLGRP_FRAMEFMT:
-                    pNewFormat = m_rDoc.MakeFrameFormat_(aNm, pDeriveFormat, 
false, true);
+                    pNewFormat = m_rDoc.MakeFrameFormat_(aNm, pDeriveFormat, 
true);
                     break;
                 default:
                     break;
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index bb1ef4788b84..0c48355c6417 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -836,7 +836,7 @@ SwFrameFormat *SwDoc::MakeFrameFormat(const OUString 
&rFormatName,
 
 SwFormat *SwDoc::MakeFrameFormat_(const OUString &rFormatName,
                             SwFormat *pDerivedFrom,
-                            bool /*bBroadcast*/, bool bAuto)
+                            bool bAuto)
 {
     SwFrameFormat *pFrameFormat = dynamic_cast<SwFrameFormat*>(pDerivedFrom);
     pFrameFormat = MakeFrameFormat( rFormatName, pFrameFormat, bAuto );
@@ -862,7 +862,7 @@ SwCharFormat *SwDoc::MakeCharFormat( const OUString 
&rFormatName,
 
 SwFormat *SwDoc::MakeCharFormat_(const OUString &rFormatName,
                             SwFormat *pDerivedFrom,
-                            bool /*bBroadcast*/, bool /*bAuto*/)
+                            bool /*bAuto*/)
 {
     SwCharFormat *pCharFormat = dynamic_cast<SwCharFormat*>(pDerivedFrom);
     pCharFormat = MakeCharFormat( rFormatName, pCharFormat );
@@ -891,7 +891,7 @@ SwTextFormatColl* SwDoc::MakeTextFormatColl( const OUString 
&rFormatName,
 
 SwFormat *SwDoc::MakeTextFormatColl_(const OUString &rFormatName,
                             SwFormat *pDerivedFrom,
-                            bool /*bBroadcast*/, bool /*bAuto*/)
+                            bool /*bAuto*/)
 {
     SwTextFormatColl *pTextFormatColl = 
dynamic_cast<SwTextFormatColl*>(pDerivedFrom);
     pTextFormatColl = MakeTextFormatColl( rFormatName, pTextFormatColl );
@@ -1149,7 +1149,7 @@ SwFormat* SwDoc::CopyFormat( const SwFormat& rFormat,
 
     // Create the format and copy the attributes
     // #i40550#
-    SwFormat* pNewFormat = (this->*fnCopyFormat)( rFormat.GetName(), pParent, 
false, true );
+    SwFormat* pNewFormat = (this->*fnCopyFormat)( rFormat.GetName(), pParent, 
true );
     pNewFormat->SetAuto( rFormat.IsAuto() );
     pNewFormat->CopyAttrs( rFormat );           // copy the attributes
 
@@ -1290,7 +1290,7 @@ void SwDoc::CopyFormatArr( const SwFormatsBase& 
rSourceArr,
                 MakeCondTextFormatColl( pSrc->GetName(), 
static_cast<SwTextFormatColl*>(&rDfltFormat) );
             else
                 // #i40550#
-                (this->*fnCopyFormat)( pSrc->GetName(), &rDfltFormat, false, 
true );
+                (this->*fnCopyFormat)( pSrc->GetName(), &rDfltFormat, true );
         }
     }
 

Reply via email to