summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-10-08 12:58:14 +0200
committerStephan Bergmann <sbergman@redhat.com>2011-10-08 12:59:09 +0200
commit6b900b8bede24c8710d62e9e7cbff613a0b12f9f (patch)
tree7171825495fa78eb93b23ca9c2d30f26da45f91b /vcl
parent8ac7152ca8b3b71c17ea55ec9e660804990ab86c (diff)
Introduced OSL_FORMAT, adpated some places to it.
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx56
1 files changed, 45 insertions, 11 deletions
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index a236e5f07ee6..f5c1836eae40 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -811,35 +811,69 @@ PPDParser::PPDParser( const String& rFile ) :
m_pImageableAreas = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "ImageableArea" ) ) );
if( m_pImageableAreas )
m_pDefaultImageableArea = m_pImageableAreas->getDefaultValue();
- DBG_ASSERT( m_pImageableAreas, "Warning: no ImageableArea in PPD\n" );
- DBG_ASSERT( m_pDefaultImageableArea, "Warning: no DefaultImageableArea in PPD\n" );
+ DBG_ASSERT(
+ m_pImageableAreas,
+ OSL_FORMAT(
+ "Warning: no ImageableArea in %s\n",
+ rtl::OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr()));
+ DBG_ASSERT(
+ m_pDefaultImageableArea,
+ OSL_FORMAT(
+ "Warning: no DefaultImageableArea in %s\n",
+ rtl::OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr()));
m_pPaperDimensions = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "PaperDimension" ) ) );
if( m_pPaperDimensions )
m_pDefaultPaperDimension = m_pPaperDimensions->getDefaultValue();
- DBG_ASSERT( m_pPaperDimensions, "Warning: no PaperDimension in PPD\n" );
- DBG_ASSERT( m_pDefaultPaperDimension, "Warning: no DefaultPaperDimension in PPD\n" );
+ DBG_ASSERT(
+ m_pPaperDimensions,
+ OSL_FORMAT(
+ "Warning: no PaperDimensions in %s\n",
+ rtl::OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr()));
+ DBG_ASSERT(
+ m_pDefaultPaperDimension,
+ OSL_FORMAT(
+ "Warning: no DefaultPaperDimensions in %s\n",
+ rtl::OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr()));
m_pResolutions = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ) );
if( m_pResolutions )
m_pDefaultResolution = m_pResolutions->getDefaultValue();
- DBG_ASSERT( m_pResolutions, "Warning: no Resolution in PPD\n" );
- DBG_ASSERT( m_pDefaultResolution,
- rtl::OStringBuffer("Warning: no DefaultResolution in ").
- append(rtl::OUStringToOString(rFile, osl_getThreadTextEncoding())).append('\n').getStr() );
+ DBG_ASSERT(
+ m_pResolutions,
+ OSL_FORMAT(
+ "Warning: no Resolution in %s\n",
+ rtl::OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr()));
+ DBG_ASSERT(
+ m_pDefaultResolution,
+ OSL_FORMAT(
+ "Warning: no DefaultResolution in %s\n",
+ rtl::OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr()));
m_pInputSlots = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "InputSlot" ) ) );
if( m_pInputSlots )
m_pDefaultInputSlot = m_pInputSlots->getDefaultValue();
- DBG_ASSERT( m_pPaperDimensions, "Warning: no InputSlot in PPD\n" );
- DBG_ASSERT( m_pDefaultPaperDimension, "Warning: no DefaultInputSlot in PPD\n" );
+ DBG_ASSERT(
+ m_pInputSlots,
+ OSL_FORMAT(
+ "Warning: no InputSlot in %s\n",
+ rtl::OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr()));
+ DBG_ASSERT(
+ m_pDefaultInputSlot,
+ OSL_FORMAT(
+ "Warning: no DefaultInputSlot in %s\n",
+ rtl::OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr()));
m_pDuplexTypes = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Duplex" ) ) );
if( m_pDuplexTypes )
m_pDefaultDuplexType = m_pDuplexTypes->getDefaultValue();
m_pFontList = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "Font" ) ) );
- DBG_ASSERT( m_pFontList, "Warning: no Font in PPD\n" );
+ DBG_ASSERT(
+ m_pFontList,
+ OSL_FORMAT(
+ "Warning: no Font in %s\n",
+ rtl::OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr()));
// fill in direct values
if( (pKey = getKey( String( RTL_CONSTASCII_USTRINGPARAM( "ModelName" ) ) )) )