[Libreoffice-commits] core.git: 8 commits - officecfg/Configuration_officecfg.mk officecfg/registry postprocess/CustomTarget_registry.mk reportdesign/source scp2/source scripting/source sc/source sd/source sw/source unoidl/source

Caolán McNamara caolanm at redhat.com
Fri Oct 24 05:43:39 PDT 2014


 officecfg/Configuration_officecfg.mk                     |    1 
 officecfg/registry/data/org/openoffice/Office/Common.xcu |    5 -
 postprocess/CustomTarget_registry.mk                     |    5 -
 reportdesign/source/ui/dlg/CondFormat.cxx                |    2 
 sc/source/ui/miscdlgs/conflictsdlg.cxx                   |    4 -
 scp2/source/ooo/common_brand.scp                         |    8 --
 scripting/source/provider/ActiveMSPList.cxx              |   43 +++++++--------
 scripting/source/provider/ActiveMSPList.hxx              |    5 +
 sd/source/ui/controller/slidelayoutcontroller.cxx        |    2 
 sw/source/core/layout/paintfrm.cxx                       |    2 
 unoidl/source/sourcefileprovider.cxx                     |    5 -
 11 files changed, 32 insertions(+), 50 deletions(-)

New commits:
commit e0108fa4fc954f39ef56b841dceb6a2d27d5618c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 24 12:51:33 2014 +0100

    make Korean ReplaceSingleQuote the same as everyone else
    
    I can find no evidence that Korean out of all languages on earth needs a
    different default for ReplaceSingleQuote
    
    This appeared in
    
    commit e9f10288e0e5f2519ff3da1e2de2c20a99fd9779
    Date:   Mon Jul 5 12:32:15 2004 +0000
        2004/06/07 18:46:25 jb 1.14.78.1: #i25937# Add module settings (migrated from scp2) to xcu source files
    
    but that's a migration of the original
    GID_CONFIGURATIONITEM_SWRITER_KOREAN_ENABLE_SINGLEQUOTE which existed in the
    original scp (pre scp2) and appeared between OpenOffice.org 1.0 and 1.1.5, but
    the cvs repos to explain all that are long dead and there is no sign of a bug
    in a bugzilla query, so it suggests this was an internal StarOffice thing.
    
    Change-Id: I14dfe75d28d3ec5a68b262f768c7dbe73e94131d

diff --git a/officecfg/Configuration_officecfg.mk b/officecfg/Configuration_officecfg.mk
index 5f345b7..7e2af03 100644
--- a/officecfg/Configuration_officecfg.mk
+++ b/officecfg/Configuration_officecfg.mk
@@ -94,7 +94,6 @@ $(eval $(call gb_Configuration_add_spool_modules,registry,officecfg/registry/dat
 	org/openoffice/Office/Common-cjk.xcu \
 	org/openoffice/Office/Common-ctl.xcu \
 	org/openoffice/Office/Common-ctlseqcheck.xcu \
-	org/openoffice/Office/Common-korea.xcu \
 	org/openoffice/Office/DataAccess-evoab2.xcu \
 	org/openoffice/Office/DataAccess-reportbuilder.xcu \
 	org/openoffice/Office/Paths-macosx.xcu \
diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 6225b9e..407be35 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -139,11 +139,6 @@
       <value>${DICT_REPO_URL}</value>
     </prop>
   </node>
-  <node oor:name="AutoCorrect">
-    <prop oor:name="ReplaceSingleQuote" install:module="korea">
-      <value>true</value>
-    </prop>
-  </node>
   <node oor:name="I18N">
     <node oor:name="CTL">
       <prop oor:name="CTLFont" install:module="ctl">
diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk
index 878be8d..a568832 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -27,7 +27,6 @@ postprocess_XCDS := \
 	draw.xcd \
 	graphicfilter.xcd \
 	impress.xcd \
-	korea.xcd \
 	librelogo.xcd \
 	lingucomponent.xcd \
 	main.xcd \
@@ -113,10 +112,6 @@ postprocess_FILES_librelogo := \
 	$(postprocess_MOD)/org/openoffice/Office/Addons-librelogo.xcu \
 	$(postprocess_MOD)/org/openoffice/Office/UI/WriterWindowState-librelogo.xcu
 
-postprocess_DEPS_korea := main
-postprocess_FILES_korea := \
-	$(postprocess_MOD)/org/openoffice/Office/Common-korea.xcu
-
 postprocess_DEPS_lingucomponent := main
 postprocess_FILES_lingucomponent := \
 	$(SRCDIR)/lingucomponent/config/Linguistic-lingucomponent-hyphenator.xcu \
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 0551e95..8c08811 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -104,7 +104,6 @@ Module gid_Module_Langpack_Brand_Template
             gid_Brand_Dir_Readme);
     Files = (gid_Brand_File_Readme_Readme,
              gid_Brand_File_Share_Registry_Cjk_Xcd,
-             gid_Brand_File_Share_Registry_Korea_Xcd,
              gid_Brand_File_Txt_Readme);
 End
 
@@ -621,13 +620,6 @@ File gid_Brand_File_Share_Registry_Cjk_Xcd
     Name (zh-TW) = "cjk.xcd";
 End
 
-File gid_Brand_File_Share_Registry_Korea_Xcd
-    TXT_FILE_BODY;
-    Styles = (PACKED);
-    Dir = gid_Brand_Dir_Share_Registry;
-    Name (ko) = "korea.xcd";
-End
-
 #if defined UNX && ! defined MACOSX
 File gid_Brand_File_Share_Xdg_Base
     TXT_FILE_BODY;
commit 7fd9b8268f87831e2728b5def34cc5e97ed16ab0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 24 11:46:14 2014 +0100

    coverity#1212506 no need for ? : here
    
    Change-Id: I771a59979ffa628c93421d65b2078292e104eeed

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 57cbeb7..8c177fc 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6648,7 +6648,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
             }
         }
         else
