vcl/unx/generic/printer/ppdparser.cxx          |   10 ----------
 xmloff/source/transform/EventOASISTContext.cxx |    8 ++++----
 2 files changed, 4 insertions(+), 14 deletions(-)

New commits:
commit ae76a67623a3d4063de4d2be7dc94ec5b977b7b2
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Jan 18 09:58:20 2023 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed Jan 18 12:25:01 2023 +0000

    Related: tdf#152770 we don't use the font list, so don't warn if its empty
    
    this is a left over from unused code removal
    
    Change-Id: I6f6451561ae644a41d402f4de0d805a00945a66d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145712
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/vcl/unx/generic/printer/ppdparser.cxx 
b/vcl/unx/generic/printer/ppdparser.cxx
index dfe553caa6ed..07ce7005b2ca 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -689,11 +689,6 @@ PPDParser::PPDParser(OUString aFile, const 
std::vector<PPDKey*>& keys)
     SAL_INFO_IF(!pInputSlots, "vcl.unx.print", "no InputSlot in " << m_aFile);
     SAL_INFO_IF(!m_pDefaultInputSlot, "vcl.unx.print", "no DefaultInputSlot in 
" << m_aFile);
 
-    auto pFontList = getKey( "Font" );
-    if (pFontList == nullptr) {
-        SAL_WARN( "vcl.unx.print", "no Font in " << m_aFile);
-    }
-
     // fill in direct values
     if( (pKey = getKey( "print-color-mode" )) )
         m_bColorDevice = pKey->countValues() > 1;
@@ -852,11 +847,6 @@ PPDParser::PPDParser( OUString aFile ) :
     SAL_INFO_IF(!pInputSlots, "vcl.unx.print", "no InputSlot in " << m_aFile);
     SAL_INFO_IF(!m_pDefaultInputSlot, "vcl.unx.print", "no DefaultInputSlot in 
" << m_aFile);
 
-    auto pFontList = getKey( "Font" );
-    if (pFontList == nullptr) {
-        SAL_WARN( "vcl.unx.print", "no Font in " << m_aFile);
-    }
-
     // fill in direct values
     if ((pKey = getKey("ColorDevice")))
     {
commit 90ffbbdcd3ad050b07d2acdbef4d325f73901e0f
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Jan 18 09:30:07 2023 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed Jan 18 12:24:54 2023 +0000

    cid#1519129 Improper use of negative value
    
    Change-Id: Ib74c0734801e9f4b5cbeb9b1b19c12d5ad5eadbd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145708
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/xmloff/source/transform/EventOASISTContext.cxx 
b/xmloff/source/transform/EventOASISTContext.cxx
index ea922b7ff074..5d2e31b37cb9 100644
--- a/xmloff/source/transform/EventOASISTContext.cxx
+++ b/xmloff/source/transform/EventOASISTContext.cxx
@@ -220,8 +220,8 @@ void XMLEventOASISTransformerContext::StartElement(
                                 XML_NAMESPACE_SCRIPT,
                             GetXMLToken( XML_LANGUAGE ) ) );
 
-                        pMutableAttrList->SetValueByIndex( idx,
-                            "StarBasic" );
+                        if (idx != -1)
+                            pMutableAttrList->SetValueByIndex(idx, 
"StarBasic");
 
                         OUString aLocQName(
                             GetTransformer().GetNamespaceMap().GetQNameByKey(
@@ -272,8 +272,8 @@ void XMLEventOASISTransformerContext::StartElement(
                     XML_NAMESPACE_SCRIPT,
                     GetXMLToken( XML_LANGUAGE ) ) );
 
-                    pMutableAttrList->SetValueByIndex( idx,
-                    "StarBasic" );
+                    if (idx != -1)
+                        pMutableAttrList->SetValueByIndex(idx, "StarBasic");
 
                     OUString aLocQName(
                     GetTransformer().GetNamespaceMap().GetQNameByKey(

Reply via email to