[Libreoffice-commits] core.git: 2 commits - sw/source sw/uiconfig

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Dec 18 16:14:29 UTC 2019


 sw/source/uibase/app/docsh2.cxx             |   36 +++++++++++++---------------
 sw/uiconfig/swriter/ui/bibliographyentry.ui |    8 +++---
 2 files changed, 21 insertions(+), 23 deletions(-)

New commits:
commit 80deb9f71f29d76183f256afb92d3201998f14be
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Dec 17 09:20:46 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Dec 18 17:13:06 2019 +0100

    Resolves: tdf#129444 relabel the insert bibliography entry sections
    
    following Mihkel Tõnnov suggestions of...
    
    <<
    The two section headers, "Entry" (old) and "Layout" (new in 6.4) no longer
    match their sections:
    
    1) "Entry" has only two sub-items now, the radio buttons for choosing
    between "From bibliography database" and "From document content".
    
    2) "Layout" has three sub-items: Short name (dropdown), Author, Title.
    
    It would be logical to name that one "Entry", and rename the first header
    (current "Entry") to "Bibliography source" or similar, as it now is header only
    for the upper part of the dialog, not the whole dialog anymore.
    >>
    
    and
    
    <<
    If their header becomes "Bibliography Source", then I think the "From" should
    be dropped from them: "Bibliography database" and "Document content".
    >>
    
    Change-Id: I35f566defb02f3931507543536c534564bfbd2f4
    Reviewed-on: https://gerrit.libreoffice.org/85270
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/uiconfig/swriter/ui/bibliographyentry.ui b/sw/uiconfig/swriter/ui/bibliographyentry.ui
index 3ee3c6bffb44..a9a55a5eedd7 100644
--- a/sw/uiconfig/swriter/ui/bibliographyentry.ui
+++ b/sw/uiconfig/swriter/ui/bibliographyentry.ui
@@ -132,7 +132,7 @@
                     <property name="row_spacing">6</property>
                     <child>
                       <object class="GtkRadioButton" id="frombibliography">
-                        <property name="label" translatable="yes" context="bibliographyentry|frombibliography">From bibliography database</property>
+                        <property name="label" translatable="yes" context="bibliographyentry|frombibliography">Bibliography Database</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
@@ -148,7 +148,7 @@
                     </child>
                     <child>
                       <object class="GtkRadioButton" id="fromdocument">
-                        <property name="label" translatable="yes" context="bibliographyentry|fromdocument">From document content</property>
+                        <property name="label" translatable="yes" context="bibliographyentry|fromdocument">Document Content</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
@@ -170,7 +170,7 @@
               <object class="GtkLabel" id="label1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="label" translatable="yes" context="bibliographyentry|label1">Entry</property>
+                <property name="label" translatable="yes" context="bibliographyentry|label1">Bibliography Source</property>
                 <attributes>
                   <attribute name="weight" value="bold"/>
                 </attributes>
@@ -294,7 +294,7 @@
               <object class="GtkLabel" id="label4">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="label" translatable="yes" context="bibliographyentry|label4">Layout</property>
+                <property name="label" translatable="yes" context="bibliographyentry|label4">Entry</property>
                 <attributes>
                   <attribute name="weight" value="bold"/>
                 </attributes>
commit 5fd4d10da1370c46ac831e58eb4d138c9a02ab7d
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Dec 18 11:47:48 2019 +0100
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Dec 18 17:12:54 2019 +0100

    Reduce indentation
    
    Change-Id: I056016bac5d08a85f9664e31bcaee01c2dd9e6e0
    Reviewed-on: https://gerrit.libreoffice.org/85391
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 19f36171f443..0f6c54e82e26 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -1584,28 +1584,26 @@ ErrCode SwDocShell::LoadStylesFromFile( const OUString& rURL,
     }
     // --> OD #i117339# - trigger import only for own formats
     bool bImport( false );
+    if ( aMed.IsStorage() )
     {
-        if ( aMed.IsStorage() )
+        // As <SfxMedium.GetFilter().IsOwnFormat() resp. IsOwnTemplateFormat()
+        // does not work correct (e.g., MS Word 2007 XML Template),
+        // use workaround provided by MAV.
+        uno::Reference< embed::XStorage > xStorage = aMed.GetStorage();
+        if ( xStorage.is() )
         {
-            // As <SfxMedium.GetFilter().IsOwnFormat() resp. IsOwnTemplateFormat()
-            // does not work correct (e.g., MS Word 2007 XML Template),
-            // use workaround provided by MAV.
-            uno::Reference< embed::XStorage > xStorage = aMed.GetStorage();
-            if ( xStorage.is() )
+            // use <try-catch> on retrieving <MediaType> in order to check,
+            // if the storage is one of our own ones.
+            try
             {
-                // use <try-catch> on retrieving <MediaType> in order to check,
-                // if the storage is one of our own ones.
-                try
-                {
-                    uno::Reference< beans::XPropertySet > xProps( xStorage, uno::UNO_QUERY_THROW );
-                    const OUString aMediaTypePropName( "MediaType" );
-                    xProps->getPropertyValue( aMediaTypePropName );
-                    bImport = true;
-                }
-                catch (const uno::Exception&)
-                {
-                    bImport = false;
-                }
+                uno::Reference< beans::XPropertySet > xProps( xStorage, uno::UNO_QUERY_THROW );
+                const OUString aMediaTypePropName( "MediaType" );
+                xProps->getPropertyValue( aMediaTypePropName );
+                bImport = true;
+            }
+            catch (const uno::Exception&)
+            {
+                bImport = false;
             }
         }
     }


More information about the Libreoffice-commits mailing list