officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   12 ---
 sc/qa/unit/data/functions/date_time/fods/weeknum.fods          |   10 +-
 sc/source/core/tool/interpr2.cxx                               |   15 +++
 sc/source/ui/docshell/docsh6.cxx                               |    1 
 sd/qa/unit/data/odp/dupmastermultlayouts.odp                   |binary
 sd/qa/unit/export-tests-ooxml4.cxx                             |   35 ++++++++
 sd/source/filter/eppt/pptx-epptooxml.cxx                       |   40 
++++++----
 7 files changed, 80 insertions(+), 33 deletions(-)

New commits:
commit ae3929501b6b4994309cbf19486fa542d9f3d5cb
Author:     Andras Timar <[email protected]>
AuthorDate: Fri Feb 7 14:27:59 2025 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Sat Feb 8 09:32:16 2025 +0100

    Respect document specific settings – cool#11103
    
    The purpose of this CheckConfigOptions function is to reset
    formula separators, when there is a clash with decimal separator.
    However, ignoring other settings that are coming from the document
    can cause issues, like that we saw with LOKit, where
    StringRefAddressSyntax of a German XLSX document was reset to default
    CONV_UNSPECIFIED, and function =INDIREKT("Sheet1!A1") which was
    according to CONV_XL_A1 stopped working, and gave error #BEZUG (#REF).
    
    Change-Id: I7693deed436ad4e54569a21cc3faeaafceeb459c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181250
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 0e147f14c3fe..d9ab7e78354b 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -491,6 +491,7 @@ void ScDocShell::CheckConfigOptions()
         // One of arg separators conflicts with the current decimal
         // separator.  Reset them to default.
         ScFormulaOptions aNew = rOpt;
+        
aNew.GetCalcConfig().MergeDocumentSpecific(m_pDocument->GetCalcConfig());
         aNew.ResetFormulaSeparators();
         SetFormulaOptions(aNew);
         pScMod->SetFormulaOptions(aNew);
commit 4b428101d13122a0c6e73dd048a989c101010634
Author:     Andras Timar <[email protected]>
AuthorDate: Mon Feb 3 14:55:54 2025 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Sat Feb 8 09:31:34 2025 +0100

    tdf#165011 accept empty second parameter of WEEKNUM spreadsheet function
    
    and treat it like if it was the the default "1".
    
    Change-Id: I618575a7441a2a6650228fc1a29177e294933ce0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181054
    Reviewed-by: Mike Kaganski <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/sc/qa/unit/data/functions/date_time/fods/weeknum.fods 
b/sc/qa/unit/data/functions/date_time/fods/weeknum.fods
index a4e1c08ebbd6..2f84286ae929 100644
--- a/sc/qa/unit/data/functions/date_time/fods/weeknum.fods
+++ b/sc/qa/unit/data/functions/date_time/fods/weeknum.fods
@@ -769,13 +769,13 @@
      <table:table-cell table:number-columns-repeated="3"/>
     </table:table-row>
     <table:table-row table:style-name="ro5">
-     <table:table-cell table:style-name="ce20" 
table:formula="of:=WEEKNUM([.K9];)" office:value-type="string" 
office:string-value="" calcext:value-type="error">
-      <text:p>Err:502</text:p>
+     <table:table-cell table:style-name="ce20" 
table:formula="of:=WEEKNUM([.K9];)" office:value-type="float" office:value="31" 
calcext:value-type="float">
+      <text:p>31</text:p>
      </table:table-cell>
-     <table:table-cell office:value-type="string" calcext:value-type="string">
-      <text:p>ERR</text:p>
+     <table:table-cell office:value-type="float" office:value="31" 
calcext:value-type="float">
+      <text:p>31</text:p>
      </table:table-cell>
-     <table:table-cell table:style-name="ce23" 
table:formula="of:=ISERROR([.A9])" office:value-type="boolean" 
office:boolean-value="true" calcext:value-type="boolean">
+     <table:table-cell table:style-name="ce23" table:formula="of:=[.A9]=[.B9]" 
office:value-type="boolean" office:boolean-value="true" 
calcext:value-type="boolean">
       <text:p>PRAVDA</text:p>
      </table:table-cell>
      <table:table-cell table:style-name="ce24" 