-            bLowMode = bLowerMode ? sal_True : sal_False;
+            bLowMode = bLowerMode;
     }
 
     // OD 05.09.2002 #102912#
commit 6f32261fcffa8a2cc7e8ef29d805a7318d7b90f8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 24 11:40:47 2014 +0100

    coverity#1224975 Dereference after null check
    
    Change-Id: I89cc31ae5b7c598f16eb3f52d0e4cbce0acf4bc4

diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index fcbfbce..fbdd9fc 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -509,7 +509,7 @@ namespace rptui
                 pConditionCandidate = pConditionCandidate->GetParent();
                 pPlaygroundCandidate = pConditionCandidate ? pConditionCandidate->GetParent() : NULL;
             }
-            if ( pPlaygroundCandidate == m_pConditionPlayground )
+            if (pConditionCandidate && pPlaygroundCandidate == m_pConditionPlayground)
             {
                 impl_ensureConditionVisible( dynamic_cast< const Condition& >( *pConditionCandidate ).getConditionIndex() );
             }
commit 5652f529b51436bf7bba8e9b4cb0fbab722f79a9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 24 11:39:02 2014 +0100

    coverity#1237350 use our double-locking templates for this
    
    Change-Id: I589468e9663ffd01a237a1684345985396bc4eac

diff --git a/scripting/source/provider/ActiveMSPList.cxx b/scripting/source/provider/ActiveMSPList.cxx
index 5bfbb39..2df8ed3 100644
--- a/scripting/source/provider/ActiveMSPList.cxx
+++ b/scripting/source/provider/ActiveMSPList.cxx
@@ -66,6 +66,26 @@ ActiveMSPList::createNewMSP( const uno::Any& context )
     return msp;
 }
 
+class NonDocMSPCreator
+{
+public:
+    NonDocMSPCreator(ActiveMSPList *pList)
+    {
+        pList->createNonDocMSPs();
+    }
+};
+
+namespace
+{
+    //thread-safe double-locked class to ensure createNonDocMSPs is called once
+    class theNonDocMSPCreator : public rtl::StaticWithArg<NonDocMSPCreator, ActiveMSPList*, theNonDocMSPCreator> {};
+
+    void ensureNonDocMSPs(ActiveMSPList *pList)
+    {
+        theNonDocMSPCreator::get(pList);
+    }
+}
+
 Reference< provider::XScriptProvider >
 ActiveMSPList::getMSPFromAnyContext( const Any& aContext )
 {
@@ -105,7 +125,7 @@ ActiveMSPList::getMSPFromAnyContext( const Any& aContext )
         return msp;
     }
 
-    ensureNonDocMSPs();
+    ensureNonDocMSPs(this);
     return m_hMsps[ shareDirString ];
 }
 
@@ -287,27 +307,6 @@ ActiveMSPList::createNonDocMSPs()
     m_hMsps[ bundledDirString ] = bundledMsp;
 }
 
-void
-ActiveMSPList::ensureNonDocMSPs()
-{
-    static bool created = false;
-    if ( created )
-    {
-        return;
-    }
-    else
-    {
-        ::osl::MutexGuard guard( m_mutex );
-        if ( created )
-        {
-            return;
-        }
-        createNonDocMSPs();
-        created = true;
-    }
-}
-
-
 } // namespace func_provider
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/scripting/source/provider/ActiveMSPList.hxx b/scripting/source/provider/ActiveMSPList.hxx
index a50b6e5..9b2e803 100644
--- a/scripting/source/provider/ActiveMSPList.hxx
+++ b/scripting/source/provider/ActiveMSPList.hxx
@@ -53,6 +53,8 @@ typedef ::boost::unordered_map< OUString,
     OUStringHash,
             ::std::equal_to< OUString > > Msp_hash;
 
