[Libreoffice-commits] core.git: 6 commits - lotuswordpro/source

David Tardon (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 12 17:05:44 UTC 2020


 lotuswordpro/source/filter/lwpdoc.cxx         |   16 ++++++++--------
 lotuswordpro/source/filter/lwpfoundry.cxx     |    1 -
 lotuswordpro/source/filter/lwpframelayout.cxx |    2 +-
 lotuswordpro/source/filter/lwptablelayout.cxx |    3 +--
 lotuswordpro/source/filter/lwptabrack.cxx     |    3 +--
 5 files changed, 11 insertions(+), 14 deletions(-)

New commits:
commit 05664c6ffae062a19ff3aa3e0949354d2586919d
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Fri Jun 12 17:01:40 2020 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Fri Jun 12 19:05:09 2020 +0200

    return directly
    
    Change-Id: Ia5ebadfd825b0cbd106893f0b7b25e28b878dfeb

diff --git a/lotuswordpro/source/filter/lwptabrack.cxx b/lotuswordpro/source/filter/lwptabrack.cxx
index 84a80decd93b..3aea3905e653 100644
--- a/lotuswordpro/source/filter/lwptabrack.cxx
+++ b/lotuswordpro/source/filter/lwptabrack.cxx
@@ -118,8 +118,7 @@ LwpTab* LwpTabRack::Lookup(sal_uInt16 nIndex)
 
 LwpTabRack* LwpTabRack::GetNext()
 {
-    LwpTabRack* pTabRack = dynamic_cast<LwpTabRack*>(m_NextID.obj().get());
-    return pTabRack;
+    return dynamic_cast<LwpTabRack*>(m_NextID.obj().get());
 }
 
 sal_uInt16 LwpTabRack::GetNumTabs()
commit 0bc6b243746837433713804b430f7ade44b9c8c0
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Fri Jun 12 17:00:34 2020 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Fri Jun 12 19:05:09 2020 +0200

    return directly
    
    Change-Id: I727a34213fef5adefdc6c1a046d47a7f37cfdcd0

diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index fbfc35174dd7..95aaf13715fc 100644
--- a/lotuswordpro/source/filter/lwptablelayout.cxx
+++ b/lotuswordpro/source/filter/lwptablelayout.cxx
@@ -514,8 +514,7 @@ LwpSuperTableLayout * LwpTableLayout::GetSuperTableLayout()
  */
 LwpTable *  LwpTableLayout::GetTable()
 {
-    LwpTable *pTable = dynamic_cast<LwpTable *>(m_Content.obj().get());
-    return pTable;
+    return dynamic_cast<LwpTable *>(m_Content.obj().get());
 }
 /**
  * @short   Get column style name by column ID
commit 06248bbaf21723f505d99c65906e5c6781c54c83
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Fri Jun 12 16:41:07 2020 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Fri Jun 12 19:05:08 2020 +0200

    use dynamic_cast
    
    Change-Id: Iac420c2dd37be392ae817e0433de68c983546667

diff --git a/lotuswordpro/source/filter/lwpframelayout.cxx b/lotuswordpro/source/filter/lwpframelayout.cxx
index 01be3544108d..feb6f76266f1 100644
--- a/lotuswordpro/source/filter/lwpframelayout.cxx
+++ b/lotuswordpro/source/filter/lwpframelayout.cxx
@@ -1166,7 +1166,7 @@ void LwpDropcapLayout::XFConvert(XFContentContainer* pCont)
 
 void LwpDropcapLayout::RegisterStyle(LwpFoundry* pFoundry)
 {
-    LwpStory* pStory = static_cast<LwpStory*>(m_Content.obj(VO_STORY).get());
+    LwpStory* pStory = dynamic_cast<LwpStory*>(m_Content.obj(VO_STORY).get());
     if (pStory)
     {
         pStory->SetDropcapFlag(true);
commit 9dfa1d2f9fd94b5a8d25c8dccb2bd674886a12ba
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Fri Jun 12 16:36:06 2020 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Fri Jun 12 19:05:08 2020 +0200

    drop misleading comment
    
    Change-Id: I2ae4b9dbcf3134ec5301d14c32d6904817d350fb

diff --git a/lotuswordpro/source/filter/lwpfoundry.cxx b/lotuswordpro/source/filter/lwpfoundry.cxx
index 2a17efbe8ae2..d18dcd3903b6 100644
--- a/lotuswordpro/source/filter/lwpfoundry.cxx
+++ b/lotuswordpro/source/filter/lwpfoundry.cxx
@@ -266,7 +266,6 @@ LwpObjectID * LwpFoundry::GetDefaultTextStyle()
 */
 LwpObjectID * LwpFoundry::FindParaStyleByName(const OUString& name)
 {
-    //Register all text styles: para styles, character styles
     LwpDLVListHeadHolder* pParaStyleHolder = dynamic_cast<LwpDLVListHeadHolder*>(GetTextStyleHead().obj().get());
     if(pParaStyleHolder)
     {
commit d65d11343d975cc4e278deca54d166aeff0aa850
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Fri Jun 12 16:30:40 2020 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Fri Jun 12 19:05:08 2020 +0200

    rename variable
    
    Change-Id: I24e0902998420685656a350cb849a19d8c7a8a35

diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx
index 8aab1b5fb68e..7dc59e13e75a 100644
--- a/lotuswordpro/source/filter/lwpdoc.cxx
+++ b/lotuswordpro/source/filter/lwpdoc.cxx
@@ -231,19 +231,19 @@ void LwpDocument::RegisterStyle()
 void LwpDocument::RegisterTextStyles()
 {
     //Register all text styles: para styles, character styles
-    LwpDLVListHeadHolder* pParaStyleHolder = m_xOwnedFoundry
+    LwpDLVListHeadHolder* pTextStyleHolder = m_xOwnedFoundry
         ? dynamic_cast<LwpDLVListHeadHolder*>(m_xOwnedFoundry->GetTextStyleHead().obj().get())
         : nullptr;
-    if(pParaStyleHolder)
+    if(pTextStyleHolder)
     {
-        LwpTextStyle* pParaStyle = dynamic_cast<LwpTextStyle*> (pParaStyleHolder->GetHeadID().obj().get());
-        while(pParaStyle)
+        LwpTextStyle* pTextStyle = dynamic_cast<LwpTextStyle*> (pTextStyleHolder->GetHeadID().obj().get());
+        while(pTextStyle)
         {
-            if (pParaStyle->GetFoundry())
+            if (pTextStyle->GetFoundry())
                 throw std::runtime_error("loop in register text style");
-            pParaStyle->SetFoundry(m_xOwnedFoundry.get());
-            pParaStyle->RegisterStyle();
-            pParaStyle = dynamic_cast<LwpTextStyle*>(pParaStyle->GetNext().obj().get());
+            pTextStyle->SetFoundry(m_xOwnedFoundry.get());
+            pTextStyle->RegisterStyle();
+            pTextStyle = dynamic_cast<LwpTextStyle*>(pTextStyle->GetNext().obj().get());
         }
     }
     ChangeStyleName();//for click here block
commit 12cb753350f429e39064365b05926a30a008a516
Author:     David Tardon <dtardon at redhat.com>
AuthorDate: Fri Jun 12 16:22:22 2020 +0200
Commit:     David Tardon <dtardon at redhat.com>
CommitDate: Fri Jun 12 19:02:29 2020 +0200

    cast to the right type
    
    This makes paragraph formatting in LWP documents work again (for the
    first time since 3.3).
    
    Regression from commit d2a1c2d4cfa51b6ee8a7f38baa258633fae9ec6d
    "fix what there is to fix"
    
    Change-Id: I057aeb996837f7c19815de8a5379861ce3c0e8cd

diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx
index df248a5757e7..8aab1b5fb68e 100644
--- a/lotuswordpro/source/filter/lwpdoc.cxx
+++ b/lotuswordpro/source/filter/lwpdoc.cxx
@@ -243,7 +243,7 @@ void LwpDocument::RegisterTextStyles()
                 throw std::runtime_error("loop in register text style");
             pParaStyle->SetFoundry(m_xOwnedFoundry.get());
             pParaStyle->RegisterStyle();
-            pParaStyle = dynamic_cast<LwpParaStyle*>(pParaStyle->GetNext().obj().get());
+            pParaStyle = dynamic_cast<LwpTextStyle*>(pParaStyle->GetNext().obj().get());
         }
     }
     ChangeStyleName();//for click here block


More information about the Libreoffice-commits mailing list