table:formula="of:=FORMULA([.A9])" office:value-type="string" 
office:string-value="=WEEKNUM(K9;)" calcext:value-type="string">
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 61f88d638a00..e29fa5e4829e 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -253,7 +253,20 @@ void ScInterpreter::ScGetWeekOfYear()
     if ( !MustHaveParamCount( nParamCount, 1, 2 ) )
         return;
 
-    sal_Int16 nFlag = ( nParamCount == 1 ) ? 1 : GetInt16();
+    sal_Int16 nFlag;
+    if (nParamCount == 1)
+    {
+        nFlag = 1;
+    }
+    else if (GetRawStackType() == svMissing)
+    {
+        nFlag = 1;
+        Pop();
+    }
+    else
+    {
+        nFlag = GetInt16();
+    }
 
     Date aDate = pFormatter->GetNullDate();
     aDate.AddDays( GetFloor32());
commit 0d7d54858b3cbe7bef6cea1b3eaec3421210d0a5
Author:     Jaume Pujantell <[email protected]>
AuthorDate: Mon Feb 3 11:06:28 2025 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Sat Feb 8 09:30:49 2025 +0100

    sd: pptx export every layout used
    
    Regression from commit 9205b4eb09dcb4c91539e092db521154fc4e9523. On
    conversion from odp or ppt to pptx, some slide layouts were not saved if
    their masters were seen as equivalent.
    
    When reducing duplicated masters, only the layouts used in the Impress
    masters were saved for each duplicated masters. But when converting from
    other formats that handle masters/layouts differently it's necessary to
    search for all used layouts in each Impress slide that uses each
    duplicated master.
    
    Change-Id: Ie27852e7c0ff0b160a4e2415669f5e615c46e2f9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181030
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/sd/qa/unit/data/odp/dupmastermultlayouts.odp 
b/sd/qa/unit/data/odp/dupmastermultlayouts.odp
new file mode 100644
index 000000000000..c68ade8a08e1
Binary files /dev/null and b/sd/qa/unit/data/odp/dupmastermultlayouts.odp differ
diff --git a/sd/qa/unit/export-tests-ooxml4.cxx 
b/sd/qa/unit/export-tests-ooxml4.cxx
index f53f959388b9..c034f23f9c4b 100644
--- a/sd/qa/unit/export-tests-ooxml4.cxx
+++ b/sd/qa/unit/export-tests-ooxml4.cxx
@@ -1197,6 +1197,41 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, 
testDeduplicateMasters)
     CPPUNIT_ASSERT_EQUAL(Color(0x000000), nColor);
 }
 
+CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testConvertWithMasterDeduplication)
+{
+    createSdImpressDoc("odp/dupmastermultlayouts.odp");
+    save("Impress Office Open XML");
+
+    uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
+        = 
packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
+                                                      maTempFile.GetURL());
+
+    // For each slide check that it's layout exists
+    for (int i = 1; i <= 4; ++i)
+    {
+        xmlDocUniquePtr pXmlDocRels
+            = parseExport("ppt/slides/_rels/slide" + OUString::number(i) + 
".xml.rels");
+
+        assertXPath(
+            pXmlDocRels,
+            
"(/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout'])"_ostr);
+        // the relative target e.g. "../slideLayouts/slideLayout2.xml"
+        OUString sRelativeLayoutPath = getXPathContent(
+            pXmlDocRels,
+            
"(/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout'])/@Target"_ostr);
+
+        // Check that the referenced slideLayout files exist
+        // Without the accompanying fix in place, this test would have failed 
with:
+        // equality assertion failed
+        // - Expected: 1
+        // - Actual  : 0
+        // i.e. the referenced slideLayout file was missing on export.
+        OUString sSlideLayoutName = sRelativeLayoutPath.getToken(2, '/');
+        CPPUNIT_ASSERT_EQUAL(true,
+                             bool(xNameAccess->hasByName("ppt/slideLayouts/" + 
sSlideLayoutName)));
+    }
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index a9f2fa4603ab..1e4b10dde411 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1569,15 +1569,18 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 
nPageNum, Reference< XPro
     if (nPageNum != GetEquivalentMasterPage(nPageNum)
         && GetEquivalentMasterPage(nPageNum) != SAL_MAX_UINT32)
     {
-        // It's equivalent to an already written master, write only the layout 
file
-        if (maMastersLayouts[nPageNum].second != -1)
+        // It's equivalent to an already written master, write only the 
layouts files
+        OUString aSlideName;
+        Reference<XNamed> xNamed(mXDrawPage, UNO_QUERY);
+        if (xNamed.is())
+            aSlideName = xNamed->getName();
+        for (int i = 0; i < OOXML_LAYOUT_SIZE; ++i)
         {
-            OUString aSlideName;
-            Reference<XNamed> xNamed(mXDrawPage, UNO_QUERY);
-            if (xNamed.is())
-                aSlideName = xNamed->getName();
-            ImplWritePPTXLayoutWithContent(maMastersLayouts[nPageNum].second, 
nPageNum, aSlideName,
-                                           aXBackgroundPropSet);
+            if (mLayoutInfo[i].mnFileIdArray.size() > nPageNum
+                && mLayoutInfo[i].mnFileIdArray[nPageNum] > 0)
+            {
+                ImplWritePPTXLayoutWithContent(i, nPageNum, aSlideName, 
aXBackgroundPropSet);
+            }
         }
 
         // Close the list tag if it was the last one
@@ -1764,15 +1767,22 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 
nPageNum, Reference< XPro
     // Add layouts of other Impress masters that came from a sinlge pptx 
master with multiple layouts
     for (sal_uInt32 i = 0; i < mnMasterPages; i++)
     {
-        if (i != nPageNum && maEquivalentMasters[i] == nPageNum && 
maMastersLayouts[i].second != -1)
+        if (i != nPageNum && maEquivalentMasters[i] == nPageNum)
         {
-            // Reserve layout file Id to be writen later
-            if (mLayoutInfo[maMastersLayouts[i].second].mnFileIdArray.size() < 
mnMasterPages)
-                
mLayoutInfo[maMastersLayouts[i].second].mnFileIdArray.resize(mnMasterPages);
-            mLayoutInfo[maMastersLayouts[i].second].mnFileIdArray[i] = 
mnLayoutFileIdMax;
-            mnLayoutFileIdMax++;
+            aLayouts = getLayoutsUsedForMaster(maMastersLayouts[i].first);
+            if (maMastersLayouts[i].second != -1)
+                aLayouts.insert(maMastersLayouts[i].second);
 
-            AddLayoutIdAndRelation(pFS, 
GetLayoutFileId(maMastersLayouts[i].second, i));
+            for (auto nLayout : aLayouts)
+            {
+                // Reserve layout file Id to be writen later
+                if (mLayoutInfo[nLayout].mnFileIdArray.size() < mnMasterPages)
+                    mLayoutInfo[nLayout].mnFileIdArray.resize(mnMasterPages);
+                mLayoutInfo[nLayout].mnFileIdArray[i] = mnLayoutFileIdMax;
+                mnLayoutFileIdMax++;
+
+                AddLayoutIdAndRelation(pFS, GetLayoutFileId(nLayout, i));
+            }
         }
     }
 
commit 2c04ed694b93f0daf0a17b1501e0d9213f23a5f9
Author:     Andras Timar <[email protected]>
AuthorDate: Tue Jan 28 13:07:10 2025 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Sat Feb 8 09:29:42 2025 +0100

    Ctrl+F should focus to the Find bar in German UI, too.
    
    Change-Id: I2d7619f09c69036bbd95eaf10838affe10d40619
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180829
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index 71dbd7c1c391..031971562b5b 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -1062,18 +1062,6 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
             <value xml:lang="en-US" 
install:module="unxwnt">.uno:RepeatSearch</value>
           </prop>
         </node>
-        <node oor:name="F_MOD1" oor:op="replace">
-          <prop oor:name="Command">
-            <value xml:lang="x-no-translate">L10N SHORTCUTS - NO 
TRANSLATE</value>
-            <value xml:lang="de">.uno:Navigator</value>
-          </prop>
-        </node>
-        <node oor:name="F_MOD2" oor:op="replace">
-          <prop oor:name="Command">
-            <value xml:lang="x-no-translate">L10N SHORTCUTS - NO 
TRANSLATE</value>
-            <value xml:lang="de">vnd.sun.star.findbar:FocusToFindbar</value>
-          </prop>
-        </node>
         <node oor:name="F_MOD1_MOD2" oor:op="replace">
           <prop oor:name="Command">
             <value xml:lang="x-no-translate">L10N SHORTCUTS - NO 
TRANSLATE</value>

Reply via email to