summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-01-18 10:07:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-01-18 20:35:49 +0000
commitf93d4062c92e0508dc6a5272350ad98b9f0bfd72 (patch)
tree4fb7f50b41e247d62b2ade3c7efb165d8859b37e /vcl
parentaff603e10b412740d7a1bcbffb533e7675103f6f (diff)
tdf#152770 move warning about ppd with no resolution to use of resolution
so bizarro ppds with no resolutions don't trigger a warning unless it gets queried about the resolution Change-Id: I4828ddf80d011265aefb271d964f6362842b3014 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145734 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 07ce7005b2ca..8f5c43b16e91 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -678,10 +678,6 @@ PPDParser::PPDParser(OUString aFile, const std::vector<PPDKey*>& keys)
auto pResolutions = getKey( "Resolution" );
if( pResolutions )
m_pDefaultResolution = pResolutions->getDefaultValue();
- if (pResolutions == nullptr) {
- SAL_WARN( "vcl.unx.print", "no Resolution in " << m_aFile);
- }
- SAL_INFO_IF(!m_pDefaultResolution, "vcl.unx.print", "no DefaultResolution in " + m_aFile);
auto pInputSlots = getKey( "InputSlot" );
if( pInputSlots )
@@ -836,10 +832,6 @@ PPDParser::PPDParser( OUString aFile ) :
auto pResolutions = getKey( "Resolution" );
if( pResolutions )
m_pDefaultResolution = pResolutions->getDefaultValue();
- if (pResolutions == nullptr) {
- SAL_WARN( "vcl.unx.print", "no Resolution in " << m_aFile);
- }
- SAL_INFO_IF(!m_pDefaultResolution, "vcl.unx.print", "no DefaultResolution in " + m_aFile);
auto pInputSlots = getKey( "InputSlot" );
if( pInputSlots )
@@ -1551,6 +1543,7 @@ void PPDParser::getDefaultResolution( int& rXRes, int& rYRes ) const
return;
}
+ SAL_WARN("vcl.unx.print", "no DefaultResolution in " << m_aFile << " assuming 300x300");
rXRes = 300;
rYRes = 300;
}