+class NonDocMSPCreator;
+
 class ActiveMSPList : public ::cppu::WeakImplHelper1< css::lang::XEventListener  >
 {
 
@@ -88,8 +90,9 @@ private:
         return createNewMSP( css::uno::makeAny( context ) );
     }
 
-    void ensureNonDocMSPs();
+    friend class NonDocMSPCreator;
     void createNonDocMSPs();
+
     Msp_hash m_hMsps;
     ScriptComponent_map m_mScriptComponents;
     osl::Mutex m_mutex;
commit 03c870dfc6aa140354613b0c179fb7bec2e74a73
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 24 10:44:31 2014 +0100

    coverity#1242422 Unchecked dynamic_cast
    
    Change-Id: If5e8b90f32c167bafeb3649f4bc6c31198635947

diff --git a/unoidl/source/sourcefileprovider.cxx b/unoidl/source/sourcefileprovider.cxx
index 3348d1c..c73142dc 100644
--- a/unoidl/source/sourcefileprovider.cxx
+++ b/unoidl/source/sourcefileprovider.cxx
@@ -100,9 +100,8 @@ SourceFileProvider::SourceFileProvider(
                 if (k == map->end()) {
                     k = map->insert(std::make_pair(id, new Module)).first;
                 }
-                Module * mod = dynamic_cast< Module * >(k->second.get());
-                assert(mod != 0);
-                map = &mod->map;
+                Module& mod = dynamic_cast<Module&>(*k->second.get());
+                map = &mod.map;
             }
         }
     }
commit 109c9e9fa5ffe55bd672c99c3cdb741aac1060eb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 24 10:34:50 2014 +0100

    coverity#1242427 Explicit null dereferenced
    
    Change-Id: I768b9596432b95e0152011951bf366eb41da6b53

diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 5fbd90f..61df8e2 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -686,7 +686,7 @@ void ScConflictsDlg::UpdateView()
             ScChangeActionList::const_iterator aEndShared = aItr->maSharedActions.end();
             for ( ScChangeActionList::const_iterator aItrShared = aItr->maSharedActions.begin(); aItrShared != aEndShared; ++aItrShared )
             {
-                ScChangeAction* pAction = mpSharedTrack->GetAction( *aItrShared );
+                ScChangeAction* pAction = mpSharedTrack ? mpSharedTrack->GetAction(*aItrShared) : NULL;
                 if ( pAction )
                 {
                     // only display shared top content entries
commit bf0075b2331dd523b88b6d5ec61ec4e10d8a000c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 24 10:33:59 2014 +0100

    coverity#1242428 Explicit null dereferenced
    
    Change-Id: I107aed3c0fb9f558473777eb5613465c7d60f2be

diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 90a4234..5fbd90f 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -707,7 +707,7 @@ void ScConflictsDlg::UpdateView()
             ScChangeActionList::const_iterator aEndOwn = aItr->maOwnActions.end();
             for ( ScChangeActionList::const_iterator aItrOwn = aItr->maOwnActions.begin(); aItrOwn != aEndOwn; ++aItrOwn )
             {
-                ScChangeAction* pAction = mpOwnTrack->GetAction( *aItrOwn );
+                ScChangeAction* pAction = mpOwnTrack ? mpOwnTrack->GetAction(*aItrOwn) : NULL;
                 if ( pAction )
                 {
                     // only display own top content entries
commit 66d105b10adaa2587c0a929df7a211d3d7c1fa4e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 24 10:28:50 2014 +0100

    coverity#1242429 Explicit null dereferenced
    
    Change-Id: I30f65243995288008fbc41de76bd3f4e2d21b00e

diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 27cb76b..c23ece0 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -190,10 +190,10 @@ LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, const
     sal_Int16 nColCount = 4;
     switch( eMode )
     {
+    default: assert(false); // can't happen, will crash later otherwise
     case DrawViewMode_DRAW: pInfo = &standard[0]; break;
     case DrawViewMode_HANDOUT: pInfo = &handout[0]; nColCount = 2; break;
     case DrawViewMode_NOTES: pInfo = &notes[0]; nColCount = 1; break;
-    default: assert(false); // can't happen, will crash later otherwise
     }
 
     mpLayoutSet1->SetColCount( nColCount );


More information about the Libreoffice-commits mailing list