diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-13 18:20:18 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-13 18:21:36 +0100 |
commit | d1c9e5ee53f8609092ea026639c8f28afec1d36a (patch) | |
tree | 192f7722bd0598614a08dd8e5ed13c08da44ca97 /oox | |
parent | 8289bc767ecc88cf07da60ab6a8b850f5c2e7eb4 (diff) |
tdf#43157: Fix format string violations in OSL_TRACE etc.
...for a 32-bit build, similar to what ee11e221d2108212619e1bbe7f029e7d9afdba32
"tdf#43157: Fix format string violations in OSL_TRACE etc." did for a 64-bit
build
Change-Id: I05dd79ede3e66cb9ab7a33792319eb34b34c82dd
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/customshapeproperties.cxx | 16 | ||||
-rw-r--r-- | oox/source/drawingml/diagram/diagram.cxx | 15 | ||||
-rw-r--r-- | oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 78 | ||||
-rw-r--r-- | oox/source/helper/propertymap.cxx | 2 | ||||
-rw-r--r-- | oox/source/ppt/slidetransition.cxx | 4 | ||||
-rw-r--r-- | oox/source/ppt/timenodelistcontext.cxx | 2 |
6 files changed, 72 insertions, 45 deletions
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 6c1ce13336d6..e688d2dd4de5 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -40,8 +40,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::graphic; using namespace ::com::sun::star::drawing; -# define USS(x) OUStringToOString( x, RTL_TEXTENCODING_UTF8 ).getStr() - namespace oox { namespace drawingml { CustomShapeProperties::CustomShapeProperties() @@ -96,7 +94,8 @@ CustomShapeProperties::PresetDataMap CustomShapeProperties::maPresetDataMap; static OUString GetConnectorShapeType( sal_Int32 nType ) { - OSL_TRACE("GetConnectorShapeType preset: %d %d", nType, XML_straightConnector1); + SAL_INFO( + "oox.drawingml", "preset: " << nType << " " << XML_straightConnector1); OUString sType; switch( nType ) @@ -115,7 +114,7 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi { if ( mnShapePresetType >= 0 ) { - OSL_TRACE("preset: %d", mnShapePresetType); + SAL_INFO("oox.drawingml", "preset: " << mnShapePresetType); if (maPresetDataMap.empty()) initializePresetDataMap(); @@ -127,7 +126,10 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi if (sConnectorShapeType.getLength() > 0) { - OSL_TRACE("connector shape: %s (%d)", USS(sConnectorShapeType), mnShapePresetType); + SAL_INFO( + "oox.drawingml", + "connector shape: " << sConnectorShapeType << " (" + << mnShapePresetType << ")"); //const uno::Reference < drawing::XShape > xShape( xPropSet, UNO_QUERY ); Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( xShape, UNO_QUERY ); if( xDefaulter.is() ) { @@ -137,7 +139,9 @@ void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFi } else if (maPresetDataMap.find(mnShapePresetType) != maPresetDataMap.end()) { - OSL_TRACE("found property map for preset: %d", mnShapePresetType); + SAL_INFO( + "oox.drawingml", + "found property map for preset: " << mnShapePresetType); aPropertyMap = maPresetDataMap[mnShapePresetType]; #ifdef DEBUG diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx index 3fcd3fe0281c..5618be859e85 100644 --- a/oox/source/drawingml/diagram/diagram.cxx +++ b/oox/source/drawingml/diagram/diagram.cxx @@ -49,15 +49,12 @@ namespace dgm { void Connection::dump() { - OSL_TRACE("dgm: cnx modelId %s, srcId %s, dstId %s, parTransId %s, presId %s, sibTransId %s, srcOrd %d, dstOrd %d", - OUSTRING_TO_CSTR( msModelId ), - OUSTRING_TO_CSTR( msSourceId ), - OUSTRING_TO_CSTR( msDestId ), - OUSTRING_TO_CSTR( msParTransId ), - OUSTRING_TO_CSTR( msPresId ), - OUSTRING_TO_CSTR( msSibTransId ), - mnSourceOrder, - mnDestOrder ); + SAL_INFO( + "oox.drawingml", + "cnx modelId " << msModelId << ", srcId " << msSourceId << ", dstId " + << msDestId << ", parTransId " << msParTransId << ", presId " + << msPresId << ", sibTransId " << msSibTransId << ", srcOrd " + << mnSourceOrder << ", dstOrd " << mnDestOrder); } void Point::dump() diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 180a61310aa4..c1939a9a15bb 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -361,12 +361,11 @@ void AlgAtom::layoutShape( const ShapePtr& rShape, break; } - OSL_TRACE("Layouting shape %s: (%d,%d,%d,%d)", - OUSTRING_TO_CSTR( rName ), - rShape->getPosition().X, - rShape->getPosition().Y, - rShape->getSize().Width, - rShape->getSize().Height); + SAL_INFO( + "oox.drawingml", + "Layouting shape " << rName << ": (" << rShape->getPosition().X << "," + << rShape->getPosition().Y << "," << rShape->getSize().Width << "," + << rShape->getSize().Height << ")"); } void LayoutNode::accept( LayoutAtomVisitor& rVisitor ) @@ -381,10 +380,11 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const Diagram& rDgm, sal_uI if( aDataNode != rDgm.getData()->getPointsPresNameMap().end() && aDataNode->second.size() > nIdx ) { - OSL_TRACE( "Filling content from %d th layout node named \"%s\", modelId \"%s\"", - nIdx, - OUSTRING_TO_CSTR( msName ), - OUSTRING_TO_CSTR( aDataNode->second.at(nIdx)->msModelId ) ); + SAL_INFO( + "oox.drawingml", + "Filling content from " << nIdx << "th layout node named \"" + << msName << "\", modelId \"" + << aDataNode->second.at(nIdx)->msModelId << "\""); // got the presentation node - now, need the actual data node: const DiagramData::StringMap::const_iterator aNodeName=rDgm.getData()->getPresOfNameMap().find( @@ -413,9 +413,13 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const Diagram& rDgm, sal_uI rShape->getCustomShapeProperties() = aDataNode2->second->mpShape->getCustomShapeProperties(); rShape->setMasterTextListStyle( aDataNode2->second->mpShape->getMasterTextListStyle() ); - OSL_TRACE( "Custom shape with preset type %d added for layout node named \"%s\"", - rShape->getCustomShapeProperties()->getShapePresetType(), - OUSTRING_TO_CSTR( msName ) ); + SAL_INFO( + "oox.drawingml", + "Custom shape with preset type " + << (rShape->getCustomShapeProperties() + ->getShapePresetType()) + << " added for layout node named \"" << msName + << "\""); } // append text with right outline level @@ -452,9 +456,12 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const Diagram& rDgm, sal_uI } else { - OSL_TRACE("ShapeCreationVisitor::visit: no data node name found while processing shape type %d for layout node named \"%s\"", - rShape->getCustomShapeProperties()->getShapePresetType(), - OUSTRING_TO_CSTR( msName ) ); + SAL_INFO( + "oox.drawingml", + "ShapeCreationVisitor::visit: no data node name found while" + " processing shape type " + << rShape->getCustomShapeProperties()->getShapePresetType() + << " for layout node named \"" << msName << "\""); } // TODO(Q1): apply styling & coloring - taking @@ -462,20 +469,32 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const Diagram& rDgm, sal_uI // now, but docs are a bit unclear on this if( !msStyleLabel.isEmpty() ) { - OSL_TRACE("setting style with label %s", - OUSTRING_TO_CSTR( msStyleLabel ) ); + SAL_INFO( + "oox.drawingml", "setting style with label " << msStyleLabel); const DiagramQStyleMap::const_iterator aStyle=rDgm.getStyles().find(msStyleLabel); if( aStyle != rDgm.getStyles().end() ) { rShape->getShapeStyleRefs()[XML_fillRef] = aStyle->second.maFillStyle; - OSL_TRACE("added fill style with id %d", aStyle->second.maFillStyle.mnThemedIdx); + SAL_INFO( + "oox.drawingml", + "added fill style with id " + << aStyle->second.maFillStyle.mnThemedIdx); rShape->getShapeStyleRefs()[XML_lnRef] = aStyle->second.maLineStyle; - OSL_TRACE("added line style with id %d", aStyle->second.maLineStyle.mnThemedIdx); + SAL_INFO( + "oox.drawingml", + "added line style with id " + << aStyle->second.maLineStyle.mnThemedIdx); rShape->getShapeStyleRefs()[XML_effectRef] = aStyle->second.maEffectStyle; - OSL_TRACE("added effect style with id %d", aStyle->second.maEffectStyle.mnThemedIdx); + SAL_INFO( + "oox.drawingml", + "added effect style with id " + << aStyle->second.maEffectStyle.mnThemedIdx); rShape->getShapeStyleRefs()[XML_fontRef] = aStyle->second.maTextStyle; - OSL_TRACE("added fontref style with id %d", aStyle->second.maTextStyle.mnThemedIdx); + SAL_INFO( + "oox.drawingml", + "added fontref style with id " + << aStyle->second.maTextStyle.mnThemedIdx); Color aColor=aStyle->second.maTextStyle.maPhClr; OSL_TRACE("added fontref color with alpha %d", aColor.getTransparency() ); } @@ -501,9 +520,11 @@ bool LayoutNode::setupShape( const ShapePtr& rShape, const Diagram& rDgm, sal_uI } else { - OSL_TRACE("ShapeCreationVisitor::visit: no text found while processing shape type %d for layout node named \"%s\"", - rShape->getCustomShapeProperties()->getShapePresetType(), - OUSTRING_TO_CSTR( msName ) ); + SAL_INFO( + "oox.drawingml", + "no text found while processing shape type " + << rShape->getCustomShapeProperties()->getShapePresetType() + << " for layout node named \"" << msName << "\""); } return false; @@ -631,8 +652,11 @@ void ShapeCreationVisitor::visit(LayoutNode& rAtom) ShapePtr pCurrShape(rAtom.getShape()); if( pCurrShape ) { - OSL_TRACE("ShapeCreationVisitor::visit: processing shape type %d", - pCurrShape->getCustomShapeProperties()->getShapePresetType() ); + SAL_INFO( + "oox.drawingml", + "processing shape type " + << (pCurrShape->getCustomShapeProperties() + ->getShapePresetType())); // TODO(F3): cloned shape shares all properties by reference, // don't change them! diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx index 5dd70be2da0c..792de08e2598 100644 --- a/oox/source/helper/propertymap.cxx +++ b/oox/source/helper/propertymap.cxx @@ -457,7 +457,7 @@ void PropertyMap::dump( Reference< XPropertySet > rXPropSet ) Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo (); Sequence< Property > props = info->getProperties (); - OSL_TRACE("dump props, len: %d", props.getLength ()); + SAL_INFO("oox", "dump props, len: " << props.getLength ()); for (int i=0; i < props.getLength (); i++) { OString name = OUStringToOString( props [i].Name, RTL_TEXTENCODING_UTF8); diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx index 45e7cce8353e..b3f8c72828e7 100644 --- a/oox/source/ppt/slidetransition.cxx +++ b/oox/source/ppt/slidetransition.cxx @@ -346,7 +346,9 @@ namespace oox { namespace ppt { mnTransitionSubType = TransitionSubType::EIGHTBLADE; break; default: - OSL_TRACE( "OOX: strange number of blades for thw wheel-wipe %d", param1 ); + SAL_INFO( + "oox.ppt", + "strange number of blades for thw wheel-wipe " << param1); if( param1 > 8 ) { mnTransitionSubType = TransitionSubType::EIGHTBLADE; diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index 11696210d15d..57dccc0bdf64 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -1012,7 +1012,7 @@ namespace oox { namespace ppt { default: nNodeType = AnimationNodeType::CUSTOM; - OSL_TRACE( "OOX: uhandled token %x", aElementToken ); + SAL_INFO("oox.ppt", "uhandled token " << aElementToken); break; } |