diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-12 16:31:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-13 06:12:00 +0000 |
commit | c3586b684c58e06cd80dea87d7681354acfec80b (patch) | |
tree | 09e1b3caab55f1c9ecd4c2559250b42892fd5ee7 /filter | |
parent | a005fbeddc4e615cfff56a9bd84355f8d42c1c8c (diff) |
OSL_TRACE->SAL in chart2..oox
Change-Id: I133a6441824bfbefcfcda130119b5c5d706f86b2
Reviewed-on: https://gerrit.libreoffice.org/31907
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/mstoolbar.cxx | 5 | ||||
-rw-r--r-- | filter/source/msfilter/msvbahelper.cxx | 5 | ||||
-rw-r--r-- | filter/source/svg/parserfragments.cxx | 5 | ||||
-rw-r--r-- | filter/source/svg/svgreader.cxx | 34 | ||||
-rw-r--r-- | filter/source/svg/test/parsertest.cxx | 22 | ||||
-rw-r--r-- | filter/source/svg/test/svg2odf.cxx | 6 | ||||
-rw-r--r-- | filter/source/svg/units.cxx | 2 |
7 files changed, 9 insertions, 70 deletions
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx index e0698a36f370..dc700b933a27 100644 --- a/filter/source/msfilter/mstoolbar.cxx +++ b/filter/source/msfilter/mstoolbar.cxx @@ -60,13 +60,12 @@ void CustomToolBarImportHelper::applyIcons() uno::Sequence< uno::Reference< graphic::XGraphic > > images(1); images[ 0 ] = it->image; - OSL_TRACE("About to applyIcons for command %s, have image ? %s", OUStringToOString( commands[ 0 ], RTL_TEXTENCODING_UTF8 ).getStr(), images[ 0 ].is() ? "yes" : "no" ); uno::Reference< ui::XImageManager > xImageManager( getCfgManager()->getImageManager(), uno::UNO_QUERY_THROW ); sal_uInt16 nColor = ui::ImageType::COLOR_NORMAL; vcl::Window* topwin = Application::GetActiveTopWindow(); - if ( topwin != nullptr && topwin->GetDisplayBackground().GetColor().IsDark() ) - nColor = css::ui::ImageType::COLOR_HIGHCONTRAST; + if ( topwin != nullptr && topwin->GetDisplayBackground().GetColor().IsDark() ) + nColor = css::ui::ImageType::COLOR_HIGHCONTRAST; ScaleImage( images[ 0 ], 16 ); xImageManager->replaceImages( ui::ImageType::SIZE_DEFAULT | nColor, commands, images ); diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx index 115855569ad0..addc6b06e454 100644 --- a/filter/source/msfilter/msvbahelper.cxx +++ b/filter/source/msfilter/msvbahelper.cxx @@ -92,7 +92,6 @@ SfxObjectShell* findShellForUrl( const OUString& sMacroURLOrPath ) osl::FileBase::getFileURLFromSystemPath( sMacroURLOrPath, aURL ); aObj.SetURL( aURL ); } - OSL_TRACE("Trying to find shell for url %s", OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ).getStr() ); while ( pShell ) { @@ -185,10 +184,6 @@ bool hasMacro( SfxObjectShell* pShell, const OUString& sLibrary, OUString& sMod, #else if ( !sLibrary.isEmpty() && !sMacro.isEmpty() ) { - OSL_TRACE("** Searching for %s.%s in library %s" - ,OUStringToOString( sMod, RTL_TEXTENCODING_UTF8 ).getStr() - ,OUStringToOString( sMacro, RTL_TEXTENCODING_UTF8 ).getStr() - ,OUStringToOString( sLibrary, RTL_TEXTENCODING_UTF8 ).getStr() ); BasicManager* pBasicMgr = pShell-> GetBasicManager(); if ( pBasicMgr ) { diff --git a/filter/source/svg/parserfragments.cxx b/filter/source/svg/parserfragments.cxx index 440226e155aa..7b1ce1addb4b 100644 --- a/filter/source/svg/parserfragments.cxx +++ b/filter/source/svg/parserfragments.cxx @@ -39,7 +39,6 @@ inline sal_uInt8 hex2int( char val ) void setFourBitColor( double& rChannel, char nChar ) { const sal_uInt8 nVal(hex2int(nChar)); - OSL_TRACE( "setFourBitCOlor %d color", nVal ); rChannel = (nVal*16+nVal)/255.0; } @@ -47,20 +46,17 @@ void setEightBitColor( double& rChannel, const char* pStart, const char* ) { const sal_uInt8 nVal0(hex2int(pStart[0])); const sal_uInt8 nVal1(hex2int(pStart[1])); - OSL_TRACE( "setEightbitCOlor %d, %d color", nVal0, nVal1 ); rChannel = (nVal0*16+nVal1)/255.0; } void setIntColor( double& rChannel, sal_uInt8 nVal ) { - OSL_TRACE( "setIntColor %d color", nVal ); rChannel = nVal/255.0; } void setPercentColor( double& rChannel, double nVal ) { rChannel = nVal/100.0; - SAL_INFO("svg", "setPercentColor " << nVal << " " << rChannel); } void calcRotation(std::vector<geometry::AffineMatrix2D>& rTransforms, @@ -72,7 +68,6 @@ void calcRotation(std::vector<geometry::AffineMatrix2D>& rTransforms, aCurr.rotate(fRotationAngle*M_PI/180); aCurr.translate(rCurrTransform.m02,rCurrTransform.m12); - OSL_TRACE("calcRotation - fRotationAngle - %f", fRotationAngle); rTransforms.push_back( basegfx::unotools::affineMatrixFromHomMatrix( rCurrTransform, diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx index 5524379a012e..0426953ea5e9 100644 --- a/filter/source/svg/svgreader.cxx +++ b/filter/source/svg/svgreader.cxx @@ -473,14 +473,6 @@ struct AnnotatingVisitor maCurrState.maCTM = maCurrState.maCTM*maCurrState.maTransform*aLocalTransform; - OSL_TRACE("annotateStyle - CTM is: %f %f %f %f %f %f", - maCurrState.maCTM.get(0,0), - maCurrState.maCTM.get(0,1), - maCurrState.maCTM.get(0,2), - maCurrState.maCTM.get(1,0), - maCurrState.maCTM.get(1,1), - maCurrState.maCTM.get(1,2)); - // if necessary, serialize to automatic-style section writeStyle(xElem,nTagId); } @@ -1869,14 +1861,6 @@ struct ShapeWritingVisitor xAttrs->Clear(); - OSL_TRACE("writePath - the CTM is: %f %f %f %f %f %f", - maCurrState.maCTM.get(0,0), - maCurrState.maCTM.get(0,1), - maCurrState.maCTM.get(0,2), - maCurrState.maCTM.get(1,0), - maCurrState.maCTM.get(1,1), - maCurrState.maCTM.get(1,2)); - // TODO(F2): separate out shear, rotate etc. // apply transformation to polygon, to keep draw // import in 100th mm @@ -2087,29 +2071,17 @@ struct DumpingVisitor { void operator()( const uno::Reference<xml::dom::XElement>& xElem ) { - OSL_TRACE("name: %s", - OUStringToOString( - xElem->getTagName(), - RTL_TEXTENCODING_UTF8 ).getStr()); + SAL_WARN("filter", "name: " << xElem->getTagName()); } void operator()( const uno::Reference<xml::dom::XElement>& xElem, const uno::Reference<xml::dom::XNamedNodeMap>& xAttributes ) { - OSL_TRACE("name: %s", - OUStringToOString( - xElem->getTagName(), - RTL_TEXTENCODING_UTF8 ).getStr()); + SAL_WARN("filter", "name: " << xElem->getTagName()); const sal_Int32 nNumAttrs( xAttributes->getLength() ); for( sal_Int32 i=0; i<nNumAttrs; ++i ) { - OSL_TRACE(" %s=%s", - OUStringToOString( - xAttributes->item(i)->getNodeName(), - RTL_TEXTENCODING_UTF8 ).getStr(), - OUStringToOString( - xAttributes->item(i)->getNodeValue(), - RTL_TEXTENCODING_UTF8 ).getStr()); + SAL_WARN("filter", xAttributes->item(i)->getNodeName() << "=" << xAttributes->item(i)->getNodeValue()); } } diff --git a/filter/source/svg/test/parsertest.cxx b/filter/source/svg/test/parsertest.cxx index 0e9c7f557fa4..cbee13b0fca7 100644 --- a/filter/source/svg/test/parsertest.cxx +++ b/filter/source/svg/test/parsertest.cxx @@ -28,7 +28,6 @@ public: ARGBColor aOut(16, 32, 48); CPPUNIT_ASSERT_MESSAGE( "Consuming color #112233", parseColor( sIn, aTmp ) ); - OSL_TRACE("color is: a:%f r:%f g:%f b:%f", aTmp.a, aTmp.r, aTmp.g, aTmp.b); CPPUNIT_ASSERT_MESSAGE( "Parsing color #112233", aOut==aTmp ); @@ -36,7 +35,6 @@ public: aOut=ARGBColor(51, 34, 17); CPPUNIT_ASSERT_MESSAGE( "Consuming color #321", parseColor( sIn, aTmp ) ); - OSL_TRACE("color is: a:%f r:%f g:%f b:%f", aTmp.a, aTmp.r, aTmp.g, aTmp.b); CPPUNIT_ASSERT_MESSAGE( "Parsing color #321", aOut==aTmp ); @@ -44,7 +42,6 @@ public: aOut=ARGBColor(100, 200, 50); CPPUNIT_ASSERT_MESSAGE( "Consuming color rgb(100,200,50)", parseColor( sIn, aTmp ) ); - OSL_TRACE("color is: a:%f r:%f g:%f b:%f", aTmp.a, aTmp.r, aTmp.g, aTmp.b); CPPUNIT_ASSERT_MESSAGE( "Parsing color rgb(100,200,50)", aOut==aTmp ); @@ -52,7 +49,6 @@ public: aOut=ARGBColor(0.1, 0.2, 0.9); CPPUNIT_ASSERT_MESSAGE( "Consuming color rgb(0.1,0.2,0.9)", parseColor( sIn, aTmp ) ); - OSL_TRACE("color is: a:%f r:%f g:%f b:%f", aTmp.a, aTmp.r, aTmp.g, aTmp.b); CPPUNIT_ASSERT_MESSAGE( "Parsing color rgb(0.1,0.2,0.9)", aOut==aTmp ); @@ -60,7 +56,6 @@ public: aOut=ARGBColor(222,184,135); CPPUNIT_ASSERT_MESSAGE( "Consuming color burlywood", parseColor( sIn, aTmp ) ); - OSL_TRACE("color is: a:%f r:%f g:%f b:%f", aTmp.a, aTmp.r, aTmp.g, aTmp.b); CPPUNIT_ASSERT_MESSAGE( "Parsing color burlywood", aOut==aTmp ); } @@ -73,7 +68,6 @@ public: ARGBColor aOut(0.123, 0.0, 0.0, 0.0); CPPUNIT_ASSERT_MESSAGE( "Consuming opacity 0.123", parseOpacity( sIn, aTmp ) ); - OSL_TRACE("color is: a:%f r:%f g:%f b:%f", aTmp.a, aTmp.r, aTmp.g, aTmp.b); CPPUNIT_ASSERT_MESSAGE( "Parsing opacity 0.123", aOut==aTmp ); } @@ -86,8 +80,6 @@ public: basegfx::B2DHomMatrix aTmp; CPPUNIT_ASSERT_MESSAGE( "Consuming transformation none", parseTransform( sIn, aTmp ) ); - OSL_TRACE("transformation is: m00:%f m01:%f m02:%f m10:%f m11:%f m12:%f", - aTmp.get(0,0), aTmp.get(0,1), aTmp.get(0,2), aTmp.get(1,0), aTmp.get(1,1), aTmp.get(1,2) ); CPPUNIT_ASSERT_MESSAGE( "Parsing transformation none", aOut==aTmp ); @@ -96,8 +88,6 @@ public: aOut.scale(10.0,10.0); CPPUNIT_ASSERT_MESSAGE( "Consuming transformation scale(10)", parseTransform( sIn, aTmp ) ); - OSL_TRACE("transformation is: m00:%f m01:%f m02:%f m10:%f m11:%f m12:%f", - aTmp.get(0,0), aTmp.get(0,1), aTmp.get(0,2), aTmp.get(1,0), aTmp.get(1,1), aTmp.get(1,2) ); CPPUNIT_ASSERT_MESSAGE( "Parsing transformation scale(10)", aOut==aTmp ); @@ -106,8 +96,6 @@ public: aOut.scale(10.0,20.12); CPPUNIT_ASSERT_MESSAGE( "Consuming transformation scale(10 20.12)", parseTransform( sIn, aTmp ) ); - OSL_TRACE("transformation is: m00:%f m01:%f m02:%f m10:%f m11:%f m12:%f", - aTmp.get(0,0), aTmp.get(0,1), aTmp.get(0,2), aTmp.get(1,0), aTmp.get(1,1), aTmp.get(1,2) ); CPPUNIT_ASSERT_MESSAGE( "Parsing transformation scale(10 20.12)", aOut==aTmp ); @@ -116,8 +104,6 @@ public: aOut.set(0,0,1.0); aOut.set(1,0,2.0); aOut.set(0,1,3.0); aOut.set(1,1,4.0); aOut.set(0,2,5.0); aOut.set(1,2,6.0); CPPUNIT_ASSERT_MESSAGE( "Consuming transformation matrix(1,2,3,4,5,6)", parseTransform( sIn, aTmp ) ); - OSL_TRACE("transformation is: m00:%f m01:%f m02:%f m10:%f m11:%f m12:%f", - aTmp.get(0,0), aTmp.get(0,1), aTmp.get(0,2), aTmp.get(1,0), aTmp.get(1,1), aTmp.get(1,2) ); CPPUNIT_ASSERT_MESSAGE( "Parsing transformation matrix(1,2,3,4,5,6)", aOut==aTmp ); @@ -126,8 +112,6 @@ public: aOut.set(0,0,0.0); aOut.set(1,0,10.0); aOut.set(0,1,-10.0); aOut.set(1,1,0.0); aOut.set(0,2,0.0); aOut.set(1,2,0.0); CPPUNIT_ASSERT_MESSAGE( "Consuming transformation matrix(1,2,3,4,5,6)", parseTransform( sIn, aTmp ) ); - OSL_TRACE("transformation is: m00:%f m01:%f m02:%f m10:%f m11:%f m12:%f", - aTmp.get(0,0), aTmp.get(0,1), aTmp.get(0,2), aTmp.get(1,0), aTmp.get(1,1), aTmp.get(1,2) ); CPPUNIT_ASSERT_MESSAGE( "Parsing transformation matrix(1,2,3,4,5,6)", aOut==aTmp ); @@ -136,8 +120,6 @@ public: aOut.set(0,0,1.0); aOut.set(1,0,1.0); aOut.set(0,1,0.0); aOut.set(1,1,1.0); aOut.set(0,2,0.0); aOut.set(1,2,0.0); CPPUNIT_ASSERT_MESSAGE( "Consuming transformation skewX(45)", parseTransform( sIn, aTmp ) ); - OSL_TRACE("transformation is: m00:%f m01:%f m02:%f m10:%f m11:%f m12:%f", - aTmp.get(0,0), aTmp.get(0,1), aTmp.get(0,2), aTmp.get(1,0), aTmp.get(1,1), aTmp.get(1,2) ); CPPUNIT_ASSERT_MESSAGE( "Parsing transformation skewX(45)", aOut==aTmp ); @@ -146,8 +128,6 @@ public: aOut.set(0,0,1.0); aOut.set(1,0,0.0); aOut.set(0,1,1.0); aOut.set(1,1,1.0); aOut.set(0,2,0.0); aOut.set(1,2,0.0); CPPUNIT_ASSERT_MESSAGE( "Consuming transformation skewY(45)", parseTransform( sIn, aTmp ) ); - OSL_TRACE("transformation is: m00:%f m01:%f m02:%f m10:%f m11:%f m12:%f", - aTmp.get(0,0), aTmp.get(0,1), aTmp.get(0,2), aTmp.get(1,0), aTmp.get(1,1), aTmp.get(1,2) ); CPPUNIT_ASSERT_MESSAGE( "Parsing transformation skewY(45)", aOut==aTmp ); } @@ -160,7 +140,6 @@ public: basegfx::B2DRange aOut(10,20,40.5,25); CPPUNIT_ASSERT_MESSAGE( "Consuming 10,20,30.5,5", parseViewBox( sIn, aTmp ) ); - OSL_TRACE("viewbox is: x1:%f y1:%f x2:%f y2:%f", aTmp.getMinX(), aTmp.getMinY(), aTmp.getMaxX(), aTmp.getMaxY()); CPPUNIT_ASSERT_MESSAGE( "Parsing 10,20,30.5,5", aOut==aTmp ); } @@ -173,7 +152,6 @@ public: std::vector<double> aOut; aOut.push_back(10.0); aOut.push_back(20.0); aOut.push_back(-10.0); CPPUNIT_ASSERT_MESSAGE( "Consuming 10,20,-10.00", parseDashArray( sIn, aTmp ) ); - OSL_TRACE("dash array is: len %d, %f %f %f", aTmp.size(), aTmp[0], aTmp[1], aTmp[2] ); CPPUNIT_ASSERT_MESSAGE( "Parsing 10,20,-10.00", aOut==aTmp ); } diff --git a/filter/source/svg/test/svg2odf.cxx b/filter/source/svg/test/svg2odf.cxx index 5eab2b59e717..cbb3e6b05317 100644 --- a/filter/source/svg/test/svg2odf.cxx +++ b/filter/source/svg/test/svg2odf.cxx @@ -68,7 +68,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { if( argc != 4 ) { - OSL_TRACE( "Invocation: svg2odf <base_url> <dst_url> <ini_file>. Exiting" ); + SAL_WARN("filter.svg", "Invocation: svg2odf <base_url> <dst_url> <ini_file>. Exiting" ); return 1; } @@ -98,7 +98,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) xFactory.set(xCtx->getServiceManager(), uno::UNO_QUERY); if (!xFactory.is()) { - OSL_TRACE( "Could not bootstrap UNO, installation must be in disorder. Exiting." ); + SAL_WARN("filter.svg", "Could not bootstrap UNO, installation must be in disorder. Exiting." ); return 1; } @@ -107,7 +107,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) osl::File aInputFile(aSrcURL); if( osl::FileBase::E_None!=aInputFile.open(osl_File_OpenFlag_Read) ) { - OSL_TRACE( "Cannot open input file" ); + SAL_WARN("filter.svg", "Cannot open input file" ); return 1; } diff --git a/filter/source/svg/units.cxx b/filter/source/svg/units.cxx index dd1a31e36f65..60a094a38711 100644 --- a/filter/source/svg/units.cxx +++ b/filter/source/svg/units.cxx @@ -82,7 +82,7 @@ double convLength( const OUString& value, SvgUnit unit, const State& rState, cha fRet *= fBoxLen/100.0; } break; - default: OSL_TRACE( "Unknown length type" ); break; + default: SAL_WARN("filter.svg", "Unknown length type" ); break; } return fRet; |