include/editeng/numitem.hxx        |    8 ++++++--
 sfx2/source/doc/objserv.cxx        |    4 ++++
 sw/source/core/doc/number.cxx      |    4 ++--
 sw/source/core/unocore/unosett.cxx |    7 ++++---
 sw/source/filter/ww8/wrtw8num.cxx  |    2 +-
 5 files changed, 17 insertions(+), 8 deletions(-)

New commits:
commit a8770e97294b4011e6986eba6d308373c06c19bb
Merge: 700cf71e3eec cdcbf109c47d
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Jun 5 08:27:50 2020 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Jun 5 08:27:50 2020 +0200

    Merge branch 'libreoffice-6-4'
    
    into distro/lhm/libreoffice-6-4+backports
    
    Change-Id: I7e055931d800686b9ffe67678c5df42239a5d067

commit cdcbf109c47d366539b98c6e379874ae08de08e1
Author:     Vasily Melenchuk <vasily.melenc...@cib.de>
AuthorDate: Fri May 15 18:17:34 2020 +0300
Commit:     Thorsten Behrens <thorsten.behr...@cib.de>
CommitDate: Fri Jun 5 01:12:37 2020 +0200

    tdf#120394: list format string can be empty
    
    We need to distunguish when we have list format string, but it
    is empty (no level text will be diplayed) or it does not exist
    at all, so we need to fallback to old prefix-suffix syntax.
    
    Change-Id: Ifd4ccd5a676db86c39d2ef48e91d191d92b9b2a0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94322
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    (cherry picked from commit d8329149394e4e5758a9e293b0162db050379a4e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95413

diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index 52cb14858c1f..b1fa7c66b039 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -31,6 +31,7 @@
 #include <editeng/editengdllapi.h>
 #include <o3tl/typed_flags_set.hxx>
 #include <memory>
+#include <optional>
 #include <algorithm>
 
 class SvxBrushItem;
@@ -102,7 +103,9 @@ public:
 private:
     OUString            sPrefix;
     OUString            sSuffix;
-    OUString            sListFormat;        // Format string ">%1.%2<" can be 
used instead of prefix/suffix
+    std::optional<OUString> sListFormat;        // Format string ">%1.%2<" can 
be used instead of prefix/suffix
+                                                // Right now it is optional 
value to dostinguish empty list format
+                                                // and not set list format 
when we need to fallback to prefix/suffix.
 
     SvxAdjust           eNumAdjust;
 
@@ -168,7 +171,8 @@ public:
     void            SetSuffix(const OUString& rSet) { sSuffix = rSet;}
     const OUString& GetSuffix() const { return sSuffix;}
     void            SetListFormat(const OUString& rSet) { sListFormat = rSet; }
-    const OUString& GetListFormat() const { return sListFormat; }
+    bool            HasListFormat() const { return sListFormat.has_value(); }
+    const OUString& GetListFormat() const { return *sListFormat; }
 
     void                    SetCharFormatName(const OUString& rSet){ 
sCharStyleName = rSet; }
     virtual OUString        GetCharFormatName()const;
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index df3dcf76bfff..481ebfada8eb 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -641,9 +641,9 @@ OUString SwNumRule::MakeNumString( const 
SwNumberTree::tNumberVector & rNumVecto
         {
             css::lang::Locale aLocale( LanguageTag::convertToLocale(nLang));
 
-            OUString sLevelFormat = rMyNFormat.GetListFormat();
-            if (!sLevelFormat.isEmpty())
+            if (rMyNFormat.HasListFormat())
             {
+                OUString sLevelFormat = rMyNFormat.GetListFormat();
                 // In this case we are ignoring GetIncludeUpperLevels: we put 
all
                 // level nubers requested by level format
                 for (SwNumberTree::tNumberVector::size_type i=0; i <= nLevel; 
++i)
diff --git a/sw/source/core/unocore/unosett.cxx 
b/sw/source/core/unocore/unosett.cxx
index 8f0d95005a2a..1f68135f7a4a 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1343,11 +1343,12 @@ uno::Sequence<beans::PropertyValue> 
SwXNumberingRules::GetPropertiesForNumFormat
     aPropertyValues.push_back(comphelper::makePropertyValue("Suffix", 
aUString));
 
     //listformat
-    aUString = rFormat.GetListFormat();
-    aPropertyValues.push_back(comphelper::makePropertyValue("ListFormat", 
aUString));
+    if (rFormat.HasListFormat())
+    {
+        aPropertyValues.push_back(comphelper::makePropertyValue("ListFormat", 
rFormat.GetListFormat()));
+    }
 
     //char style name
-
     aUString.clear();
     SwStyleNameMapper::FillProgName( rCharFormatName, aUString, 
SwGetPoolIdFromName::ChrFmt);
     aPropertyValues.push_back(comphelper::makePropertyValue("CharStyleName", 
aUString));
diff --git a/sw/source/filter/ww8/wrtw8num.cxx 
b/sw/source/filter/ww8/wrtw8num.cxx
index ffd793d6db79..d08a7703ce50 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -493,7 +493,7 @@ void MSWordExportBase::NumberingLevel(
     const vcl::Font* pBulletFont=nullptr;
     rtl_TextEncoding eChrSet=0;
     FontFamily eFamily=FAMILY_DECORATIVE;
-    if (!rRule.Get(nLvl).GetListFormat().isEmpty())
+    if (rRule.Get(nLvl).HasListFormat())
     {
         // Nothing to construct: we have it already
         sNumStr = rRule.Get(nLvl).GetListFormat();
commit b52d304969a15e00d82745f4d2f96c04f188eb97
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Tue Jun 2 16:45:44 2020 +0200
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Jun 4 12:46:12 2020 +0200

    tdf#130354 sfx2: make PDF signing UI work again
    
    Regression from commit 9112c18524c9f5e67d6cbb282586a439e3020cdb (Don't
    create unnecessary tempfiles for opened doc, 2019-10-18), restore the
    temporary file creation for the PDF case, as it's needed for PDF signing
    to work.
    
    (cherry picked from commit 058caeef45f9abf12e4e243aafbbb1c2ebcbc057)
    
    Change-Id: I945f04f6ab90d0e04fb14a7634ec877fb0af1a0f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95410
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 51276917bd5e..5c5b7826e075 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1594,6 +1594,10 @@ uno::Sequence< security::DocumentSignatureInformation > 
SfxObjectShell::GetDocum
                 else
                 {
                     // Not ZIP-based, e.g. PDF.
+
+                    // Create temp file if needed.
+                    GetMedium()->CreateTempFile(/*bReplace=*/false);
+
                     std::unique_ptr<SvStream> 
pStream(utl::UcbStreamHelper::CreateStream(GetMedium()->GetName(), 
StreamMode::READ));
                     uno::Reference<io::XStream> xStream(new 
utl::OStreamWrapper(*pStream));
                     uno::Reference<io::XInputStream> xInputStream(xStream, 
uno::UNO_QUERY);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to