[Libreoffice-commits] core.git: sd/source
sd/source/ui/dlg/prltempl.cxx | 44 ++ sd/source/ui/func/futempl.cxx | 27 +++-- 2 files changed, 48 insertions(+), 23 deletions(-) New commits: commit 4c5ce12608526e76d90a400fa3f499ab83528e90 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Sun Apr 9 03:43:38 2017 +0530 Fix highlighting in sd::FuTemplate sd::FuTemplate Highlighting tab's colors don't stick anymore. Change-Id: Idb1701ddf1f7d47758a4ef8ebe6705ee6ff16c11 Reviewed-on: https://gerrit.libreoffice.org/35800 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Katarina Behrens <katarina.behr...@cib.de> diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index 3573b27bd929..0f5e3db0c55b 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "DrawDocShell.hxx" @@ -63,6 +64,8 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, pOutSet ( nullptr ), pOrgSet ( () ) { +const SfxPoolItem *pItem = nullptr; + if( IS_OUTLINE(ePO)) { // Unfortunately, the Itemsets of our style sheets are not discreet.. @@ -93,7 +96,6 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, pOutSet = new SfxItemSet( rStyleBase.GetItemSet() ); pOutSet->ClearItem(); -const SfxPoolItem *pItem = nullptr; // If there is no bullet item in this stylesheet, we get it // from 'Outline 1' style sheet. @@ -110,10 +112,44 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, // preselect selected layer in dialog aInputSet.Put( SfxUInt16Item( SID_PARAM_CUR_NUM_LEVEL, 1<<GetOutlineLevel())); -SetInputSet( ); +/* + * Adjusting item set since background tabpage can only work + * with SvxBrushItems, EE_CHAR_BKGCOLOR is SvxBackgroundColorItem. + */ +aInputSet.MergeRange(SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR); +pOutSet->MergeRange(SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR); +if ( aInputSet.GetItemState( EE_CHAR_BKGCOLOR, true, ) == SfxItemState::SET ) +{ +/* extract Color outta SvxBackColorItem */ +Color aBackColor = static_cast(pItem)->GetValue(); +/* make new SvxBrushItem with this Color */ +SvxBrushItem aBrushItem( aBackColor, SID_ATTR_BRUSH_CHAR ); + +aInputSet.ClearItem( EE_CHAR_BKGCOLOR ); +/* and stick it into the set */ +aInputSet.Put( aBrushItem ); +} } -else -SetInputSet( pOrgSet ); +else { +/* + * same here + */ +aInputSet.SetRanges(pOrgSet->GetRanges()); +aInputSet.MergeRange(SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR); +aInputSet.Put(*pOrgSet, false); +if ( pOrgSet->GetItemState( EE_CHAR_BKGCOLOR, true, ) == SfxItemState::SET ) +{ +/* extract Color outta SvxBackColorItem */ +Color aBackColor = static_cast(pItem)->GetValue(); +/* make new SvxBrushItem with this Color */ +SvxBrushItem aBrushItem( aBackColor, SID_ATTR_BRUSH_CHAR ); + +aInputSet.ClearItem( EE_CHAR_BKGCOLOR ); +/* and stick it into the set */ +aInputSet.Put( aBrushItem ); +} +} +SetInputSet( ); SvxColorListItem aColorListItem(*static_cast( mpDocShell->GetItem( SID_COLOR_TABLE ) ) ); SvxGradientListItem aGradientListItem(*static_cast( mpDocShell->GetItem( SID_GRADIENT_LIST ) ) ); diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index 51a074342c25..3a5ce9adb82e 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -105,10 +105,6 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) SfxStyleSheetBase* pStyleSheet = nullptr; const SfxPoolItem* pItem; -static const sal_uInt16 aRanges[] = { -EE_ITEMS_START, EE_ITEMS_END, -SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR -}; SfxStyleFamily nFamily = (SfxStyleFamily)USHRT_MAX; if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY, false, )) @@ -305,15 +301,6 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) ScopedVclPtr pPresDlg; SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); bool bOldDocInOtherLanguage = false; -SfxItemSet aNewAttr(mpViewShell->GetPool(), aRanges); - -if( aNewAttr.GetItemState( XATTR_FILLBACKGROUND, true, ) == SfxItemState::SET) -{ -Color aBackColor = static_cast(pItem)->GetValue(); -SvxBrushItem aB
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 189 +-- 1 file changed, 153 insertions(+), 36 deletions(-) New commits: commit 10589bf9275f7853773203954a3d747a6d9bd6d0 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Apr 24 22:00:35 2017 +0530 tdf#51358 Add Support for BoxSnakesWipePath transition in SVG Export Ported the class BoxSnakesWipe Change-Id: I024f982998571d5a90252b10f873c0fc344af2ff Reviewed-on: https://gerrit.libreoffice.org/36902 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 6f569f72a9b3..735b9891efdb 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -5080,6 +5080,7 @@ var SINGLESWEEPWIPE_TRANSITION = 21; // 24 var WATERFALLWIPE_TRANSITION= 22; // 34 var SPIRALWIPE_TRANSITION = 23; // 31 var MISCDIAGONALWIPE_TRANSITION = 24; // 7 +var BOXSNAKESWIPE_TRANSITION= 25; // 33 var aTransitionTypeInMap = { 'barWipe' : BARWIPE_TRANSITION, @@ -5101,6 +5102,7 @@ var aTransitionTypeInMap = { 'snakeWipe' : SNAKEWIPE_TRANSITION, 'parallelSnakesWipe': PARALLELSNAKESWIPE_TRANSITION, 'spiralWipe': SPIRALWIPE_TRANSITION, +'boxSnakesWipe' : BOXSNAKESWIPE_TRANSITION, 'irisWipe' : IRISWIPE_TRANSITION, 'veeWipe' : VEEWIPE_TRANSITION, 'zigZagWipe': ZIGZAGWIPE_TRANSITION, @@ -5199,6 +5201,12 @@ var HORIZONTALTOPLEFTOPPOSITE_TRANS_SUBTYPE = 81; // 83 var HORIZONTALTOPRIGHTOPPOSITE_TRANS_SUBTYPE= 82; // 84 var DIAGONALBOTTOMLEFTOPPOSITE_TRANS_SUBTYPE= 83; // 85 var DIAGONALTOPLEFTOPPOSITE_TRANS_SUBTYPE = 84; // 86 +var TWOBOXTOP_TRANS_SUBTYPE = 85; // 87 +var TWOBOXBOTTOM_TRANS_SUBTYPE = 86; // 88 +var TWOBOXLEFT_TRANS_SUBTYPE= 87; // 89 +var TWOBOXRIGHT_TRANS_SUBTYPE = 88; // 90 +var FOURBOXVERTICAL_TRANS_SUBTYPE = 89; // 91 +var FOURBOXHORIZONTAL_TRANS_SUBTYPE = 90; // 92 var aTransitionSubtypeInMap = { 'default' : DEFAULT_TRANS_SUBTYPE, @@ -5285,7 +5293,13 @@ var aTransitionSubtypeInMap = { 'horizontalTopLeftOpposite' : HORIZONTALTOPLEFTOPPOSITE_TRANS_SUBTYPE, 'horizontalTopRightOpposite': HORIZONTALTOPRIGHTOPPOSITE_TRANS_SUBTYPE, 'diagonalBottomLeftOpposite': DIAGONALBOTTOMLEFTOPPOSITE_TRANS_SUBTYPE, -'diagonalTopLeftOpposite' : DIAGONALTOPLEFTOPPOSITE_TRANS_SUBTYPE +'diagonalTopLeftOpposite' : DIAGONALTOPLEFTOPPOSITE_TRANS_SUBTYPE, +'twoBoxTop' : TWOBOXTOP_TRANS_SUBTYPE, +'twoBoxBottom' : TWOBOXBOTTOM_TRANS_SUBTYPE, +'twoBoxLeft': TWOBOXLEFT_TRANS_SUBTYPE, +'twoBoxRight' : TWOBOXRIGHT_TRANS_SUBTYPE, +'fourBoxVertical' : FOURBOXVERTICAL_TRANS_SUBTYPE, +'fourBoxHorizontal' : FOURBOXHORIZONTAL_TRANS_SUBTYPE }; // Transition Modes @@ -5579,6 +5593,68 @@ aTransitionInfoTable[SPIRALWIPE_TRANSITION][BOTTOMLEFTCOUNTERCLOCKWISE_TRANS_SUB 'scaleIsotropically' : false }; +aTransitionInfoTable[BOXSNAKESWIPE_TRANSITION] = {}; +aTransitionInfoTable[BOXSNAKESWIPE_TRANSITION][TWOBOXTOP_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_IGNORE, +'outInvertSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[BOXSNAKESWIPE_TRANSITION][TWOBOXBOTTOM_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : -90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_IGNORE, +'outInvertSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[BOXSNAKESWIPE_TRANSITION][TWOBOXLEFT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 0.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_IGNORE, +'outInvertSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[BOXSNAKESWIPE_TRANSITION][TWOBOXRIGHT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 180.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_IGNORE, +'outInvertSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[BOXSNAKESWIPE_TRANSITION][FOURBOXVERTICAL_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_IGNORE, +'outInvertSweep' : true, +'scaleIsotropically' : false +}; +aT
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) New commits: commit 3a74490276de107bd57859d5aa52829593807c01 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Thu Apr 20 17:58:26 2017 +0530 Fixed my mistake: Fix Rotation issue in ParallelSnakesWipe seems like SVGMatrix.translate() and its counterparts doesn't modify the matrix inplace. Change-Id: I3ccfbe99f58cd455e291d4d41657a104ec197e83 Reviewed-on: https://gerrit.libreoffice.org/36903 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 55b0221c7563..6f569f72a9b3 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -10644,6 +10644,7 @@ SnakeWipePath.prototype.perform = function(nT) { } /** Class ParallelSnakesWipePath + * Generates a parallel snakes wipe: * * @param nElements * @param bDiagonal @@ -10682,8 +10683,8 @@ ParallelSnakesWipePath.prototype.perform = function( nT ) { half = SnakeWipePath.prototype.calcSnake.call(this, nT / 2.0 ); // rotate 90 degrees aTransform = SVGIdentityMatrix.translate(-0.5, -0.5); -aTransform.rotate(Math.PI/2); -aTransform.translate(0.5, 0.5); +aTransform = aTransform.rotate(Math.PI/2); +aTransform = aTransform.translate(0.5, 0.5); half.matrixTransform(aTransform); res.appendPath(flipOnYAxis(half)); res.appendPath(this.bOpposite ? flipOnXAxis(half) : half); @@ -10713,11 +10714,11 @@ SpiralWipePath.prototype.calcNegSpiral = function( nT ) { var aTransform = SVGIdentityMatrix.translate(-0.5, -0.5); var edge_ = pruneScaleValue(edge / this.sqrtElements); -aTransform.scale(edge_, edge_); -aTransform.translate(0.5, 0.5); +aTransform = aTransform.scale(edge_, edge_); +aTransform = aTransform.translate(0.5, 0.5); var poly = createUnitSquarePath(); poly.matrixTransform(aTransform); -var res = poly; +var res = poly.cloneNode(true); if(1.0 - nT != 0) { var edge1 = edge + 1; @@ -10731,12 +10732,12 @@ SpiralWipePath.prototype.calcNegSpiral = function( nT ) { aTransform = SVGIdentityMatrix.scale( pruneScaleValue( alen / this.sqrtElements ), pruneScaleValue( 1.0 / this.sqrtElements )); -aTransform.translate( +aTransform = aTransform.translate( - pruneScaleValue( (edge / 2) / this.sqrtElements ), pruneScaleValue( (edge / 2) / this.sqrtElements )); -aTransform.rotate( w ); +aTransform = aTransform.rotate( w ); w -= Math.PI / 2; -aTransform.translate(0.5, 0.5); +aTransform = aTransform.translate(0.5, 0.5); poly.matrixTransform(aTransform); res.appendPath(poly); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 256 --- 1 file changed, 232 insertions(+), 24 deletions(-) New commits: commit dd239283664e79337d385a63a18eb676d8688314 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 27 01:44:11 2017 +0530 tdf#51358 Add Support for ParallelSnakesWipe transition in SVG Export Ported the class ParallelSnakesWipePath Change-Id: Ife99723792d3d3614c7fff6bcf6abaf199568075 Reviewed-on: https://gerrit.libreoffice.org/35723 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 93facf847290..c705af7c2c98 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -4588,6 +4588,22 @@ function flipOnYAxis( aPath ) return aPolyPath; } +/** flipOnXAxis + * Flips the SVG Path element along x-axis + * + * @param aPath + * An object of type SVGPathElement to be flipped + */ +function flipOnXAxis( aPath ) +{ +var aPolyPath = aPath.cloneNode(true); +var aTransform = document.documentElement.createSVGMatrix(); +aTransform.d = -1; +aTransform.f = 1; +aPolyPath.matrixTransform(aTransform); +return aPolyPath; +} + /** SVGPathElement.matrixTransform * Apply the transformation defined by the passed matrix to the referenced * svg element. @@ -5164,29 +5180,30 @@ aTransitionClassOutMap = ['invalid', 'clip polypolygon', 'special']; */ // Transition Types -BARWIPE_TRANSITION = 1; -BOXWIPE_TRANSITION = 2; -FOURBOXWIPE_TRANSITION = 3; -ELLIPSEWIPE_TRANSITION = 4; // 17 -CLOCKWIPE_TRANSITION= 5; // 22 -PINWHEELWIPE_TRANSITION = 6; // 23 -PUSHWIPE_TRANSITION = 7; // 35 -SLIDEWIPE_TRANSITION= 8; // 36 -FADE_TRANSITION = 9; // 37 -RANDOMBARWIPE_TRANSITION= 10; // 38 -CHECKERBOARDWIPE_TRANSITION = 11; // 39 -DISSOLVE_TRANSITION = 12; // 40 -SNAKEWIPE_TRANSITION= 13; // 30 -IRISWIPE_TRANSITION = 14; // 12 -BARNDOORWIPE_TRANSITION = 15; // 4 -VEEWIPE_TRANSITION = 16; // 8 -ZIGZAGWIPE_TRANSITION = 17; // 10 -BARNZIGZAGWIPE_TRANSITION = 18; // 11 -FANWIPE_TRANSITION = 19; // 25 -SINGLESWEEPWIPE_TRANSITION = 20; // 24 -WATERFALLWIPE_TRANSITION= 21; // 34 -SPIRALWIPE_TRANSITION = 22; // 31 -MISCDIAGONALWIPE_TRANSITION = 23; // 7 +BARWIPE_TRANSITION = 1; +BOXWIPE_TRANSITION = 2; +FOURBOXWIPE_TRANSITION = 3; +ELLIPSEWIPE_TRANSITION = 4; // 17 +CLOCKWIPE_TRANSITION= 5; // 22 +PINWHEELWIPE_TRANSITION = 6; // 23 +PUSHWIPE_TRANSITION = 7; // 35 +SLIDEWIPE_TRANSITION= 8; // 36 +FADE_TRANSITION = 9; // 37 +RANDOMBARWIPE_TRANSITION= 10; // 38 +CHECKERBOARDWIPE_TRANSITION = 11; // 39 +DISSOLVE_TRANSITION = 12; // 40 +SNAKEWIPE_TRANSITION= 13; // 30 +PARALLELSNAKESWIPE_TRANSITION = 14; // 32 +IRISWIPE_TRANSITION = 15; // 12 +BARNDOORWIPE_TRANSITION = 16; // 4 +VEEWIPE_TRANSITION = 17; // 8 +ZIGZAGWIPE_TRANSITION = 18; // 10 +BARNZIGZAGWIPE_TRANSITION = 19; // 11 +FANWIPE_TRANSITION = 20; // 25 +SINGLESWEEPWIPE_TRANSITION = 21; // 24 +WATERFALLWIPE_TRANSITION= 22; // 34 +SPIRALWIPE_TRANSITION = 23; // 31 +MISCDIAGONALWIPE_TRANSITION = 24; // 7 aTransitionTypeInMap = { 'barWipe' : BARWIPE_TRANSITION, @@ -5206,6 +5223,7 @@ aTransitionTypeInMap = { 'dissolve' : DISSOLVE_TRANSITION, 'singleSweepWipe' : SINGLESWEEPWIPE_TRANSITION, 'snakeWipe' : SNAKEWIPE_TRANSITION, +'parallelSnakesWipe': PARALLELSNAKESWIPE_TRANSITION, 'spiralWipe': SPIRALWIPE_TRANSITION, 'irisWipe' : IRISWIPE_TRANSITION, 'veeWipe' : VEEWIPE_TRANSITION, @@ -5297,6 +5315,16 @@ BOTTOMRIGHTCOUNTERCLOCKWISE_TRANS_SUBTYPE = 73; // 75 BOTTOMLEFTCOUNTERCLOCKWISE_TRANS_SUBTYPE= 74; // 76 DOUBLEBARNDOOR_TRANS_SUBTYPE= 75; // 17 DOUBLEDIAMOND_TRANS_SUBTYPE = 76; // 18 +VERTICALTOPSAME_TRANS_SUBTYPE = 77; // 77 +VERTICALBOTTOMSAME_TRANS_SUBTYPE= 78; // 78 +VERTICALTOPLEFTOPPOSITE_TRANS_SUBTYPE = 79; // 79 +VERTICALBOTTOMLEFTOPPOSITE_TRANS_SUBTYPE= 80; // 80 +HORIZONTALLEFTSAME_TRANS_SUBTYPE= 81; // 81 +HORIZONTALRIGHTSAME_TRANS_SUBTYPE = 82; // 82 +HORIZONTALTOPLEFTOPPOSITE_TRANS_SUBTYPE = 83; // 83 +HORIZONTALTOPRIGHTOPPOSITE_TRANS_SUBTYPE= 84; // 84 +DIAGONALBOTTOMLEFTOPPOSITE_TRANS_SUBTYPE= 85; // 85 +DIAGONALTOPLEFTOPPOSITE_TRANS_SUBTYPE = 86; // 86 aTransitionSubtypeInMap = { 'default' : DEFAULT_TRANS_SUBTYPE, @
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 70 +-- 1 file changed, 67 insertions(+), 3 deletions(-) New commits: commit 0badc8447f3c608a8807df511f78799f827ccd2b Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Wed Mar 15 19:30:42 2017 +0530 tdf#51358 Added Support for DoubleDiamondWipePath in Impress SVG Export Ported the class DoubleDiamondWipe Change-Id: Ic4432018278c7b3567996bc9463b0f8fc96ebbec Reviewed-on: https://gerrit.libreoffice.org/35225 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 0d4700bae119..93facf847290 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -5186,6 +5186,7 @@ FANWIPE_TRANSITION = 19; // 25 SINGLESWEEPWIPE_TRANSITION = 20; // 24 WATERFALLWIPE_TRANSITION= 21; // 34 SPIRALWIPE_TRANSITION = 22; // 31 +MISCDIAGONALWIPE_TRANSITION = 23; // 7 aTransitionTypeInMap = { 'barWipe' : BARWIPE_TRANSITION, @@ -5195,6 +5196,7 @@ aTransitionTypeInMap = { 'ellipseWipe' : ELLIPSEWIPE_TRANSITION, 'clockWipe' : CLOCKWIPE_TRANSITION, 'pinWheelWipe' : PINWHEELWIPE_TRANSITION, +'miscDiagonalWipe' : MISCDIAGONALWIPE_TRANSITION, 'pushWipe' : PUSHWIPE_TRANSITION, 'slideWipe' : SLIDEWIPE_TRANSITION, 'fade' : FADE_TRANSITION, @@ -5293,6 +5295,8 @@ TOPLEFTCOUNTERCLOCKWISE_TRANS_SUBTYPE = 71; // 73 TOPRIGHTCOUNTERCLOCKWISE_TRANS_SUBTYPE = 72; // 74 BOTTOMRIGHTCOUNTERCLOCKWISE_TRANS_SUBTYPE = 73; // 75 BOTTOMLEFTCOUNTERCLOCKWISE_TRANS_SUBTYPE= 74; // 76 +DOUBLEBARNDOOR_TRANS_SUBTYPE= 75; // 17 +DOUBLEDIAMOND_TRANS_SUBTYPE = 76; // 18 aTransitionSubtypeInMap = { 'default' : DEFAULT_TRANS_SUBTYPE, @@ -5369,8 +5373,10 @@ aTransitionSubtypeInMap = { 'verticalLeft' : VERTICALLEFT_TRANS_SUBTYPE, 'verticalRight' : VERTICALRIGHT_TRANS_SUBTYPE, 'horizontalLeft': HORIZONTALLEFT_TRANS_SUBTYPE, -'horizontalRight' : HORIZONTALRIGHT_TRANS_SUBTYPE -} +'horizontalRight' : HORIZONTALRIGHT_TRANS_SUBTYPE, +'doubleBarnDoor': DOUBLEBARNDOOR_TRANS_SUBTYPE, +'doubleDiamond' : DOUBLEDIAMOND_TRANS_SUBTYPE +}; // Transition Modes TRANSITION_MODE_IN = 1; @@ -5607,6 +5613,28 @@ aTransitionInfoTable[BARNDOORWIPE_TRANSITION][DIAGONALTOPLEFT_TRANS_SUBTYPE] = 'scaleIsotropically': false }; +aTransitionInfoTable[MISCDIAGONALWIPE_TRANSITION] = {}; +aTransitionInfoTable[MISCDIAGONALWIPE_TRANSITION][DOUBLEBARNDOOR_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle': 45.0, +'scaleX': Math.SQRT2, +'scaleY': Math.SQRT2, +'reverseMethod': REVERSEMETHOD_IGNORE, +'outInvertsSweep': true, +'scaleIsotropically': false +}; +aTransitionInfoTable[MISCDIAGONALWIPE_TRANSITION][DOUBLEDIAMOND_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle': 0.0, +'scaleX': 1, +'scaleY': 1, +'reverseMethod': REVERSEMETHOD_IGNORE, +'outInvertsSweep': true, +'scaleIsotropically': false +}; + aTransitionInfoTable[IRISWIPE_TRANSITION] = {}; aTransitionInfoTable[IRISWIPE_TRANSITION][RECTANGLE_TRANS_SUBTYPE] = { @@ -9837,7 +9865,7 @@ function createClipPolyPolygon( nType, nSubtype ) return null; } case BARNDOORWIPE_TRANSITION: -return new BarnDoorWipePath(true); +return new BarnDoorWipePath(false); case SINGLESWEEPWIPE_TRANSITION: return new SweepWipePath( // center @@ -9856,6 +9884,13 @@ function createClipPolyPolygon( nType, nSubtype ) return new WaterfallWipePath(128, // flipOnYAxis nSubtype == VERTICALRIGHT_TRANS_SUBTYPE || nSubtype == HORIZONTALLEFT_TRANS_SUBTYPE); +case MISCDIAGONALWIPE_TRANSITION: +switch(nSubtype) { +case DOUBLEBARNDOOR_TRANS_SUBTYPE: +return new BarnDoorWipePath(true /* Doubled */); +case DOUBLEDIAMOND_TRANS_SUBTYPE: +return new DoubleDiamondWipePath(); +} case DISSOLVE_TRANSITION: return new RandomWipePath( 16 * 16, false /* dissolve */ ); case VEEWIPE_TRANSITION: @@ -10329,6 +10364,35 @@ WaterfallWipePath.prototype.perform = function( nT ) { return this.bFlipOnYAxis ? flipOnYAxis(poly) : poly; } +/** Class DoubleDiamondWipePath + * + */ +function DoubleDiamondWipePath() { } + +DoubleDiamondWipePath.prototype.perform = functio
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 305 --- 1 file changed, 237 insertions(+), 68 deletions(-) New commits: commit dc5253d97c6e733746943fae462600f07772d35b Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 13 20:12:36 2017 +0530 tdf#51358 Add support for SpiralWipe transition in svg export Ported the class SpiralWipePath Change-Id: I3f24c3e32fb2994db0edb48e6c2bd017337c208a Reviewed-on: https://gerrit.libreoffice.org/35139 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index fbdc222e0013..0d4700bae119 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -5185,6 +5185,7 @@ BARNZIGZAGWIPE_TRANSITION = 18; // 11 FANWIPE_TRANSITION = 19; // 25 SINGLESWEEPWIPE_TRANSITION = 20; // 24 WATERFALLWIPE_TRANSITION= 21; // 34 +SPIRALWIPE_TRANSITION = 22; // 31 aTransitionTypeInMap = { 'barWipe' : BARWIPE_TRANSITION, @@ -5203,6 +5204,7 @@ aTransitionTypeInMap = { 'dissolve' : DISSOLVE_TRANSITION, 'singleSweepWipe' : SINGLESWEEPWIPE_TRANSITION, 'snakeWipe' : SNAKEWIPE_TRANSITION, +'spiralWipe': SPIRALWIPE_TRANSITION, 'irisWipe' : IRISWIPE_TRANSITION, 'veeWipe' : VEEWIPE_TRANSITION, 'zigZagWipe': ZIGZAGWIPE_TRANSITION, @@ -5283,76 +5285,92 @@ VERTICALLEFT_TRANS_SUBTYPE = 63; // 93 VERTICALRIGHT_TRANS_SUBTYPE = 64; // 94 HORIZONTALLEFT_TRANS_SUBTYPE= 65; // 95 HORIZONTALRIGHT_TRANS_SUBTYPE = 66; // 96 +TOPLEFTCLOCKWISE_TRANS_SUBTYPE = 67; // 69 +TOPRIGHTCLOCKWISE_TRANS_SUBTYPE = 68; // 70 +BOTTOMRIGHTCLOCKWISE_TRANS_SUBTYPE = 69; // 71 +BOTTOMLEFTCLOCKWISE_TRANS_SUBTYPE = 70; // 72 +TOPLEFTCOUNTERCLOCKWISE_TRANS_SUBTYPE = 71; // 73 +TOPRIGHTCOUNTERCLOCKWISE_TRANS_SUBTYPE = 72; // 74 +BOTTOMRIGHTCOUNTERCLOCKWISE_TRANS_SUBTYPE = 73; // 75 +BOTTOMLEFTCOUNTERCLOCKWISE_TRANS_SUBTYPE= 74; // 76 aTransitionSubtypeInMap = { -'default' : DEFAULT_TRANS_SUBTYPE, -'leftToRight' : LEFTTORIGHT_TRANS_SUBTYPE, -'topToBottom' : TOPTOBOTTOM_TRANS_SUBTYPE, -'cornersIn' : CORNERSIN_TRANS_SUBTYPE, -'cornersOut': CORNERSOUT_TRANS_SUBTYPE, -'vertical' : VERTICAL_TRANS_SUBTYPE, -'centerTop' : CENTERTOP_TRANS_SUBTYPE, -'centerRight' : CENTERRIGHT_TRANS_SUBTYPE, -'top' : TOP_TRANS_SUBTYPE, -'right' : RIGHT_TRANS_SUBTYPE, -'bottom': BOTTOM_TRANS_SUBTYPE, -'left' : LEFT_TRANS_SUBTYPE, -'horizontal': HORIZONTAL_TRANS_SUBTYPE, -'down' : DOWN_TRANS_SUBTYPE, -'circle': CIRCLE_TRANS_SUBTYPE, -'clockwiseTwelve' : CLOCKWISETWELVE_TRANS_SUBTYPE, -'clockwiseThree': CLOCKWISETHREE_TRANS_SUBTYPE, -'clockwiseSix' : CLOCKWISESIX_TRANS_SUBTYPE, -'clockwiseNine' : CLOCKWISENINE_TRANS_SUBTYPE, -'clockwiseRight': CLOCKWISERIGHT_TRANS_SUBTYPE, -'clockwiseTop' : CLOCKWISETOP_TRANS_SUBTYPE, -'clockwiseBottom' : CLOCKWISEBOTTOM_TRANS_SUBTYPE, -'clockwiseLeft' : CLOCKWISELEFT_TRANS_SUBTYPE, -'clockwiseTopLeft' : CLOCKWISETOPLEFT_TRANS_SUBTYPE, -'counterClockwiseBottomLeft' : COUNTERCLOCKWISEBOTTOMLEFT_TRANS_SUBTYPE, -'clockwiseBottomRight' : CLOCKWISEBOTTOMRIGHT_TRANS_SUBTYPE, -'counterClockwiseTopRight' : COUNTERCLOCKWISETOPRIGHT_TRANS_SUBTYPE, -'twoBladeVertical' : TWOBLADEVERTICAL_TRANS_SUBTYPE, -'twoBladeHorizontal': TWOBLADEHORIZONTAL_TRANS_SUBTYPE, -'fourBlade' : FOURBLADE_TRANS_SUBTYPE, -'fromLeft' : FROMLEFT_TRANS_SUBTYPE, -'fromTop' : FROMTOP_TRANS_SUBTYPE, -'fromRight' : FROMRIGHT_TRANS_SUBTYPE, -'fromBottom': FROMBOTTOM_TRANS_SUBTYPE, -'crossfade' : CROSSFADE_TRANS_SUBTYPE, -'fadeToColor' : FADETOCOLOR_TRANS_SUBTYPE, -'fadeFromColor' : FADEFROMCOLOR_TRANS_SUBTYPE, -'fadeOverColor' : FADEOVERCOLOR_TRANS_SUBTYPE, -'threeBlade': THREEBLADE_TRANS_SUBTYPE, -'eightBlade': EIGHTBLADE_TRANS_SUBTYPE, -'oneBlade' : ONEBLADE_TRANS_SUBTYPE, -'across': ACROSS_TRANS_SUBTYPE, -'topLeftVertical' : TOPLEFTVERTICAL_TRANS_SUBTYPE, -'topLeftHorizontal' : TOPLEFTHORIZONTAL_TRANS_SUBTYPE, -'topLeftDiagonal' : TOPLEFTDIAGONAL_TRANS_SUBTYPE, -'topRightDiagonal' : TOPRIGHTDIAGONAL_TRANS_SUBTYPE, -'bottomRightDiagonal': BOTTOMRIGHTDIAGONAL_TRANS_SUBTYPE, -'bottomLeftDiagonal': BOTTOMLEFTDIAGONAL_TRANS_SUBTYPE, -'rectangle' : RECTANGLE_TRANS_SUBT
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 7 commits - filter/source
filter/source/svg/presentation_engine.js | 722 +++ 1 file changed, 641 insertions(+), 81 deletions(-) New commits: commit d000db0eb4e1c6c769b8d383cf0e570ce248c682 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Sun Mar 12 23:16:30 2017 +0530 tdf#51358 Add Support for more slide transitions to Impress SVG Export Ported the class WaterfallWipe. Change-Id: I4856243c4b29e45f16ee780db42c2f742a6b1dc1 Reviewed-on: https://gerrit.libreoffice.org/35107 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 90e3af16263a..48cad273080f 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -5170,6 +5170,7 @@ ZIGZAGWIPE_TRANSITION = 17; // 10 BARNZIGZAGWIPE_TRANSITION = 18; // 11 FANWIPE_TRANSITION = 19; // 25 SINGLESWEEPWIPE_TRANSITION = 20; // 24 +WATERFALLWIPE_TRANSITION= 21; // 34 aTransitionTypeInMap = { 'barWipe' : BARWIPE_TRANSITION, @@ -5191,7 +5192,8 @@ aTransitionTypeInMap = { 'irisWipe' : IRISWIPE_TRANSITION, 'veeWipe' : VEEWIPE_TRANSITION, 'zigZagWipe': ZIGZAGWIPE_TRANSITION, -'barnZigZagWipe': BARNZIGZAGWIPE_TRANSITION +'barnZigZagWipe': BARNZIGZAGWIPE_TRANSITION, +'waterfallWipe' : WATERFALLWIPE_TRANSITION }; aTransitionTypeOutMap = [ '', 'barWipe', 'boxWipe', 'fourBoxWipe', 'ellipseWipe', @@ -5268,6 +5270,10 @@ CLOCKWISETOPLEFT_TRANS_SUBTYPE = 59; // 44 COUNTERCLOCKWISEBOTTOMLEFT_TRANS_SUBTYPE= 60; // 45 CLOCKWISEBOTTOMRIGHT_TRANS_SUBTYPE = 61; // 46 COUNTERCLOCKWISETOPRIGHT_TRANS_SUBTYPE = 62; // 47 +VERTICALLEFT_TRANS_SUBTYPE = 63; // 93 +VERTICALRIGHT_TRANS_SUBTYPE = 64; // 94 +HORIZONTALLEFT_TRANS_SUBTYPE= 65; // 95 +HORIZONTALRIGHT_TRANS_SUBTYPE = 66; // 96 aTransitionSubtypeInMap = { 'default' : DEFAULT_TRANS_SUBTYPE, @@ -5332,7 +5338,11 @@ aTransitionSubtypeInMap = { 'up': UP_TRANS_SUBTYPE, 'right' : RIGHT_TRANS_SUBTYPE, 'diagonalBottomLeft': DIAGONALBOTTOMLEFT_TRANS_SUBTYPE, -'diagonalTopLeft' : DIAGONALTOPLEFT_TRANS_SUBTYPE +'diagonalTopLeft' : DIAGONALTOPLEFT_TRANS_SUBTYPE, +'verticalLeft' : VERTICALLEFT_TRANS_SUBTYPE, +'verticalRight' : VERTICALRIGHT_TRANS_SUBTYPE, +'horizontalLeft': HORIZONTALLEFT_TRANS_SUBTYPE, +'horizontalRight' : HORIZONTALRIGHT_TRANS_SUBTYPE }; aTransitionSubtypeOutMap = [ 'default', 'leftToRight', 'topToBottom', 'cornersIn', @@ -5587,6 +5597,48 @@ aTransitionInfoTable[BARWIPE_TRANSITION][TOPTOBOTTOM_TRANS_SUBTYPE] = 'scaleIsotropically' : false }; +aTransitionInfoTable[WATERFALLWIPE_TRANSITION] = {}; +aTransitionInfoTable[WATERFALLWIPE_TRANSITION][VERTICALLEFT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 0.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_ROTATE_180, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[WATERFALLWIPE_TRANSITION][VERTICALRIGHT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 0.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_ROTATE_180, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[WATERFALLWIPE_TRANSITION][HORIZONTALLEFT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : -90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_ROTATE_180, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[WATERFALLWIPE_TRANSITION][HORIZONTALRIGHT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_ROTATE_180, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; + aTransitionInfoTable[BOXWIPE_TRANSITION] = {}; aTransitionInfoTable[BOXWIPE_TRANSITION][TOPLEFT_TRANS_SUBTYPE] = { @@ -9701,6 +9753,10 @@ function createClipPolyPolygon( nType, nSubtype ) // flipOnYAxis nSubtype == COUNTERCLOCKWISEBOTTOMLEFT_TRANS_SUBTYPE || nSubtype == COUNTERCLOCKWISETOPRIGHT_TRANS_SUBTYPE ); +case WATERFALLWIPE_TRANSITION: +return new WaterfallWipePath(128, // flipOnYAxis + nSubtype == VERTICALRIGHT_TRANS_SUBTYPE || + nSubtype == HORIZONTALLEFT_TRANS_SUBTYPE); case DISSOLVE_TRANSITION: return new RandomWipePath( 16 * 16,
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 105 ++- 1 file changed, 103 insertions(+), 2 deletions(-) New commits: commit 709f49bce86d2df4154d8075818f57cacfecb401 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Sun Mar 12 23:16:30 2017 +0530 tdf#51358 Add Support for more slide transitions to Impress SVG Export Ported the class WaterfallWipe. Change-Id: I4856243c4b29e45f16ee780db42c2f742a6b1dc1 Reviewed-on: https://gerrit.libreoffice.org/35107 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index fa42a8dbdf6b..fbdc222e0013 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -5184,6 +5184,7 @@ ZIGZAGWIPE_TRANSITION = 17; // 10 BARNZIGZAGWIPE_TRANSITION = 18; // 11 FANWIPE_TRANSITION = 19; // 25 SINGLESWEEPWIPE_TRANSITION = 20; // 24 +WATERFALLWIPE_TRANSITION= 21; // 34 aTransitionTypeInMap = { 'barWipe' : BARWIPE_TRANSITION, @@ -5205,7 +5206,8 @@ aTransitionTypeInMap = { 'irisWipe' : IRISWIPE_TRANSITION, 'veeWipe' : VEEWIPE_TRANSITION, 'zigZagWipe': ZIGZAGWIPE_TRANSITION, -'barnZigZagWipe': BARNZIGZAGWIPE_TRANSITION +'barnZigZagWipe': BARNZIGZAGWIPE_TRANSITION, +'waterfallWipe' : WATERFALLWIPE_TRANSITION }; /* @@ -5277,6 +5279,10 @@ CLOCKWISETOPLEFT_TRANS_SUBTYPE = 59; // 44 COUNTERCLOCKWISEBOTTOMLEFT_TRANS_SUBTYPE= 60; // 45 CLOCKWISEBOTTOMRIGHT_TRANS_SUBTYPE = 61; // 46 COUNTERCLOCKWISETOPRIGHT_TRANS_SUBTYPE = 62; // 47 +VERTICALLEFT_TRANS_SUBTYPE = 63; // 93 +VERTICALRIGHT_TRANS_SUBTYPE = 64; // 94 +HORIZONTALLEFT_TRANS_SUBTYPE= 65; // 95 +HORIZONTALRIGHT_TRANS_SUBTYPE = 66; // 96 aTransitionSubtypeInMap = { 'default' : DEFAULT_TRANS_SUBTYPE, @@ -5341,7 +5347,11 @@ aTransitionSubtypeInMap = { 'up': UP_TRANS_SUBTYPE, 'right' : RIGHT_TRANS_SUBTYPE, 'diagonalBottomLeft': DIAGONALBOTTOMLEFT_TRANS_SUBTYPE, -'diagonalTopLeft' : DIAGONALTOPLEFT_TRANS_SUBTYPE +'diagonalTopLeft' : DIAGONALTOPLEFT_TRANS_SUBTYPE, +'verticalLeft' : VERTICALLEFT_TRANS_SUBTYPE, +'verticalRight' : VERTICALRIGHT_TRANS_SUBTYPE, +'horizontalLeft': HORIZONTALLEFT_TRANS_SUBTYPE, +'horizontalRight' : HORIZONTALRIGHT_TRANS_SUBTYPE }; // Transition Modes @@ -5586,6 +5596,48 @@ aTransitionInfoTable[BARWIPE_TRANSITION][TOPTOBOTTOM_TRANS_SUBTYPE] = 'scaleIsotropically' : false }; +aTransitionInfoTable[WATERFALLWIPE_TRANSITION] = {}; +aTransitionInfoTable[WATERFALLWIPE_TRANSITION][VERTICALLEFT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 0.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_ROTATE_180, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[WATERFALLWIPE_TRANSITION][VERTICALRIGHT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 0.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_ROTATE_180, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[WATERFALLWIPE_TRANSITION][HORIZONTALLEFT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : -90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_ROTATE_180, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[WATERFALLWIPE_TRANSITION][HORIZONTALRIGHT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_ROTATE_180, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; + aTransitionInfoTable[BOXWIPE_TRANSITION] = {}; aTransitionInfoTable[BOXWIPE_TRANSITION][TOPLEFT_TRANS_SUBTYPE] = { @@ -9700,6 +9752,10 @@ function createClipPolyPolygon( nType, nSubtype ) // flipOnYAxis nSubtype == COUNTERCLOCKWISEBOTTOMLEFT_TRANS_SUBTYPE || nSubtype == COUNTERCLOCKWISETOPRIGHT_TRANS_SUBTYPE ); +case WATERFALLWIPE_TRANSITION: +return new WaterfallWipePath(128, // flipOnYAxis + nSubtype == VERTICALRIGHT_TRANS_SUBTYPE || + nSubtype == HORIZONTALLEFT_TRANS_SUBTYPE); case DISSOLVE_TRANSITION: return new RandomWipePath( 16 * 16, false /* dissolve */ ); case VEEWIPE_TRANSITION: @@ -10120,6 +10176,51 @@ BarnDoorWipePath.prototype.perform = function( nT )
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 270 --- 1 file changed, 215 insertions(+), 55 deletions(-) New commits: commit 6c7a2c9570e6a3fe3cc4b14f8831d934e458be01 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 6 01:56:01 2017 +0530 tdf#51358 Support for SweepWipe transition in SVG Export Ported the class SweepWipe Change-Id: Ia67b50ba53900efab977a4cb284f7d1514ff8113 Reviewed-on: https://gerrit.libreoffice.org/34906 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index b2383a9b4af7..fa42a8dbdf6b 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -5183,6 +5183,7 @@ VEEWIPE_TRANSITION = 16; // 8 ZIGZAGWIPE_TRANSITION = 17; // 10 BARNZIGZAGWIPE_TRANSITION = 18; // 11 FANWIPE_TRANSITION = 19; // 25 +SINGLESWEEPWIPE_TRANSITION = 20; // 24 aTransitionTypeInMap = { 'barWipe' : BARWIPE_TRANSITION, @@ -5199,6 +5200,7 @@ aTransitionTypeInMap = { 'randomBarWipe' : RANDOMBARWIPE_TRANSITION, 'checkerBoardWipe' : CHECKERBOARDWIPE_TRANSITION, 'dissolve' : DISSOLVE_TRANSITION, +'singleSweepWipe' : SINGLESWEEPWIPE_TRANSITION, 'snakeWipe' : SNAKEWIPE_TRANSITION, 'irisWipe' : IRISWIPE_TRANSITION, 'veeWipe' : VEEWIPE_TRANSITION, @@ -5212,61 +5214,69 @@ aTransitionTypeInMap = { * C++ implementations. */ // Transition Subtypes -DEFAULT_TRANS_SUBTYPE = 0; -LEFTTORIGHT_TRANS_SUBTYPE = 1; -TOPTOBOTTOM_TRANS_SUBTYPE = 2; -CORNERSIN_TRANS_SUBTYPE = 3; // 11 -CORNERSOUT_TRANS_SUBTYPE= 4; -VERTICAL_TRANS_SUBTYPE = 5; -HORIZONTAL_TRANS_SUBTYPE= 6; // 14 -DOWN_TRANS_SUBTYPE = 7; // 19 -CIRCLE_TRANS_SUBTYPE= 8; // 27 -CLOCKWISETWELVE_TRANS_SUBTYPE = 9; // 33 -CLOCKWISETHREE_TRANS_SUBTYPE= 10; -CLOCKWISESIX_TRANS_SUBTYPE = 11; -CLOCKWISENINE_TRANS_SUBTYPE = 12; -TWOBLADEVERTICAL_TRANS_SUBTYPE = 13; -TWOBLADEHORIZONTAL_TRANS_SUBTYPE= 14; -FOURBLADE_TRANS_SUBTYPE = 15; // 39 -FROMLEFT_TRANS_SUBTYPE = 16; // 97 -FROMTOP_TRANS_SUBTYPE = 17; -FROMRIGHT_TRANS_SUBTYPE = 18; -FROMBOTTOM_TRANS_SUBTYPE= 19; -CROSSFADE_TRANS_SUBTYPE = 20; -FADETOCOLOR_TRANS_SUBTYPE = 21; -FADEFROMCOLOR_TRANS_SUBTYPE = 22; -FADEOVERCOLOR_TRANS_SUBTYPE = 23; -THREEBLADE_TRANS_SUBTYPE= 24; -EIGHTBLADE_TRANS_SUBTYPE= 25; -ONEBLADE_TRANS_SUBTYPE = 26; // 107 -ACROSS_TRANS_SUBTYPE= 27; -TOPLEFTVERTICAL_TRANS_SUBTYPE = 28; // 109 -TOPLEFTHORIZONTAL_TRANS_SUBTYPE = 29; // 64 -TOPLEFTDIAGONAL_TRANS_SUBTYPE = 30; // 65 -TOPRIGHTDIAGONAL_TRANS_SUBTYPE = 31; // 66 -BOTTOMRIGHTDIAGONAL_TRANS_SUBTYPE = 32; // 67 -BOTTOMLEFTDIAGONAL_TRANS_SUBTYPE= 33; // 68 -RECTANGLE_TRANS_SUBTYPE = 34; // 101 -DIAMOND_TRANS_SUBTYPE = 35; // 102 -TOPLEFT_TRANS_SUBTYPE = 36; // 3 -TOPRIGHT_TRANS_SUBTYPE = 37; // 4 -BOTTOMRIGHT_TRANS_SUBTYPE = 38; // 5 -BOTTOMLEFT_TRANS_SUBTYPE= 39; // 6 -TOPCENTER_TRANS_SUBTYPE = 40; // 7 -RIGHTCENTER_TRANS_SUBTYPE = 41; // 8 -BOTTOMCENTER_TRANS_SUBTYPE = 42; // 9 -LEFTCENTER_TRANS_SUBTYPE= 43; // 10 -LEFT_TRANS_SUBTYPE = 44; // 20 -UP_TRANS_SUBTYPE= 45; // 21 -RIGHT_TRANS_SUBTYPE = 46; // 22 -DIAGONALBOTTOMLEFT_TRANS_SUBTYPE= 47; // 15 -DIAGONALTOPLEFT_TRANS_SUBTYPE = 48; // 16 -CENTERTOP_TRANS_SUBTYPE = 49; // 48 -CENTERRIGHT_TRANS_SUBTYPE = 50; // 49 -TOP_TRANS_SUBTYPE = 51; // 50 -RIGHT_TRANS_SUBTYPE = 52; // 22 -BOTTOM_TRANS_SUBTYPE= 53; // 52 -LEFT_TRANS_SUBTYPE = 54; // 20 +DEFAULT_TRANS_SUBTYPE = 0; +LEFTTORIGHT_TRANS_SUBTYPE = 1; +TOPTOBOTTOM_TRANS_SUBTYPE = 2; +CORNERSIN_TRANS_SUBTYPE = 3; // 11 +CORNERSOUT_TRANS_SUBTYPE= 4; +VERTICAL_TRANS_SUBTYPE = 5; +HORIZONTAL_TRANS_SUBTYPE= 6; // 14 +DOWN_TRANS_SUBTYPE = 7; // 19 +CIRCLE_TRANS_SUBTYPE= 8; // 27 +CLOCKWISETWELVE_TRANS_SUBTYPE = 9; // 33 +CLOCKWISETHREE_TRANS_SUBTYPE= 10; +CLOCKWISESIX_TRANS_SUBTYPE = 11; +CLOCKWISENINE_TRANS_SUBTYPE = 12; +TWOBLADEVERTICAL_TRANS_SUBTYPE = 13; +TWOBLADEHORIZONTAL_TRANS_SUBTY
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 115 +++ 1 file changed, 115 insertions(+) New commits: commit 616efc4a11481ecafe40ca1de3ef93841c11dc9a Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Sat Feb 4 03:15:06 2017 +0530 tdf#51358 Add Support for FanWipe class Ported the class FanWipe In SVG engine. Change-Id: I8a067f2df32968bb00d5b3adc020bc9ee8296f33 Reviewed-on: https://gerrit.libreoffice.org/33910 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index d46cc96d235d..b2383a9b4af7 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -5182,6 +5182,7 @@ BARNDOORWIPE_TRANSITION = 15; // 4 VEEWIPE_TRANSITION = 16; // 8 ZIGZAGWIPE_TRANSITION = 17; // 10 BARNZIGZAGWIPE_TRANSITION = 18; // 11 +FANWIPE_TRANSITION = 19; // 25 aTransitionTypeInMap = { 'barWipe' : BARWIPE_TRANSITION, @@ -5194,6 +5195,7 @@ aTransitionTypeInMap = { 'pushWipe' : PUSHWIPE_TRANSITION, 'slideWipe' : SLIDEWIPE_TRANSITION, 'fade' : FADE_TRANSITION, +'fanWipe' : FANWIPE_TRANSITION, 'randomBarWipe' : RANDOMBARWIPE_TRANSITION, 'checkerBoardWipe' : CHECKERBOARDWIPE_TRANSITION, 'dissolve' : DISSOLVE_TRANSITION, @@ -5259,6 +5261,12 @@ UP_TRANS_SUBTYPE= 45; // 21 RIGHT_TRANS_SUBTYPE = 46; // 22 DIAGONALBOTTOMLEFT_TRANS_SUBTYPE= 47; // 15 DIAGONALTOPLEFT_TRANS_SUBTYPE = 48; // 16 +CENTERTOP_TRANS_SUBTYPE = 49; // 48 +CENTERRIGHT_TRANS_SUBTYPE = 50; // 49 +TOP_TRANS_SUBTYPE = 51; // 50 +RIGHT_TRANS_SUBTYPE = 52; // 22 +BOTTOM_TRANS_SUBTYPE= 53; // 52 +LEFT_TRANS_SUBTYPE = 54; // 20 aTransitionSubtypeInMap = { 'default' : DEFAULT_TRANS_SUBTYPE, @@ -5267,6 +5275,12 @@ aTransitionSubtypeInMap = { 'cornersIn' : CORNERSIN_TRANS_SUBTYPE, 'cornersOut': CORNERSOUT_TRANS_SUBTYPE, 'vertical' : VERTICAL_TRANS_SUBTYPE, +'centerTop' : CENTERTOP_TRANS_SUBTYPE, +'centerRight' : CENTERRIGHT_TRANS_SUBTYPE, +'top' : TOP_TRANS_SUBTYPE, +'right' : RIGHT_TRANS_SUBTYPE, +'bottom': BOTTOM_TRANS_SUBTYPE, +'left' : LEFT_TRANS_SUBTYPE, 'horizontal': HORIZONTAL_TRANS_SUBTYPE, 'down' : DOWN_TRANS_SUBTYPE, 'circle': CIRCLE_TRANS_SUBTYPE, @@ -5765,6 +5779,69 @@ aTransitionInfoTable[VEEWIPE_TRANSITION][RIGHT_TRANS_SUBTYPE] = 'scaleIsotropically' : false }; +aTransitionInfoTable[FANWIPE_TRANSITION] = {}; +aTransitionInfoTable[FANWIPE_TRANSITION][CENTERTOP_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 0.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_FLIP_Y, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[FANWIPE_TRANSITION][CENTERRIGHT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_FLIP_X, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[FANWIPE_TRANSITION][TOP_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 180.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_FLIP_Y, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[FANWIPE_TRANSITION][RIGHT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : -90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_FLIP_X, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[FANWIPE_TRANSITION][BOTTOM_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 180.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_FLIP_Y, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[FANWIPE_TRANSITION][LEFT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_FLIP_X, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; + + aTransitionInfoTable[PINWHEELWIPE_TRANSITION] = {}; aTransitionInfoTable[PINWHEELWIPE_TRANSITION][ONEBLADE_TRANS_SUBTYPE] = aTransitionInfoTable[PINWHEELWIPE_TRANSITION][TWOBLADEVERTICAL_TRANS_SUBTYPE] = @@ -9454,6 +9531,9 @@ function createClipPolyPolygo
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 112 ++- 1 file changed, 111 insertions(+), 1 deletion(-) New commits: commit 7a64ad57036234c90dda0ba1fefdf8867114305e Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Tue Jan 31 18:52:58 2017 +0530 tdf#51358 Support for ZigZag-Wipe transition animation in SVG support Ported classes ZigZagWipe and BarnZigZagWipe Change-Id: Ib15929c24dc952944ac4de5b71c541cdd99affcc Reviewed-on: https://gerrit.libreoffice.org/33763 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 33b958530c13..d46cc96d235d 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -5180,6 +5180,8 @@ SNAKEWIPE_TRANSITION= 13; // 30 IRISWIPE_TRANSITION = 14; // 12 BARNDOORWIPE_TRANSITION = 15; // 4 VEEWIPE_TRANSITION = 16; // 8 +ZIGZAGWIPE_TRANSITION = 17; // 10 +BARNZIGZAGWIPE_TRANSITION = 18; // 11 aTransitionTypeInMap = { 'barWipe' : BARWIPE_TRANSITION, @@ -5197,7 +5199,9 @@ aTransitionTypeInMap = { 'dissolve' : DISSOLVE_TRANSITION, 'snakeWipe' : SNAKEWIPE_TRANSITION, 'irisWipe' : IRISWIPE_TRANSITION, -'veeWipe' : VEEWIPE_TRANSITION +'veeWipe' : VEEWIPE_TRANSITION, +'zigZagWipe': ZIGZAGWIPE_TRANSITION, +'barnZigZagWipe': BARNZIGZAGWIPE_TRANSITION }; /* @@ -5484,6 +5488,50 @@ aTransitionInfoTable[IRISWIPE_TRANSITION][DIAMOND_TRANS_SUBTYPE] = 'scaleIsotropically': false }; +aTransitionInfoTable[ZIGZAGWIPE_TRANSITION] = {}; +aTransitionInfoTable[ZIGZAGWIPE_TRANSITION][LEFTTORIGHT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 0.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_FLIP_X, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[ZIGZAGWIPE_TRANSITION][TOPTOBOTTOM_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_FLIP_Y, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; + +aTransitionInfoTable[BARNZIGZAGWIPE_TRANSITION] = {}; +aTransitionInfoTable[BARNZIGZAGWIPE_TRANSITION][VERTICAL_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 0.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_IGNORE, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[BARNZIGZAGWIPE_TRANSITION][HORIZONTAL_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_IGNORE, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; + aTransitionInfoTable[BARWIPE_TRANSITION] = {}; aTransitionInfoTable[BARWIPE_TRANSITION][LEFTTORIGHT_TRANS_SUBTYPE] = { @@ -9440,6 +9488,10 @@ function createClipPolyPolygon( nType, nSubtype ) return new RandomWipePath( 128, true /* bars */ ); case CHECKERBOARDWIPE_TRANSITION: return new CheckerBoardWipePath( 10 ); +case ZIGZAGWIPE_TRANSITION: +return new ZigZagWipePath( 5 ); +case BARNZIGZAGWIPE_TRANSITION: +return new BarnZigZagWipePath( 5 ); case IRISWIPE_TRANSITION: switch(nSubtype) { @@ -9820,6 +9872,64 @@ IrisWipePath.prototype.perform = function( nT ) { return aPath; } +/** + * Class ZigZagWipePath + * + * @param nZigs + * + */ +function ZigZagWipePath(nZigs) { +this.zigEdge = 1.0/nZigs; +const d = this.zigEdge; +const d2 = (d / 2.0); +this.aBasePath = 'M ' + (-1.0 - d) + ' ' + -d + ' '; +this.aBasePath += 'L ' + (-1.0 - d) + ' ' + (1.0 + d) + ' '; +this.aBasePath += 'L ' + -d + ' ' + (1.0 + d) + ' '; + +for(var pos = (nZigs + 2); pos--; ) { +this.aBasePath += 'L ' + 0.0 + ' ' + ((pos - 1) * d + d2) + ' '; +this.aBasePath += 'L ' + -d + ' ' + (pos - 1) * d + ' '; +} +this.aBasePath += 'L ' + (-1.0 - d) + ' ' + -d + ' '; +} + +ZigZagWipePath.prototype.perform = function( nT ) { +var res = document.createElementNS( NSS['svg'], 'path'); +res.setAttribute('d', this.aBasePath); +res.matrixTransform(SVGIdentityMatrix.translate((1.0 + this.zigEdge) * nT, 0.0)); +return res; +} + +/* + * Class BarnZigZagWipePath + * + * @param nZigs + * + */ +function BarnZigZagWipePath( nZigs ) { ZigZagWipePath.call(this, nZigs); } + +BarnZigZagWipePath.prototype = Object.create(ZigZagWipePath); + +BarnZigZagWipePath.prototype.perform = function( nT ) { +var res = createEmptyPath(); +var poly = docume
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) New commits: commit 2fa9b7d004af0ff180e0220f6d26cb98b033e863 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Tue Mar 14 20:00:16 2017 +0530 Fixed my mistake: fix flipOnYAxis for SVGPathElement Fix flipOnYAxis() method which was the cause of some SnakeWipePath transition subtypes not working. Change-Id: I1bea5bdddf6c6312384f59d8614a0a2bc1a6e3ba Reviewed-on: https://gerrit.libreoffice.org/35191 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Tested-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 3a0f95b..33b9585 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -4572,12 +4572,22 @@ SVGPathElement.prototype.appendPath = function( aPath ) this.setAttribute( 'd', sPathData ); }; +/** flipOnYAxis + * Flips the SVG Path element along y-axis. + * + * @param aPath + * An object of type SVGPathElement to be flipped. + */ function flipOnYAxis( aPath ) { -var aMatrix = SVGIdentityMatrix.flipY().scaleNonUniform(-1, 1); -aPath.matrixTransform(aMatrix); -return aPath; +var aPolyPath = aPath.cloneNode(true); +var aTransform = document.documentElement.createSVGMatrix(); +aTransform.a = -1; +aTransform.e = 1; +aPolyPath.matrixTransform(aTransform); +return aPolyPath; } + /** SVGPathElement.matrixTransform * Apply the transformation defined by the passed matrix to the referenced * svg element. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 89 --- 1 file changed, 83 insertions(+), 6 deletions(-) New commits: commit dd83aa90677cab526b4ea38caaeb6e0961c1a0be Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Thu Jan 19 23:06:09 2017 +0530 tdf#51358 Support for BarnDoorWipe transition animation in SVG support ported the class BarnDoorWipe Change-Id: I10c98cf575c76bb0c96a9622721d1ab368941dca Reviewed-on: https://gerrit.libreoffice.org/33323 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 8722327..3a0f95b 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -5168,11 +5168,13 @@ CHECKERBOARDWIPE_TRANSITION = 11; // 39 DISSOLVE_TRANSITION = 12; // 40 SNAKEWIPE_TRANSITION= 13; // 30 IRISWIPE_TRANSITION = 14; // 12 -VEEWIPE_TRANSITION = 17; // 8 +BARNDOORWIPE_TRANSITION = 15; // 4 +VEEWIPE_TRANSITION = 16; // 8 aTransitionTypeInMap = { 'barWipe' : BARWIPE_TRANSITION, 'boxWipe' : BOXWIPE_TRANSITION, +'barnDoorWipe' : BARNDOORWIPE_TRANSITION, 'fourBoxWipe' : FOURBOXWIPE_TRANSITION, 'ellipseWipe' : ELLIPSEWIPE_TRANSITION, 'clockWipe' : CLOCKWIPE_TRANSITION, @@ -5230,10 +5232,10 @@ BOTTOMRIGHTDIAGONAL_TRANS_SUBTYPE = 32; // 67 BOTTOMLEFTDIAGONAL_TRANS_SUBTYPE= 33; // 68 RECTANGLE_TRANS_SUBTYPE = 34; // 101 DIAMOND_TRANS_SUBTYPE = 35; // 102 -TOPLEFT_TRANS_SUBTYPE = 36 // 3 -TOPRIGHT_TRANS_SUBTYPE = 37 // 4 -BOTTOMRIGHT_TRANS_SUBTYPE = 38 // 5 -BOTTOMLEFT_TRANS_SUBTYPE= 39 // 6 +TOPLEFT_TRANS_SUBTYPE = 36; // 3 +TOPRIGHT_TRANS_SUBTYPE = 37; // 4 +BOTTOMRIGHT_TRANS_SUBTYPE = 38; // 5 +BOTTOMLEFT_TRANS_SUBTYPE= 39; // 6 TOPCENTER_TRANS_SUBTYPE = 40; // 7 RIGHTCENTER_TRANS_SUBTYPE = 41; // 8 BOTTOMCENTER_TRANS_SUBTYPE = 42; // 9 @@ -5241,6 +5243,8 @@ LEFTCENTER_TRANS_SUBTYPE= 43; // 10 LEFT_TRANS_SUBTYPE = 44; // 20 UP_TRANS_SUBTYPE= 45; // 21 RIGHT_TRANS_SUBTYPE = 46; // 22 +DIAGONALBOTTOMLEFT_TRANS_SUBTYPE= 47; // 15 +DIAGONALTOPLEFT_TRANS_SUBTYPE = 48; // 16 aTransitionSubtypeInMap = { 'default' : DEFAULT_TRANS_SUBTYPE, @@ -5289,7 +5293,9 @@ aTransitionSubtypeInMap = { 'leftCenter': LEFTCENTER_TRANS_SUBTYPE, 'left' : LEFT_TRANS_SUBTYPE, 'up': UP_TRANS_SUBTYPE, -'right' : RIGHT_TRANS_SUBTYPE +'right' : RIGHT_TRANS_SUBTYPE, +'diagonalBottomLeft': DIAGONALBOTTOMLEFT_TRANS_SUBTYPE, +'diagonalTopLeft' : DIAGONALTOPLEFT_TRANS_SUBTYPE }; // Transition Modes @@ -5401,6 +5407,48 @@ aTransitionInfoTable[SNAKEWIPE_TRANSITION][BOTTOMLEFTDIAGONAL_TRANS_SUBTYPE] = 'reverseMethod' : REVERSEMETHOD_ROTATE_180, 'outInvertSweep' : true, 'scaleIsotropically' : false +} + +aTransitionInfoTable[BARNDOORWIPE_TRANSITION] = {}; +aTransitionInfoTable[BARNDOORWIPE_TRANSITION][VERTICAL_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle': 0.0, +'scaleX': 1.0, +'scaleY': 1.0, +'reverseMethod': REVERSEMETHOD_SUBTRACT_AND_INVERT, +'outInvertsSweep': true, +'scaleIsotropically': false +}; +aTransitionInfoTable[BARNDOORWIPE_TRANSITION][HORIZONTAL_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle': 90.0, +'scaleX': 1.0, +'scaleY': 1.0, +'reverseMethod': REVERSEMETHOD_SUBTRACT_AND_INVERT, +'outInvertsSweep': true, +'scaleIsotropically': false +}; +aTransitionInfoTable[BARNDOORWIPE_TRANSITION][DIAGONALBOTTOMLEFT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle': 45.0, +'scaleX': Math.SQRT2, +'scaleY': Math.SQRT2, +'reverseMethod': REVERSEMETHOD_SUBTRACT_AND_INVERT, +'outInvertsSweep': true, +'scaleIsotropically': false +}; +aTransitionInfoTable[BARNDOORWIPE_TRANSITION][DIAGONALTOPLEFT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle': -45.0, +'scaleX': Math.SQRT2, +'scaleY': Math.SQRT2, +'reverseMethod': REVERSEMETHOD_SUBTRACT_AND_INVERT, +'outInvertsSweep': true, +'scaleIsotropically': false }; aTransitionInfoTable[IRISWIPE_TRANSITION] = {}; @@ -9393,6 +9441,8 @@ function createClipPolyPolygon( nType, nSubtype ) log( 'createClipPolyPolygon: unknown subtype: ' + nSubtype ); return null; } +case BARNDOORWIPE_TRANSITION: +return new BarnDoorWipePath(true); case D
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 45 +++ 1 file changed, 16 insertions(+), 29 deletions(-) New commits: commit a3f768eb74bd439b656bd6df639b50133b09a5f2 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Sun Feb 5 01:33:43 2017 +0530 Fix flip issue in Snake animation subtype Fix flipOnYAxis function, alongwith minor tweaks. Change-Id: If8958de9eb651a15f86963f2e40eb364011ce41f Reviewed-on: https://gerrit.libreoffice.org/33918 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 801da82..8722327 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -4574,7 +4574,7 @@ SVGPathElement.prototype.appendPath = function( aPath ) function flipOnYAxis( aPath ) { -var aMatrix = SVGIdentityMatrix.scaleNonUniform(-1, 1).translate(1, 0); +var aMatrix = SVGIdentityMatrix.flipY().scaleNonUniform(-1, 1); aPath.matrixTransform(aMatrix); return aPath; } @@ -9859,24 +9859,18 @@ function SnakeWipePath(nElements, bDiagonal, bflipOnYAxis) SnakeWipePath.prototype.calcSnake = function(t) { var aPolyPath = createEmptyPath(); -var res = this.aBasePath.cloneNode(true); -var area = (t * this.sqrtElements * this.sqrtElements); -var line_ = Math.floor(area / this.sqrtElements); -var line = pruneScaleValue(line_ / this.sqrtElements); -var col= pruneScaleValue((area - (line_ * this.sqrtElements)) / this.sqrtElements); -var aTransform; +const area = (t * this.sqrtElements * this.sqrtElements); +const line_ = Math.floor(area) / this.sqrtElements; +const line = pruneScaleValue(line_ / this.sqrtElements); +const col= pruneScaleValue((area - (line_ * this.sqrtElements)) / this.sqrtElements); if(line != 0) { -var aPoint = document.documentElement.createSVGPoint(); -var aPath = 'M '+ aPoint.x + ' ' + aPoint.y + ' '; -aPoint.y = line; -aPath += 'L ' + aPoint.x + ' ' + aPoint.y + ' '; -aPoint.x = 1.0; -aPath += 'L ' + aPoint.x + ' ' + aPoint.y + ' '; -aPoint.y = 0.0; -aPath += 'L ' + aPoint.x + ' ' + aPoint.y + ' '; +let aPath = 'M '+ 0.0 + ' ' + 0.0 + ' '; +aPath += 'L ' + 0.0 + ' ' + line + ' '; +aPath += 'L ' + 1.0 + ' ' + line + ' '; +aPath += 'L ' + 1.0 + ' ' + 0.0 + ' '; aPath += 'L 0 0 '; -var poly = document.createElementNS( NSS['svg'], 'path'); +let poly = document.createElementNS( NSS['svg'], 'path'); poly.setAttribute('d', aPath); aPolyPath.appendPath(poly); } @@ -9886,19 +9880,12 @@ SnakeWipePath.prototype.calcSnake = function(t) // odd line: => right to left offset = (1.0 - col); } -var aPoint = document.documentElement.createSVGPoint(); -aPoint.x = offset; -aPoint.y = line; -var aPath = 'M ' + aPoint.x + ' ' + aPoint.y + ' '; -aPoint.y += this.elementEdge; -aPath += 'L '+ aPoint.x + ' ' + aPoint.y + ' '; -aPoint.x = offset + col; -aPath += 'L ' + aPoint.x + ' ' + aPoint.y + ' '; -aPoint.y = line; -aPath += 'L ' + aPoint.x + ' ' + aPoint.y + ' '; -aPoint.x = offset; -aPath += 'L ' + aPoint.x + ' ' + aPoint.y + ' '; -var poly = document.createElementNS( NSS['svg'], 'path'); +let aPath = 'M ' + offset + ' ' + line + ' '; +aPath += 'L '+ offset + ' ' + (line + this.elementEdge) + ' '; +aPath += 'L ' + (offset+col) + ' ' + (line + this.elementEdge) + ' '; +aPath += 'L ' + (offset+col) + ' ' + line + ' '; +aPath += 'L ' + offset + ' ' + line + ' '; +let poly = document.createElementNS( NSS['svg'], 'path'); poly.setAttribute('d', aPath); aPolyPath.appendPath(poly); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 14 ++ 1 file changed, 14 insertions(+) New commits: commit 74b54e33135bb99513142e671369e4f3f6370d55 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Fri Feb 3 01:56:42 2017 +0530 tdf#51358 Importing ClockWipe in SVG engine Most of the constants and transition info table were already written, i just added the perform method. Change-Id: Ib8e2d8e7ca7e26dc54a1e309a2b6271ee7603f34 Reviewed-on: https://gerrit.libreoffice.org/33847 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index b5ca5d7..801da82 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -9376,6 +9376,8 @@ function createClipPolyPolygon( nType, nSubtype ) return null; } return new PinWheelWipePath( nBlades ); +case CLOCKWIPE_TRANSITION: +return new ClockWipePath(); case RANDOMBARWIPE_TRANSITION: return new RandomWipePath( 128, true /* bars */ ); case CHECKERBOARDWIPE_TRANSITION: @@ -9618,7 +9620,19 @@ EllipseWipePath.prototype.perform = function( nT ) }; +/** + * Class ClockWipePath + * + */ +function ClockWipePath() { } +ClockWipePath.prototype.perform = function( nT ) { +const aTransform = SVGIdentityMatrix.scaleNonUniform(0.5, 0.5).translate(0.5, 0.5); +var aPolyPath = PinWheelWipePath.calcCenteredClock(nT, 1.0); +aPolyPath.matrixTransform( aTransform ); + +return aPolyPath; +} /** Class PinWheelWipePath * This class handles a parametric poly-path that is used for performing ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 74 ++- 1 file changed, 72 insertions(+), 2 deletions(-) New commits: commit b5b6317e4e35a2a1a81c90dda6e6e4e5457471ee Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Tue Jan 31 23:27:07 2017 +0530 tdf#51358 Support for VeeWipe transition in SVG Support Ported the class Veewipe Change-Id: I13b9d7235967e3dd1b1b1638c27e76d11708d1e0 Reviewed-on: https://gerrit.libreoffice.org/33764 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index a4f0288..b5ca5d7 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -5168,6 +5168,7 @@ CHECKERBOARDWIPE_TRANSITION = 11; // 39 DISSOLVE_TRANSITION = 12; // 40 SNAKEWIPE_TRANSITION= 13; // 30 IRISWIPE_TRANSITION = 14; // 12 +VEEWIPE_TRANSITION = 17; // 8 aTransitionTypeInMap = { 'barWipe' : BARWIPE_TRANSITION, @@ -5183,7 +5184,8 @@ aTransitionTypeInMap = { 'checkerBoardWipe' : CHECKERBOARDWIPE_TRANSITION, 'dissolve' : DISSOLVE_TRANSITION, 'snakeWipe' : SNAKEWIPE_TRANSITION, -'irisWipe' : IRISWIPE_TRANSITION +'irisWipe' : IRISWIPE_TRANSITION, +'veeWipe' : VEEWIPE_TRANSITION }; /* @@ -5236,6 +5238,9 @@ TOPCENTER_TRANS_SUBTYPE = 40; // 7 RIGHTCENTER_TRANS_SUBTYPE = 41; // 8 BOTTOMCENTER_TRANS_SUBTYPE = 42; // 9 LEFTCENTER_TRANS_SUBTYPE= 43; // 10 +LEFT_TRANS_SUBTYPE = 44; // 20 +UP_TRANS_SUBTYPE= 45; // 21 +RIGHT_TRANS_SUBTYPE = 46; // 22 aTransitionSubtypeInMap = { 'default' : DEFAULT_TRANS_SUBTYPE, @@ -5281,7 +5286,10 @@ aTransitionSubtypeInMap = { 'topCenter' : TOPCENTER_TRANS_SUBTYPE, 'rightCenter' : RIGHTCENTER_TRANS_SUBTYPE, 'bottomCenter' : BOTTOMCENTER_TRANS_SUBTYPE, -'leftCenter': LEFTCENTER_TRANS_SUBTYPE +'leftCenter': LEFTCENTER_TRANS_SUBTYPE, +'left' : LEFT_TRANS_SUBTYPE, +'up': UP_TRANS_SUBTYPE, +'right' : RIGHT_TRANS_SUBTYPE }; // Transition Modes @@ -5609,6 +5617,48 @@ aTransitionInfoTable[CLOCKWIPE_TRANSITION][CLOCKWISENINE_TRANS_SUBTYPE] = 'scaleIsotropically' : false }; +aTransitionInfoTable[VEEWIPE_TRANSITION] = {}; +aTransitionInfoTable[VEEWIPE_TRANSITION][DOWN_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 0.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_FLIP_Y, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[VEEWIPE_TRANSITION][LEFT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_FLIP_X, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[VEEWIPE_TRANSITION][UP_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 180.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_FLIP_Y, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[VEEWIPE_TRANSITION][RIGHT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : -90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_FLIP_X, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; + aTransitionInfoTable[PINWHEELWIPE_TRANSITION] = {}; aTransitionInfoTable[PINWHEELWIPE_TRANSITION][ONEBLADE_TRANS_SUBTYPE] = aTransitionInfoTable[PINWHEELWIPE_TRANSITION][TWOBLADEVERTICAL_TRANS_SUBTYPE] = @@ -9343,6 +9393,8 @@ function createClipPolyPolygon( nType, nSubtype ) } case DISSOLVE_TRANSITION: return new RandomWipePath( 16 * 16, false /* dissolve */ ); +case VEEWIPE_TRANSITION: +return new VeeWipePath(); case SNAKEWIPE_TRANSITION: return new SnakeWipePath( 8 * 8, // diagonal nSubtype == TOPLEFTDIAGONAL_TRANS_SUBTYPE || @@ -10003,6 +10055,24 @@ RandomWipePath.prototype.perform = function( nT ) return this.aClipPath.cloneNode( true ); }; +/** Class VeeWipePath + * + */ +function VeeWipePath() { } + +VeeWipePath.prototype.perform = function( nT ) { +const d = pruneScaleValue(2.0 * nT); +var polyPath = 'M ' + 0.0 + ' ' + -1.0 + ' '; +polyPath += 'L ' + 0.0 + ' ' + (d - 1.0) + ' '; +polyPath += 'L ' + 0.5 + ' ' + d + ' '; +polyPath += 'L ' + 1.0 + ' ' + (d - 1.0) + ' '; +polyPath += 'L ' + 1.0 + ' ' + -1.0 + ' '; +poly
[Libreoffice-commits] core.git: sd/source sd/uiconfig
sd/source/ui/dlg/prltempl.cxx |1 + sd/source/ui/func/futempl.cxx | 22 ++ sd/source/ui/inc/prltempl.hxx |1 + sd/uiconfig/sdraw/ui/drawprtldialog.ui | 14 ++ 4 files changed, 38 insertions(+) New commits: commit a04abc59ae24690992a771305a4e89451c77c289 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Sat Jan 21 01:31:34 2017 +0530 tdf#96681 Lack of UI to change the text background color of a style Added Highlighting tab to Edit Style button in impress Change-Id: I9426f583da4078cd380823bbaa30ce1941ffa3bd Reviewed-on: https://gerrit.libreoffice.org/23684 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Katarina Behrens <katarina.behr...@cib.de> diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx index 7c25490..03dfaf4 100644 --- a/sd/source/ui/dlg/prltempl.cxx +++ b/sd/source/ui/dlg/prltempl.cxx @@ -149,6 +149,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, mnTab = AddTabPage( "RID_SVXPAGE_TABULATOR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TABULATOR ), nullptr ); mnAsian = AddTabPage( "RID_SVXPAGE_PARA_ASIAN", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PARA_ASIAN ), nullptr ); mnAlign = AddTabPage( "RID_SVXPAGE_ALIGN_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGN_PARAGRAPH ), nullptr ); +mnBackground = AddTabPage( "RID_SVXPAGE_BACKGROUND", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr); SvtCJKOptions aCJKOptions; if( !aCJKOptions.IsAsianTypographyEnabled() ) diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index bd97800..30893d8 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -36,6 +36,8 @@ #include #include #include +#include +#include #include #include @@ -103,6 +105,10 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) SfxStyleSheetBase* pStyleSheet = nullptr; const SfxPoolItem* pItem; +static const sal_uInt16 aRanges[] = { +EE_ITEMS_START, EE_ITEMS_END, +SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR +}; SfxStyleFamily nFamily = (SfxStyleFamily)USHRT_MAX; if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY, false, )) @@ -299,6 +305,15 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) ScopedVclPtr pPresDlg; SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); bool bOldDocInOtherLanguage = false; +SfxItemSet aNewAttr(mpViewShell->GetPool(), aRanges); + +if( aNewAttr.GetItemState( XATTR_FILLBACKGROUND, true, ) == SfxItemState::SET) +{ +Color aBackColor = static_cast(pItem)->GetValue(); +SvxBrushItem aBrushItem(aBackColor, XATTR_FILLBACKGROUND); +aNewAttr.ClearItem(XATTR_FILLBACKGROUND); +aNewAttr.Put(aBrushItem); +} SfxStyleFamily eFamily = pStyleSheet->GetFamily(); @@ -399,6 +414,13 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) SfxItemSet aTempSet(*pOutSet); static_cast<SdStyleSheet*>(pStyleSheet)->AdjustToFontHeight(aTempSet); +const SvxBrushItem* pBrushItem = static_cast(aTempSet.GetItem(XATTR_FILLBACKGROUND)); +if( pBrushItem ) +{ + SvxBackgroundColorItem aBackColorItem( pBrushItem->GetColor(), EE_CHAR_BKGCOLOR); + aTempSet.ClearItem(XATTR_FILLBACKGROUND); + aTempSet.Put(aBackColorItem); +} /* Special treatment: reset the INVALIDS to NULL-Pointer (otherwise INVALIDs or pointer point to DefaultItems in the template; both would diff --git a/sd/source/ui/inc/prltempl.hxx b/sd/source/ui/inc/prltempl.hxx index e2b8bc6..0694e86 100644 --- a/sd/source/ui/inc/prltempl.hxx +++ b/sd/source/ui/inc/prltempl.hxx @@ -61,6 +61,7 @@ private: sal_uInt16mnTab; sal_uInt16mnAsian; sal_uInt16mnAlign; +sal_uInt16mnBackground; PresentationObjects ePO; diff --git a/sd/uiconfig/sdraw/ui/drawprtldialog.ui b/sd/uiconfig/sdraw/ui/drawprtldialog.ui index c5c5fa2..561f630 100644 --- a/sd/uiconfig/sdraw/ui/drawprtldialog.ui +++ b/sd/uiconfig/sdraw/ui/drawprtldialog.ui @@ -298,6 +298,20 @@ False + + + + + +True +
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 282 ++- 1 file changed, 281 insertions(+), 1 deletion(-) New commits: commit 6e901f86511bd773c1b80f5aebe435f29527e118 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Tue Jan 24 01:40:55 2017 +0530 tdf#51358 Support for SnakeWipe transition animation in SVG support ported the class SnakeWipe. Change-Id: Icb41072bbd276e0edf3ef2ecea6148c81110b53e Reviewed-on: https://gerrit.libreoffice.org/23285 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 14017ab..a4f0288 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -4572,6 +4572,12 @@ SVGPathElement.prototype.appendPath = function( aPath ) this.setAttribute( 'd', sPathData ); }; +function flipOnYAxis( aPath ) +{ +var aMatrix = SVGIdentityMatrix.scaleNonUniform(-1, 1).translate(1, 0); +aPath.matrixTransform(aMatrix); +return aPath; +} /** SVGPathElement.matrixTransform * Apply the transformation defined by the passed matrix to the referenced * svg element. @@ -5160,6 +5166,7 @@ FADE_TRANSITION = 9; // 37 RANDOMBARWIPE_TRANSITION= 10; // 38 CHECKERBOARDWIPE_TRANSITION = 11; // 39 DISSOLVE_TRANSITION = 12; // 40 +SNAKEWIPE_TRANSITION= 13; // 30 IRISWIPE_TRANSITION = 14; // 12 aTransitionTypeInMap = { @@ -5175,6 +5182,7 @@ aTransitionTypeInMap = { 'randomBarWipe' : RANDOMBARWIPE_TRANSITION, 'checkerBoardWipe' : CHECKERBOARDWIPE_TRANSITION, 'dissolve' : DISSOLVE_TRANSITION, +'snakeWipe' : SNAKEWIPE_TRANSITION, 'irisWipe' : IRISWIPE_TRANSITION }; @@ -5212,6 +5220,12 @@ THREEBLADE_TRANS_SUBTYPE= 24; EIGHTBLADE_TRANS_SUBTYPE= 25; ONEBLADE_TRANS_SUBTYPE = 26; // 107 ACROSS_TRANS_SUBTYPE= 27; +TOPLEFTVERTICAL_TRANS_SUBTYPE = 28; // 109 +TOPLEFTHORIZONTAL_TRANS_SUBTYPE = 29; // 64 +TOPLEFTDIAGONAL_TRANS_SUBTYPE = 30; // 65 +TOPRIGHTDIAGONAL_TRANS_SUBTYPE = 31; // 66 +BOTTOMRIGHTDIAGONAL_TRANS_SUBTYPE = 32; // 67 +BOTTOMLEFTDIAGONAL_TRANS_SUBTYPE= 33; // 68 RECTANGLE_TRANS_SUBTYPE = 34; // 101 DIAMOND_TRANS_SUBTYPE = 35; // 102 TOPLEFT_TRANS_SUBTYPE = 36 // 3 @@ -5223,7 +5237,6 @@ RIGHTCENTER_TRANS_SUBTYPE = 41; // 8 BOTTOMCENTER_TRANS_SUBTYPE = 42; // 9 LEFTCENTER_TRANS_SUBTYPE= 43; // 10 - aTransitionSubtypeInMap = { 'default' : DEFAULT_TRANS_SUBTYPE, 'leftToRight' : LEFTTORIGHT_TRANS_SUBTYPE, @@ -5253,6 +5266,12 @@ aTransitionSubtypeInMap = { 'eightBlade': EIGHTBLADE_TRANS_SUBTYPE, 'oneBlade' : ONEBLADE_TRANS_SUBTYPE, 'across': ACROSS_TRANS_SUBTYPE, +'topLeftVertical' : TOPLEFTVERTICAL_TRANS_SUBTYPE, +'topLeftHorizontal' : TOPLEFTHORIZONTAL_TRANS_SUBTYPE, +'topLeftDiagonal' : TOPLEFTDIAGONAL_TRANS_SUBTYPE, +'topRightDiagonal' : TOPRIGHTDIAGONAL_TRANS_SUBTYPE, +'bottomRightDiagonal': BOTTOMRIGHTDIAGONAL_TRANS_SUBTYPE, +'bottomLeftDiagonal': BOTTOMLEFTDIAGONAL_TRANS_SUBTYPE, 'rectangle' : RECTANGLE_TRANS_SUBTYPE, 'diamond' : DIAMOND_TRANS_SUBTYPE, 'topLeft' : TOPLEFT_TRANS_SUBTYPE, @@ -5314,6 +5333,68 @@ aTransitionInfoTable[0][0] = 'scaleIsotropically' : false }; +aTransitionInfoTable[SNAKEWIPE_TRANSITION] = {}; +aTransitionInfoTable[SNAKEWIPE_TRANSITION][TOPLEFTVERTICAL_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : -90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_ROTATE_180, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[SNAKEWIPE_TRANSITION][TOPLEFTHORIZONTAL_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 0.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_ROTATE_180, +'outInvertSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[SNAKEWIPE_TRANSITION][TOPLEFTDIAGONAL_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 0.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_ROTATE_180, +'outInvertSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[SNAKEWIPE_TRANSITION][TOPRIGHTDIAGONAL_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 0.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_ROTATE_180, +'outInvertSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[SNAKEWIPE_TRANSITION][BOTTOMRIGHTDIAG
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 40 +++ 1 file changed, 20 insertions(+), 20 deletions(-) New commits: commit 30672569d5576e86ea47e92c8bcb40416ebadd7c Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Thu Jan 12 02:44:12 2017 +0530 Remove aTransitionSubtypeOutMap and aTransitionTypeOutMap reverse mapping can be done at run time Change-Id: Id04688ffb62cfa494d0eeaf6b73feb5ade58d53c Reviewed-on: https://gerrit.libreoffice.org/32903 Reviewed-by: Marco Cecchetti <mrcek...@gmail.com> Tested-by: Marco Cecchetti <mrcek...@gmail.com> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index df69b14..14017ab 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -1886,6 +1886,20 @@ function Rectangle( aSVGRectElem ) this.bottom = y + height; } +/* + * Returns key corresponding to a value in object, null otherwise. + * + * @param Object + * @param value + */ +function getKeyByValue(aObj, value) { + for(var key in aObj) { +if(aObj[key] == value) + return key; + } + return null; +} + function log( message ) { if( typeof console == 'object' ) @@ -5164,14 +5178,9 @@ aTransitionTypeInMap = { 'irisWipe' : IRISWIPE_TRANSITION }; -aTransitionTypeOutMap = [ '', 'barWipe', 'boxWipe', 'fourBoxWipe', 'ellipseWipe', - 'clockWipe', 'pinWheelWipe', 'pushWipe', 'slideWipe', - 'fade', 'randomBarWipe', 'checkerBoardWipe', 'dissolve' , 'irisWipe']; - - /* * All Transition subtypes should be in sync with aTransitionSubtypeInMap: - * Comments '//' followed by integers represent the transition values in their + * Comments '//' followed by integers represent the transition values in their * C++ implementations. */ // Transition Subtypes @@ -5256,16 +5265,6 @@ aTransitionSubtypeInMap = { 'leftCenter': LEFTCENTER_TRANS_SUBTYPE }; -aTransitionSubtypeOutMap = [ 'default', 'leftToRight', 'topToBottom', 'cornersIn', - 'cornersOut', 'vertical', 'horizontal', 'down', 'circle', - 'clockwiseTwelve', 'clockwiseThree', 'clockwiseSix', - 'clockwiseNine', 'twoBladeVertical', 'twoBladeHorizontal', - 'fourBlade', 'fromLeft', 'fromTop', 'fromRight', - 'fromBottom', 'crossfade', 'fadeToColor', 'fadeFromColor', - 'fadeOverColor', 'threeBlade', 'eightBlade', 'oneBlade', - 'across', 'rectangle', 'diamond']; - - // Transition Modes TRANSITION_MODE_IN = 1; TRANSITION_MODE_OUT = 0; @@ -8246,10 +8245,10 @@ AnimationTransitionFilterNode.prototype.info = function( bVerbose ) if( bVerbose ) { // transition type -sInfo += '; type: ' + aTransitionTypeOutMap[ String( this.getTransitionType() ) ]; +sInfo += '; type: ' + getKeyByValue(aTransitionTypeInMap, this.getTransitionType()); // transition subtype -sInfo += '; subtype: ' + aTransitionSubtypeOutMap[ this.getTransitionSubType() ]; +sInfo += '; subtype: ' + getKeyByValue(aTransitionSubtypeInMap, this.getTransitionSubType()); // transition direction if( this.getReverseDirection() ) @@ -11090,10 +11089,10 @@ SlideTransition.prototype.info = function() var sInfo ='slide transition <' + this.sSlideId + '>: '; // transition type -sInfo += '; type: ' + aTransitionTypeOutMap[ String( this.getTransitionType() ) ]; +sInfo += '; type: ' + getKeyByValue(aTransitionTypeInMap, this.getTransitionType()); // transition subtype -sInfo += '; subtype: ' + aTransitionSubtypeOutMap[ this.getTransitionSubType() ]; +sInfo += '; subtype: ' + getKeyByValue(aTransitionSubtypeInMap, this.getTransitionSubType()); // transition direction if( !this.isDirectionForward() ) @@ -15022,6 +15021,7 @@ ElapsedTime.prototype.getElapsedTimeImpl = function() }; + /* * @libreofficeend * ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 133 ++- 1 file changed, 131 insertions(+), 2 deletions(-) New commits: commit 3ce861adbe4e6f04d9d322e649fccd6cfcbd088f Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Tue Jan 10 22:29:54 2017 +0530 tdf#51358 Support for BoxWipe transition in SVG Export Ported the class BoxWipe Change-Id: Iad93bfa9e414028ba842c3d43edcb8a94c15a104 Reviewed-on: https://gerrit.libreoffice.org/32933 Reviewed-by: jan iversen <j...@documentfoundation.org> Tested-by: jan iversen <j...@documentfoundation.org> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 2f59ea3..df69b14 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -5205,6 +5205,15 @@ ONEBLADE_TRANS_SUBTYPE = 26; // 107 ACROSS_TRANS_SUBTYPE= 27; RECTANGLE_TRANS_SUBTYPE = 34; // 101 DIAMOND_TRANS_SUBTYPE = 35; // 102 +TOPLEFT_TRANS_SUBTYPE = 36 // 3 +TOPRIGHT_TRANS_SUBTYPE = 37 // 4 +BOTTOMRIGHT_TRANS_SUBTYPE = 38 // 5 +BOTTOMLEFT_TRANS_SUBTYPE= 39 // 6 +TOPCENTER_TRANS_SUBTYPE = 40; // 7 +RIGHTCENTER_TRANS_SUBTYPE = 41; // 8 +BOTTOMCENTER_TRANS_SUBTYPE = 42; // 9 +LEFTCENTER_TRANS_SUBTYPE= 43; // 10 + aTransitionSubtypeInMap = { 'default' : DEFAULT_TRANS_SUBTYPE, @@ -5236,7 +5245,15 @@ aTransitionSubtypeInMap = { 'oneBlade' : ONEBLADE_TRANS_SUBTYPE, 'across': ACROSS_TRANS_SUBTYPE, 'rectangle' : RECTANGLE_TRANS_SUBTYPE, -'diamond' : DIAMOND_TRANS_SUBTYPE +'diamond' : DIAMOND_TRANS_SUBTYPE, +'topLeft' : TOPLEFT_TRANS_SUBTYPE, +'topRight' : TOPRIGHT_TRANS_SUBTYPE, +'bottomRight' : BOTTOMRIGHT_TRANS_SUBTYPE, +'bottomLeft': BOTTOMLEFT_TRANS_SUBTYPE, +'topCenter' : TOPCENTER_TRANS_SUBTYPE, +'rightCenter' : RIGHTCENTER_TRANS_SUBTYPE, +'bottomCenter' : BOTTOMCENTER_TRANS_SUBTYPE, +'leftCenter': LEFTCENTER_TRANS_SUBTYPE }; aTransitionSubtypeOutMap = [ 'default', 'leftToRight', 'topToBottom', 'cornersIn', @@ -5246,7 +5263,7 @@ aTransitionSubtypeOutMap = [ 'default', 'leftToRight', 'topToBottom', 'cornersIn 'fourBlade', 'fromLeft', 'fromTop', 'fromRight', 'fromBottom', 'crossfade', 'fadeToColor', 'fadeFromColor', 'fadeOverColor', 'threeBlade', 'eightBlade', 'oneBlade', - 'across', 'rectangle', 'diamond' ]; + 'across', 'rectangle', 'diamond']; // Transition Modes @@ -5343,6 +5360,88 @@ aTransitionInfoTable[BARWIPE_TRANSITION][TOPTOBOTTOM_TRANS_SUBTYPE] = 'scaleIsotropically' : false }; +aTransitionInfoTable[BOXWIPE_TRANSITION] = {}; +aTransitionInfoTable[BOXWIPE_TRANSITION][TOPLEFT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 0.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_IGNORE, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[BOXWIPE_TRANSITION][TOPRIGHT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_IGNORE, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[BOXWIPE_TRANSITION][BOTTOMRIGHT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 180.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_IGNORE, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[BOXWIPE_TRANSITION][BOTTOMLEFT_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : -90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_IGNORE, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[BOXWIPE_TRANSITION][TOPCENTER_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 0.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_FLIP_Y, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[BOXWIPE_TRANSITION][RIGHTCENTER_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 90.0, +'scaleX' : 1.0, +'scaleY' : 1.0, +'reverseMethod' : REVERSEMETHOD_FLIP_X, +'outInvertsSweep' : true, +'scaleIsotropically' : false +}; +aTransitionInfoTable[BOXWIPE_TRANSITION][BOTTOMCENTER_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle' : 1
[Libreoffice-commits] core.git: filter/source
filter/source/svg/presentation_engine.js | 82 +-- 1 file changed, 78 insertions(+), 4 deletions(-) New commits: commit 4a1d52e7e434269e1331e6fdd6c24d45703a9711 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Thu Dec 29 00:10:36 2016 +0530 tdf#51358 Support for IrisWipe transition animation in SVG Export Ported the class IrisWipe Change-Id: If56f846e9a48941cdd240adfb15f5b36674cadd3 Reviewed-on: https://gerrit.libreoffice.org/32421 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: jan iversen <j...@documentfoundation.org> diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js index 9de750a..2f59ea3 100644 --- a/filter/source/svg/presentation_engine.js +++ b/filter/source/svg/presentation_engine.js @@ -5127,6 +5127,11 @@ TRANSITION_SPECIAL = 2;// Transition expressed by hand-crafted aTransitionClassOutMap = ['invalid', 'clip polypolygon', 'special']; +/* + * All Transition types should be in sync with aTransitionTypeInMap: + * Comments '//' followed by integers represent the transition values in their + * C++ implementations. + */ // Transition Types BARWIPE_TRANSITION = 1; @@ -5141,6 +5146,7 @@ FADE_TRANSITION = 9; // 37 RANDOMBARWIPE_TRANSITION= 10; // 38 CHECKERBOARDWIPE_TRANSITION = 11; // 39 DISSOLVE_TRANSITION = 12; // 40 +IRISWIPE_TRANSITION = 14; // 12 aTransitionTypeInMap = { 'barWipe' : BARWIPE_TRANSITION, @@ -5154,14 +5160,20 @@ aTransitionTypeInMap = { 'fade' : FADE_TRANSITION, 'randomBarWipe' : RANDOMBARWIPE_TRANSITION, 'checkerBoardWipe' : CHECKERBOARDWIPE_TRANSITION, -'dissolve' : DISSOLVE_TRANSITION +'dissolve' : DISSOLVE_TRANSITION, +'irisWipe' : IRISWIPE_TRANSITION }; aTransitionTypeOutMap = [ '', 'barWipe', 'boxWipe', 'fourBoxWipe', 'ellipseWipe', 'clockWipe', 'pinWheelWipe', 'pushWipe', 'slideWipe', - 'fade', 'randomBarWipe', 'checkerBoardWipe', 'dissolve' ]; + 'fade', 'randomBarWipe', 'checkerBoardWipe', 'dissolve' , 'irisWipe']; +/* + * All Transition subtypes should be in sync with aTransitionSubtypeInMap: + * Comments '//' followed by integers represent the transition values in their + * C++ implementations. + */ // Transition Subtypes DEFAULT_TRANS_SUBTYPE = 0; LEFTTORIGHT_TRANS_SUBTYPE = 1; @@ -5191,6 +5203,8 @@ THREEBLADE_TRANS_SUBTYPE= 24; EIGHTBLADE_TRANS_SUBTYPE= 25; ONEBLADE_TRANS_SUBTYPE = 26; // 107 ACROSS_TRANS_SUBTYPE= 27; +RECTANGLE_TRANS_SUBTYPE = 34; // 101 +DIAMOND_TRANS_SUBTYPE = 35; // 102 aTransitionSubtypeInMap = { 'default' : DEFAULT_TRANS_SUBTYPE, @@ -5220,7 +5234,9 @@ aTransitionSubtypeInMap = { 'threeBlade': THREEBLADE_TRANS_SUBTYPE, 'eightBlade': EIGHTBLADE_TRANS_SUBTYPE, 'oneBlade' : ONEBLADE_TRANS_SUBTYPE, -'across': ACROSS_TRANS_SUBTYPE +'across': ACROSS_TRANS_SUBTYPE, +'rectangle' : RECTANGLE_TRANS_SUBTYPE, +'diamond' : DIAMOND_TRANS_SUBTYPE }; aTransitionSubtypeOutMap = [ 'default', 'leftToRight', 'topToBottom', 'cornersIn', @@ -5230,7 +5246,7 @@ aTransitionSubtypeOutMap = [ 'default', 'leftToRight', 'topToBottom', 'cornersIn 'fourBlade', 'fromLeft', 'fromTop', 'fromRight', 'fromBottom', 'crossfade', 'fadeToColor', 'fadeFromColor', 'fadeOverColor', 'threeBlade', 'eightBlade', 'oneBlade', - 'across' ]; + 'across', 'rectangle', 'diamond' ]; // Transition Modes @@ -5282,6 +5298,28 @@ aTransitionInfoTable[0][0] = 'scaleIsotropically' : false }; +aTransitionInfoTable[IRISWIPE_TRANSITION] = {}; +aTransitionInfoTable[IRISWIPE_TRANSITION][RECTANGLE_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle': 0.0, +'scaleX': 1.0, +'scaleY': 1.0, +'reverseMethod': REVERSEMETHOD_SUBTRACT_AND_INVERT, +'outInvertsSweep': true, +'scaleIsotropically': false +}; + +aTransitionInfoTable[IRISWIPE_TRANSITION][DIAMOND_TRANS_SUBTYPE] = +{ +'class' : TRANSITION_CLIP_POLYPOLYGON, +'rotationAngle': 45.0, +'scaleX': Math.SQRT2, +'scaleY': Math.SQRT2, +'reverseMethod': REVERSEMETHOD_SUBTRACT_AND_INVERT, +'outInvertsSweep': true, +'scaleIsotropically': false +}; aTransitionInfoTable[BARWIPE_TRANSITION] = {}; aTransitionInfoTable[BARWIPE_TRANSITION][LEFTTORIGHT_TRANS_SUBTYPE] = @@ -9108,6 +9146,17 @@ function createClipPolyPolygon( nType, nSubtype ) return new RandomWipePath( 128, true /* bars */ ); case CHECKERBO
[Libreoffice-commits] core.git: fpicker/source
fpicker/source/office/iodlg.cxx | 588 fpicker/source/office/iodlg.hxx |2 2 files changed, 295 insertions(+), 295 deletions(-) New commits: commit 99fbcffa3d85c00770977e205626493ec2be1883 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Fri Oct 28 16:40:39 2016 +0530 tdf#89329: use unique_ptr for pImpl in fpicker/ Change-Id: I4a5db5ceafe509bffc32a8800ab3d678f41244f7 Reviewed-on: https://gerrit.libreoffice.org/30309 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 10140e0..4630e33 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -86,6 +86,7 @@ #include #include #include +#include using namespace ::com::sun::star::beans; using namespace ::com::sun::star::frame; @@ -114,7 +115,7 @@ namespace { -OUString getMostCurrentFilter( SvtExpFileDlg_Impl* pImpl ) +OUString getMostCurrentFilter( std::unique_ptr& pImpl ) { assert( pImpl && "invalid impl pointer" ); const SvtFileDialogFilter_Impl* pFilter = pImpl->_pUserFilter; @@ -129,20 +130,20 @@ namespace } -bool restoreCurrentFilter( SvtExpFileDlg_Impl* _pImpl ) +bool restoreCurrentFilter( std::unique_ptr& pImpl ) { -SAL_WARN_IF( !_pImpl->GetCurFilter(), "fpicker.office", "restoreCurrentFilter: no current filter!" ); -SAL_WARN_IF( _pImpl->GetCurFilterDisplayName().isEmpty(), "fpicker.office", "restoreCurrentFilter: no current filter (no display name)!" ); +SAL_WARN_IF( !pImpl->GetCurFilter(), "fpicker.office", "restoreCurrentFilter: no current filter!" ); +SAL_WARN_IF( pImpl->GetCurFilterDisplayName().isEmpty(), "fpicker.office", "restoreCurrentFilter: no current filter (no display name)!" ); -_pImpl->SelectFilterListEntry( _pImpl->GetCurFilterDisplayName() ); +pImpl->SelectFilterListEntry( pImpl->GetCurFilterDisplayName() ); #ifdef DBG_UTIL OUString sSelectedDisplayName; -DBG_ASSERT( ( _pImpl->GetSelectedFilterEntry( sSelectedDisplayName ) == _pImpl->GetCurFilter() ) -&& ( sSelectedDisplayName == _pImpl->GetCurFilterDisplayName() ), +DBG_ASSERT( ( pImpl->GetSelectedFilterEntry( sSelectedDisplayName ) == pImpl->GetCurFilter() ) +&& ( sSelectedDisplayName == pImpl->GetCurFilterDisplayName() ), "restoreCurrentFilter: inconsistence!" ); #endif -return _pImpl->m_bNeedDelayedFilterExecute; +return pImpl->m_bNeedDelayedFilterExecute; } @@ -308,7 +309,7 @@ SvtFileDialog::SvtFileDialog ,_pPrevBmp( nullptr ) ,_pFileView( nullptr ) ,_pFileNotifier( nullptr ) -,_pImp( new SvtExpFileDlg_Impl ) +,pImpl( new SvtExpFileDlg_Impl ) ,_nPickerFlags( nBits ) ,_bIsInExecute( false ) ,m_bInExecuteAsync( false ) @@ -332,7 +333,7 @@ class CustomContainer : public vcl::Window FocusCount }; -SvtExpFileDlg_Impl* _pImp; +SvtExpFileDlg_Impl* pImpl; VclPtr _pFileView; VclPtr_pSplitter; @@ -342,7 +343,7 @@ class CustomContainer : public vcl::Window public: explicit CustomContainer(vcl::Window *pParent) : Window(pParent) -, _pImp(nullptr) +, pImpl(nullptr) , _pFileView(nullptr) , _pSplitter(nullptr) , m_nCurrentFocus(FocusState::Prev) @@ -362,14 +363,14 @@ public: vcl::Window* pPrev, vcl::Window* pNext) { -_pImp = pImp; +pImpl = pImp; _pFileView = pFileView; _pSplitter = pSplitter; m_pFocusWidgets[FocusState::Prev] = pPrev; -m_pFocusWidgets[FocusState::Places] = _pImp->_pPlaces->GetPlacesListBox(); -m_pFocusWidgets[FocusState::Add] = _pImp->_pPlaces->GetAddButton(); -m_pFocusWidgets[FocusState::Delete] = _pImp->_pPlaces->GetDeleteButton(); +m_pFocusWidgets[FocusState::Places] = pImpl->_pPlaces->GetPlacesListBox(); +m_pFocusWidgets[FocusState::Add] = pImpl->_pPlaces->GetAddButton(); +m_pFocusWidgets[FocusState::Delete] = pImpl->_pPlaces->GetDeleteButton(); m_pFocusWidgets[FocusState::FileView] = pFileView; m_pFocusWidgets[FocusState::Next] = pNext; } @@ -378,7 +379,7 @@ public: { Window::Resize(); -if (!_pImp || !_pImp->_pPlaces) +if (!pImpl || !pImpl->_pPlaces) return; Size aSize = GetSizePixel(); @@ -391,19 +392,19 @@ public: Size splitterNewSize = _pSplitter->GetSizePixel( ); splitterNewSize.Height() = aSize.Hei
[Libreoffice-commits] core.git: sd/source
sd/source/filter/eppt/pptx-epptbase.cxx | 20 +--- sd/source/filter/eppt/pptx-epptooxml.cxx | 93 +- sd/source/filter/xml/sdxmlwrp.cxx | 20 sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx |2 4 files changed, 48 insertions(+), 87 deletions(-) New commits: commit 5c7ce42dfc35d9cceef5f05a96e813b4e3913d38 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Fri May 6 13:34:22 2016 +0530 tdf#91794 OSL_DEBUG_LEVEL > 1 & DBG macro removed (impress/draw) I replaced the DGB(x) macro from the code with the SAL_INFO(...) statements wherever i found necessary. I removed the DBG function definitions also. Change-Id: I6eb21fa993fe2bfdfbc678e65d237321f12b98dc Reviewed-on: https://gerrit.libreoffice.org/22317 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx index bea2c39..e22fe9d 100644 --- a/sd/source/filter/eppt/pptx-epptbase.cxx +++ b/sd/source/filter/eppt/pptx-epptbase.cxx @@ -64,12 +64,6 @@ #include #include -#ifdef DEBUG -#define DBG(x) x -#include -#else -#define DBG(x) -#endif using namespace com::sun::star; @@ -138,7 +132,7 @@ PPTWriterBase::PPTWriterBase() , meLatestPageType(NORMAL) , mpStyleSheet(nullptr) { -DBG(printf ("PPTWriterBase::PPTWriterBase()\n")); +SAL_INFO("sd.eppt", "PPTWriterBase::PPTWriterBase()"); } PPTWriterBase::PPTWriterBase( const Reference< XModel > & rXModel, @@ -205,7 +199,7 @@ void PPTWriterBase::exportPPT( const std::vector< css::beans::PropertyValue >& r maDestPageSize = MapSize( awt::Size( nWidth, nHeight ) ); maPageSize = awt::Size(nWidth, nHeight); -DBG(printf( "call exportDocumentPre()\n")); +SAL_INFO("sd.eppt", "call exportDocumentPre()"); exportPPTPre(rMediaData); if ( !GetStyleSheets() ) @@ -234,7 +228,7 @@ void PPTWriterBase::exportPPT( const std::vector< css::beans::PropertyValue >& r for ( i = 0; i < mnPages; i++ ) { -DBG(printf( "call ImplCreateSlide( %" SAL_PRIuUINT32 " )\n", i)); +SAL_INFO("sd.eppt", "call ImplCreateSlide( " << i << " )"); if ( !CreateSlide( i ) ) return; } @@ -245,7 +239,7 @@ void PPTWriterBase::exportPPT( const std::vector< css::beans::PropertyValue >& r return; } -DBG(printf( "call exportDocumentPost()\n")); +SAL_INFO("sd.eppt", "call exportDocumentPost()"); exportPPTPost(); } @@ -441,7 +435,7 @@ sal_Int32 PPTWriterBase::GetLayoutOffset( const css::uno::Reference< css::beans: if ( GetPropertyValue( aAny, rXPropSet, "Layout", true ) ) aAny >>= nLayout; -DBG(printf("GetLayoutOffset %" SAL_PRIdINT32 "\n", nLayout)); +SAL_INFO("sd.eppt", "GetLayoutOffset " << nLayout); return nLayout; } @@ -470,7 +464,7 @@ PHLayout& PPTWriterBase::GetLayout( sal_Int32 nOffset ) if( nOffset >= 0 && nOffset < EPP_LAYOUT_SIZE ) return pPHLayout[ nOffset ]; -DBG(printf("asked %" SAL_PRIdINT32 " for layout outside of 0,%d array scope\n", nOffset, EPP_LAYOUT_SIZE )); +SAL_INFO("sd.eppt", "asked " << nOffset << " for layout outside of 0, " << EPP_LAYOUT_SIZE << " array scope"); return pPHLayout[ 0 ]; } @@ -986,7 +980,7 @@ bool PPTWriterBase::ContainsOtherShapeThanPlaceholders() else bOtherThanPlaceHolders = true; } -DBG(printf("mType == %s\n", mType.getStr())); +SAL_INFO("sd.eppt", "mType == " << mType.getStr()); } return bOtherThanPlaceHolders; diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index df82afd..dd48c9d 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -91,17 +91,8 @@ using ::com::sun::star::beans::XPropertySetInfo; using ::com::sun::star::container::XIndexAccess; using ::sax_fastparser::FSHelperPtr; -// FIXME: this should be removed and replaced by SAL_INFO -#ifndef DBG -# if OSL_DEBUG_LEVEL > 1 -#define DBG(x) x -# else -#define DBG(x) -# endif -#endif - -DBG(void dump_pset(Reference< XPropertySet > rXPropSet);) +void dump_pset(Reference< XPropertySet > rXPropSet); #define IDS(x) OString(OStringLiteral(#x " ") + OString::number( mnShapeIdMax++ )).getStr() namespace oox { @@ -168,7 +159,7 @@ int PowerPointExport::GetPPTXLayoutId( int
[Libreoffice-commits] core.git: extensions/source
extensions/source/scanner/sanedlg.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 0ef6945b494ee86ed601fb9b09613cb4825040b1 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Apr 18 13:56:56 2016 +0530 Fix unconditional seek in sanedlg I fixed my previous mistake of keeping that xTransporter->getStream().Seek( STREAM_SEEK_TO_END ); in live code by wrapping it under OSL_DEBUG_LEVEL > 0 . Change-Id: I3f3bd3308e90610ab3d14f112e4da8bf46ecd25c Reviewed-on: https://gerrit.libreoffice.org/24188 Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Tested-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 34ed684..bb21e1e 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -905,8 +905,10 @@ void SaneDlg::AcquirePreview() } else { +#if OSL_DEBUG_LEVEL > 0 xTransporter->getStream().Seek( STREAM_SEEK_TO_END ); SAL_INFO("extensions.scanner", "Previewbitmapstream contains " << xTransporter->getStream().Tell() << "bytes"); +#endif xTransporter->getStream().Seek( STREAM_SEEK_TO_BEGIN ); mpPreview->SetBitmap(xTransporter->getStream()); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: chart2/source
chart2/source/controller/accessibility/AccessibleBase.cxx | 25 ++ chart2/source/controller/dialogs/DataBrowserModel.cxx |4 -- chart2/source/controller/main/ChartController.cxx |6 --- chart2/source/model/main/BaseCoordinateSystem.cxx |3 - chart2/source/model/template/BubbleDataInterpreter.cxx|4 +- chart2/source/model/template/DataInterpreter.cxx | 10 ++--- chart2/source/model/template/XYDataInterpreter.cxx|4 +- chart2/source/tools/InternalData.cxx |2 - chart2/source/tools/WrappedPropertySet.cxx|8 +--- 9 files changed, 17 insertions(+), 49 deletions(-) New commits: commit 81c9d54db34647fb1db311b228de6749c089dcf8 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Tue Apr 12 11:31:44 2016 +0530 tdf#91794 removed OSL_DEBUG_LEVEL > 1 conditionals Removed OSL_DEBUG_LEVEL > 1 conditionals to reduce the problem of multiple debug levels Change-Id: I453f74198e08308c3891e923ebaee58a276e34ad Reviewed-on: https://gerrit.libreoffice.org/22616 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx index 587a827..7fba2be 100644 --- a/chart2/source/controller/accessibility/AccessibleBase.cxx +++ b/chart2/source/controller/accessibility/AccessibleBase.cxx @@ -126,13 +126,7 @@ bool AccessibleBase::NotifyEvent( EventType eEventType, const AccessibleUniqueId case OBJECT_CHANGE: { BroadcastAccEvent( AccessibleEventId::VISIBLE_DATA_CHANGED, aEmpty, aEmpty ); -#if OSL_DEBUG_LEVEL > 1 -OSL_TRACE( -OUStringToOString( -OUString( "Visible data event sent by: " ) + -getAccessibleName(), -RTL_TEXTENCODING_ASCII_US ).getStr() ); -#endif +SAL_INFO("chart2.accessibility", "Visible data event sent by: " << getAccessibleName()); } break; @@ -144,13 +138,8 @@ bool AccessibleBase::NotifyEvent( EventType eEventType, const AccessibleUniqueId AddState( AccessibleStateType::FOCUSED ); aSelected <<= AccessibleStateType::FOCUSED; BroadcastAccEvent( AccessibleEventId::STATE_CHANGED, aSelected, aEmpty, true ); -#if OSL_DEBUG_LEVEL > 1 -OSL_TRACE( -OUStringToOString( -OUString( "Selection acquired by: " ) + -getAccessibleName(), -RTL_TEXTENCODING_ASCII_US ).getStr() ); -#endif + +SAL_INFO("chart2.accessibility", "Selection acquired by: " << getAccessibleName()); } break; @@ -162,13 +151,7 @@ bool AccessibleBase::NotifyEvent( EventType eEventType, const AccessibleUniqueId AddState( AccessibleStateType::FOCUSED ); aSelected <<= AccessibleStateType::FOCUSED; BroadcastAccEvent( AccessibleEventId::STATE_CHANGED, aEmpty, aSelected, true ); -#if OSL_DEBUG_LEVEL > 1 -OSL_TRACE( -OUStringToOString( -OUString( "Selection lost by: " ) + -getAccessibleName(), -RTL_TEXTENCODING_ASCII_US ).getStr() ); -#endif +SAL_INFO("chart2.accessibility", "Selection lost by: " << getAccessibleName()); } break; diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx index b16c6cc..8ec2ca3 100644 --- a/chart2/source/controller/dialogs/DataBrowserModel.cxx +++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx @@ -51,10 +51,6 @@ #include -#if OSL_DEBUG_LEVEL > 1 -#include -#endif - using namespace ::com::sun::star; using ::com::sun::star::uno::Reference; diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 0007569..b2fd677 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -202,11 +202,7 @@ void ChartController::TheModel::tryTermination() //since we have indicated to give up the ownership with parameter true in close call //the one who has thrown the CloseVetoException is the new owner -#if OSL_DEBUG_LEVEL > 1 -OSL_ENSURE( !m_bOwnership, -"INFO: a well
[Libreoffice-commits] core.git: stoc/source stoc/test
stoc/source/corereflection/crefl.cxx|7 stoc/source/invocation_adapterfactory/iafactory.cxx |4 +- stoc/source/javavm/javavm.cxx | 28 ++ stoc/source/servicemanager/servicemanager.cxx | 31 +++- stoc/test/testconv.cxx |4 +- 5 files changed, 14 insertions(+), 60 deletions(-) New commits: commit 31bddb874d2be54b81cdd7ea142b58db18e11a5b Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Tue Mar 8 23:41:03 2016 +0530 tdf#91794 removed OSL_DEBUG_LEVEL > 1 conditionals I removed all the OSL_DEBUG_LEVEL > 1 conditionals by SAL_INFOs or OSL_DEBUG_LEVEL > 0 Change-Id: I261644a179e763612204bbb0e54a869fa1a62298 Reviewed-on: https://gerrit.libreoffice.org/23035 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index 3304233..d0e9e8c 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -210,12 +210,7 @@ inline Reference< XIdlClass > IdlReflectionServiceImpl::constructClass( return new IdlClassImpl( this, pTypeDescr->pTypeName, pTypeDescr->eTypeClass, pTypeDescr ); default: -#if OSL_DEBUG_LEVEL > 1 -OSL_TRACE( "### corereflection type unsupported: " ); -OString aName( OUStringToOString( pTypeDescr->pTypeName, RTL_TEXTENCODING_ASCII_US ) ); -OSL_TRACE( "%s", aName.getStr() ); -OSL_TRACE( "\n" ); -#endif +SAL_INFO("stoc", " corereflection type unsupported: " << pTypeDescr->pTypeName); return Reference< XIdlClass >(); } } diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index 4ed0b8f..e40e8b7 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -756,8 +756,8 @@ FactoryImpl::~FactoryImpl() (*m_pConverter->release)( m_pConverter ); -#if OSL_DEBUG_LEVEL > 1 -OSL_ENSURE( m_receiver2adapters.empty(), "### still adapters out there!?" ); +#if OSL_DEBUG_LEVEL > 0 +assert(m_receiver2adapters.empty() && " still adapters out there!?"); #endif } diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 290198c..c81fe0c 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -500,24 +500,14 @@ void initVMConfiguration( getINetPropsFromConfig(, xSMgr, xCtx); } catch(const css::uno::Exception & exception) { -#if OSL_DEBUG_LEVEL > 1 -OString message = OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US); -OSL_TRACE("javavm.cxx: can not get INetProps cause of >%s<", message.getStr()); -#else -(void) exception; // unused -#endif +SAL_INFO("stoc", " can not get INETProps because of >" << exception.Message << "<"); } try { getDefaultLocaleFromConfig(, xSMgr,xCtx); } catch(const css::uno::Exception & exception) { -#if OSL_DEBUG_LEVEL > 1 -OString message = OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US); -OSL_TRACE("javavm.cxx: can not get locale cause of >%s<", message.getStr()); -#else -(void) exception; // unused -#endif +SAL_INFO("stoc", "can not get locale because of >" << exception.Message << "<"); } try @@ -525,12 +515,7 @@ void initVMConfiguration( getJavaPropsFromSafetySettings(, xSMgr, xCtx); } catch(const css::uno::Exception & exception) { -#if OSL_DEBUG_LEVEL > 1 -OString message = OUStringToOString(exception.Message, RTL_TEXTENCODING_ASCII_US); -OSL_TRACE("javavm.cxx: couldn't get safety settings because of >%s<", message.getStr()); -#else -(void) exception; // unused -#endif +SAL_INFO("stoc", "couldn't get safety settings because of >" << exception.Message << "<"); } *pjvm= jvm; @@ -1366,12 +1351,7 @@ void JavaVirtualMachine::registerConfigChangesListener() } }catch(const css::uno::Exception & e) { -#if OSL_DEBUG_LEVEL > 1 -OString message = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); -OSL_TRACE("javavm.cxx: could not set up listener for Configuration because of >%s<", message.getStr()); -#else -(void) e; // unused -#endif +SAL_INFO("stoc", "could not set up listener for Configuration beca
[Libreoffice-commits] core.git: extensions/source
extensions/source/scanner/sane.cxx| 15 +++ extensions/source/scanner/sanedlg.cxx | 13 +++-- extensions/source/scanner/scanunx.cxx | 27 ++- 3 files changed, 16 insertions(+), 39 deletions(-) New commits: commit 35d7ca80930997febb31eb7cdd95eeb684514bec Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Wed Mar 9 17:29:55 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I removed OSL_DEBUG_LEVEL > 1 conditionals by SAL_INFO(..)s or OSL_DEBUG_LEVEL > 0 and made sure that it doesn't break the build Change-Id: I3eccdd769ff32e57e12209706e5fbbdd9638de54 Reviewed-on: https://gerrit.libreoffice.org/23068 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index 5e94f8a..5f218735 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -33,7 +33,7 @@ #include #include -#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL +#if (OSL_DEBUG_LEVEL > 0) || defined DBG_UTIL #include #define dump_state( a, b, c, d ) fprintf( stderr, a, b, c, d ); #else @@ -41,7 +41,7 @@ #endif inline void dbg_msg( const char* pString, ... ) { -#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL +#if (OSL_DEBUG_LEVEL > 0) || defined DBG_UTIL va_list ap; va_start( ap, pString ); vfprintf( stderr, pString, ap ); @@ -125,7 +125,7 @@ SANE_Status Sane::ControlOption( int nOption, SANE_Action nAction, SANE_Status nStatus = p_control_option( maHandle, (SANE_Int)nOption, nAction, pData, ); DUMP_STATE( nStatus, "sane_control_option" ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 if( nStatus != SANE_STATUS_GOOD ) { const char* pAction = "Unknown"; @@ -232,7 +232,7 @@ void Sane::Init() for( nDevices = 0 ; ppDevices[ nDevices ]; nDevices++ ) ; } } -#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL +#if (OSL_DEBUG_LEVEL > 0) || defined DBG_UTIL else fprintf( stderr, "libsane%s could not be opened: %s\n", SAL_DLLEXTENSION, dlerror() ); @@ -618,7 +618,7 @@ bool Sane::Start( BitmapTransporter& rBitmap ) bSuccess = false; break; } -#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL +#if (OSL_DEBUG_LEVEL > 0) || defined DBG_UTIL const char* ppFormats[] = { "SANE_FRAME_GRAY", "SANE_FRAME_RGB", "SANE_FRAME_RED", "SANE_FRAME_GREEN", "SANE_FRAME_BLUE", "Unknown !!!" }; @@ -735,9 +735,8 @@ bool Sane::Start( BitmapTransporter& rBitmap ) nWidthMM = (int)(((double)nWidth / fResl) * 25.4); if( ! nHeightMM ) nHeightMM = (int)(((double)nHeight / fResl) * 25.4); -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "set dimensions to (%d, %d) Pixel, (%d, %d) mm, resolution is %lg\n", (int)nWidth, (int)nHeight, (int)nWidthMM, (int)nHeightMM, fResl ); -#endif +SAL_INFO("extensions.scanner", "set dimensions to(" << nWidth << ", " << nHeight << ") Pixel, (" << nWidthMM << ", " << nHeightMM << +") mm, resolution is " << fResl); aConverter.Seek( 18 ); aConverter.WriteUInt32( nWidth ); diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 95505d1..34ed684 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -905,10 +905,8 @@ void SaneDlg::AcquirePreview() } else { -#if OSL_DEBUG_LEVEL > 1 xTransporter->getStream().Seek( STREAM_SEEK_TO_END ); -fprintf( stderr, "Previewbitmapstream contains %d bytes\n", (int)xTransporter->getStream().Tell() ); -#endif +SAL_INFO("extensions.scanner", "Previewbitmapstream contains " << xTransporter->getStream().Tell() << "bytes"); xTransporter->getStream().Seek( STREAM_SEEK_TO_BEGIN ); mpPreview->SetBitmap(xTransporter->getStream()); } @@ -1492,10 +1490,7 @@ bool SaneDlg::SetAdjustedNumericalValue( return false; } -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "SaneDlg::SetAdjustedNumericalValue( \"%s\", %lg ) ", - pOption, fValue ); -#endif +SAL_INFO("extensions.scanner", "SaneDlg::SetAdjustedNumericalValue(\"" << pOption << "\", " << fValue <&
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/doc/Metadatable.cxx |2 +- sfx2/source/doc/objmisc.cxx | 38 +- 2 files changed, 14 insertions(+), 26 deletions(-) New commits: commit 77ba9d7e3055d69667e6c3545f311492a34056c6 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Fri Apr 8 11:56:21 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I replaced OSL_DEBUG_LEVEL > 1 to OSL_DEBUG_LEVEL > 0 conditionals as suggested in easyhack. I didn't convert those fprintf statements because they were required for debug output formatting according to me Change-Id: I54d5b0873f527fd04d736eeb01d18f73eb9be74f Reviewed-on: https://gerrit.libreoffice.org/23069 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index 229659b..9892e49 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -1639,7 +1639,7 @@ throw (uno::RuntimeException, std::exception) } // namespace sfx2 -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 #include diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 6a04de2..a48f6df 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -725,17 +725,6 @@ void SfxObjectShell::SetTitle } -#if OSL_DEBUG_LEVEL > 1 -OUString X(const OUString ) -{ -if ( rRet.isEmpty() ) -return OUString( "-empty-" ); -return rRet; -} -#else -#define X(ret) ret -#endif - OUString SfxObjectShell::GetTitle ( @@ -818,15 +807,15 @@ OUString SfxObjectShell::GetTitle if ( IsTemplate() ) pThis->SetTitle( aTitle ); bRecur = false; -return X(aTitle); +return aTitle; } else if (SFX_TITLE_APINAME == nMaxLength ) -return X(GetAPIName()); +return GetAPIName(); // Special case templates: if( IsTemplate() && !pImp->aTitle.isEmpty() && ( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) ) -return X(pImp->aTitle); +return pImp->aTitle; // Picklist/Caption is mapped if ( pMed && ( nMaxLength == SFX_TITLE_CAPTION || nMaxLength == SFX_TITLE_PICKLIST ) ) @@ -836,7 +825,7 @@ OUString SfxObjectShell::GetTitle // considered. (See below, analysis of aTitleMap_Impl) const SfxStringItem* pNameItem = SfxItemSet::GetItem(pMed->GetItemSet(), SID_DOCINFO_TITLE, false); if ( pNameItem ) -return X( pNameItem->GetValue() ); +return pNameItem->GetValue(); } // Still unnamed? @@ -845,7 +834,7 @@ OUString SfxObjectShell::GetTitle { // Title already set? if ( !pImp->aTitle.isEmpty() ) -return X(pImp->aTitle); +return pImp->aTitle; // must it be numbered? OUString aNoName(SFX2_RESSTR(STR_NONAME)); @@ -856,7 +845,7 @@ OUString SfxObjectShell::GetTitle } // Document called "noname" for the time being -return X(aNoName); +return aNoName; } const INetURLObject aURL( IsDocShared() ? GetSharedFileURL() : OUString( GetMedium()->GetName() ) ); @@ -875,10 +864,9 @@ OUString SfxObjectShell::GetTitle { OUString aName( aURL.HasMark() ? INetURLObject( aURL.GetURLNoMark() ).PathToFileName() : aURL.PathToFileName() ); if ( nMaxLength == SFX_TITLE_FULLNAME ) -return X( aName ); +return aName; else if ( nMaxLength == SFX_TITLE_FILENAME ) -return X( aURL.getName( INetURLObject::LAST_SEGMENT, -true, INetURLObject::DECODE_WITH_CHARSET ) ); +return aURL.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET); else if ( pImp->aTitle.isEmpty() ) pImp->aTitle = aURL.getBase( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); @@ -892,10 +880,10 @@ OUString SfxObjectShell::GetTitle { OUString aRet( "..." ); aRet += aComplete.copy( aComplete.getLength() - nMaxLength + 3, nMaxLength - 3 ); -return X( aRet ); +return aRet; } else -return X( aComplete ); +return aComplete; } else if ( nMaxLength == SFX_TITLE_FILENAME ) { @@ -903,10 +891,10 @@ OUString SfxObjectShell::GetTitle aName = INetURLObject::decode( aName, INetURLObject::DECODE_WITH_CHARSET ); if( aName.isEmpty() ) aName = aURL.GetURLNoPass(); -return X(aName); +return aName; } else if ( nMaxLength == SFX_TITLE_FULLN
[Libreoffice-commits] core.git: oox/inc oox/source
oox/inc/drawingml/textliststyle.hxx |2 +- oox/source/drawingml/diagram/diagram.cxx | 18 -- oox/source/drawingml/textliststyle.cxx |4 ++-- 3 files changed, 11 insertions(+), 13 deletions(-) New commits: commit aba0c20fb059e5cc484af5feae29e6f51e584fa8 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Fri Apr 8 11:42:42 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I disentangled my previous patch to make one patch per module. I also modified the patch according to new directions given by Sweet5hark Change-Id: Id690f7c1e87230e4d10e1c9fe472f35d1d1caa8b Reviewed-on: https://gerrit.libreoffice.org/22924 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/oox/inc/drawingml/textliststyle.hxx b/oox/inc/drawingml/textliststyle.hxx index 1f3c6a0..d4cc455 100644 --- a/oox/inc/drawingml/textliststyle.hxx +++ b/oox/inc/drawingml/textliststyle.hxx @@ -45,7 +45,7 @@ public: const TextParagraphPropertiesVector& getAggregationListStyle() const { return maAggregationListStyle; }; TextParagraphPropertiesVector& getAggregationListStyle() { return maAggregationListStyle; }; -#if defined(DBG_UTIL) && OSL_DEBUG_LEVEL > 1 +#ifdef DBG_UTIL void dump() const; #endif diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx index 04bda5b..7749d5e 100644 --- a/oox/source/drawingml/diagram/diagram.cxx +++ b/oox/source/drawingml/diagram/diagram.cxx @@ -91,7 +91,7 @@ void Diagram::setLayout( const DiagramLayoutPtr & pLayout) mpLayout = pLayout; } -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_OOX_DIAGRAM OString normalizeDotName( const OUString& rStr ) { OUStringBuffer aBuf; @@ -139,19 +139,17 @@ static sal_Int32 calcDepth( const OUString& rNodeName, void Diagram::build( ) { // build name-object maps - -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_OOX_DIAGRAM std::ofstream output("/tmp/tree.dot"); output << "digraph datatree {" << std::endl; #endif - dgm::Points& rPoints = getData()->getPoints(); dgm::Points::iterator aCurrPoint(rPoints.begin()); dgm::Points::iterator aEndPoint(rPoints.end()); while( aCurrPoint != aEndPoint ) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_OOX_DIAGRAM output << "\t" << normalizeDotName(aCurrPoint->msModelId).getStr() << "["; @@ -179,6 +177,7 @@ void Diagram::build( ) } output << "];" << std::endl; +#endif // does currpoint have any text set? if( aCurrPoint->mpShape && @@ -186,8 +185,8 @@ void Diagram::build( ) !aCurrPoint->mpShape->getTextBody()->getParagraphs().empty() && !aCurrPoint->mpShape->getTextBody()->getParagraphs().front()->getRuns().empty() ) { +#ifdef DEBUG_OOX_DIAGRAM static sal_Int32 nCount=0; - output << "\t" << "textNode" << nCount << " [" @@ -201,8 +200,8 @@ void Diagram::build( ) << " -> " << "textNode" << nCount++ << ";" << std::endl; -} #endif +} const bool bInserted1=getData()->getPointNameMap().insert( std::make_pair(aCurrPoint->msModelId,&(*aCurrPoint))).second; @@ -224,7 +223,7 @@ void Diagram::build( ) const dgm::Connections::const_iterator aEndCxn(rConnections.end()); while( aCurrCxn != aEndCxn ) { -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_OOX_DIAGRAM if( !aCurrCxn->msParTransId.isEmpty() || !aCurrCxn->msSibTransId.isEmpty() ) { @@ -308,8 +307,7 @@ void Diagram::build( ) ++aPresOfIter; } - -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_OOX_DIAGRAM output << "}" << std::endl; #endif } diff --git a/oox/source/drawingml/textliststyle.cxx b/oox/source/drawingml/textliststyle.cxx index 5ea7a04..44b0f41 100644 --- a/oox/source/drawingml/textliststyle.cxx +++ b/oox/source/drawingml/textliststyle.cxx @@ -86,12 +86,12 @@ void TextListStyle::apply( const TextListStyle& rTextListStyle ) applyStyleList( rTextListStyle.getListStyle(), getListStyle() ); } -#if defined(DBG_UTIL) && OSL_DEBUG_LEVEL > 1 +#ifdef DBG_UTIL void TextListStyle::dump() const { for ( int i = 0; i < 9; i++ ) { -OSL_TRACE("text list style level: %d", i); +SAL_INFO("oox.drawingml", "text list style level: " << i); maListStyle[i]->dump(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/sal include/vcl
include/sal/log-areas.dox |1 + include/vcl/lazydelete.hxx | 17 +++-- 2 files changed, 4 insertions(+), 14 deletions(-) New commits: commit c829898453d75c0f13ff589b7f8adf8fb062a39f Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Thu Apr 7 13:56:53 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I disentangled my previous patch and converted fprintf statements to SAL_INFOs Change-Id: I4b993e00f82bdf904586ab5e7c954c4ee3ff1bac Reviewed-on: https://gerrit.libreoffice.org/22925 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index e76e948..ec874bc 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -429,6 +429,7 @@ certain functionality. @li @c vcl.kde - KDE @li @c vcl.kde4 - KDE4 @li @c vcl.layout - Widget layout +@li @c vcl.lazydelete @li @c vcl.pdfwriter @li @c vcl.plugadapt - the Unix/X11 backend plugin mechanism @li @c vcl.opengl diff --git a/include/vcl/lazydelete.hxx b/include/vcl/lazydelete.hxx index 1f1235d..0c2840f 100644 --- a/include/vcl/lazydelete.hxx +++ b/include/vcl/lazydelete.hxx @@ -28,10 +28,7 @@ #include #include -#if OSL_DEBUG_LEVEL > 2 #include -#include -#endif #include @@ -128,10 +125,7 @@ namespace vcl LazyDeletor() { LazyDelete::addDeletor( this ); } virtual ~LazyDeletor() { -#if OSL_DEBUG_LEVEL > 2 -fprintf( stderr, "%s %p deleted\n", - typeid(*this).name(), this ); -#endif +SAL_INFO("vcl.lazydelete", typeid(*this).name() << std::hex << this << " deleted"); if( s_pOneInstance == this ) // sanity check s_pOneInstance = nullptr; @@ -151,12 +145,8 @@ namespace vcl nCount = aRealDelete.size(); for( unsigned int n = 0; n < nCount; n++ ) { -#if OSL_DEBUG_LEVEL > 2 -fprintf( stderr, "%s deletes object %p of type %s\n", - typeid(*this).name(), - aRealDelete[n], - typeid(*aRealDelete[n]).name() ); -#endif +SAL_INFO("vcl.lazydelete", typeid(*this).name() << " deletes object " << aRealDelete[n] << " of type " + << typeid(*aRealDelete[n]).name()); // check if the object to be deleted is not already destroyed // as a side effect of a previous lazily destroyed object if( ! m_aObjects[ m_aPtrToIndex[ reinterpret_cast(aRealDelete[n].get()) ] ].m_bDeleted ) @@ -296,5 +286,4 @@ namespace vcl } #endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: canvas/source
canvas/source/directx/dx_canvashelper_texturefill.cxx |2 +- canvas/source/directx/dx_spritecanvashelper.cxx |2 +- canvas/source/tools/surfaceproxy.cxx | 13 ++--- canvas/source/vcl/canvashelper_texturefill.cxx|4 ++-- canvas/source/vcl/spritecanvashelper.cxx |4 ++-- 5 files changed, 8 insertions(+), 17 deletions(-) New commits: commit f0de4374fffe7fb72ce0e9006af57092834dfe1e Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Thu Apr 7 13:45:11 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I removed the OSL_DEBUG_LEVEL > 1 conditionals with OSL_DEBUG_LEVEL > 0 or SAL_INFO macros Change-Id: Ia2a483ea0f992bf182a6beed2b4558a4fb7c5680 Reviewed-on: https://gerrit.libreoffice.org/23079 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/canvas/source/directx/dx_canvashelper_texturefill.cxx b/canvas/source/directx/dx_canvashelper_texturefill.cxx index 826bf69..0e9eb4d 100644 --- a/canvas/source/directx/dx_canvashelper_texturefill.cxx +++ b/canvas/source/directx/dx_canvashelper_texturefill.cxx @@ -407,7 +407,7 @@ namespace dxcanvas rGraphics->FillPath( pGradientBrush.get(), pFillPath.get() ); } -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 0 Gdiplus::Pen aPen( Gdiplus::Color( 255, 255, 0, 0 ), 0.0001f ); diff --git a/canvas/source/directx/dx_spritecanvashelper.cxx b/canvas/source/directx/dx_spritecanvashelper.cxx index 66ea028..3803671 100644 --- a/canvas/source/directx/dx_spritecanvashelper.cxx +++ b/canvas/source/directx/dx_spritecanvashelper.cxx @@ -70,7 +70,7 @@ namespace dxcanvas maScrapRect(), mbShowSpriteBounds( false ) { -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 0 // inverse default for verbose debug mode mbShowSpriteBounds = true; #endif diff --git a/canvas/source/tools/surfaceproxy.cxx b/canvas/source/tools/surfaceproxy.cxx index fd5b8e2..e809ec9 100644 --- a/canvas/source/tools/surfaceproxy.cxx +++ b/canvas/source/tools/surfaceproxy.cxx @@ -114,18 +114,9 @@ namespace canvas const ::basegfx::B2DPolygon& rTriangulatedPolygon( ::basegfx::triangulator::triangulate(rClipPoly)); -#if OSL_DEBUG_LEVEL > 2 // dump polygons -OSL_TRACE( "Original clip polygon: %s\n" - "Triangulated polygon: %s\n", - OUStringToOString( - basegfx::tools::exportToSvgD( rClipPoly, true, true, false ), - RTL_TEXTENCODING_ASCII_US).getStr(), - OUStringToOString( - basegfx::tools::exportToSvgD( - basegfx::B2DPolyPolygon(rTriangulatedPolygon), true, true, false ), - RTL_TEXTENCODING_ASCII_US).getStr() ); -#endif +SAL_INFO("canvas", "Orignal clip polygon: " << basegfx::tools::exportToSvgD( rClipPoly, true, true, false )); +SAL_INFO("canvas", "Triangulated polygon: " << basegfx::tools::exportToSvgD(basegfx::B2DPolyPolygon(rTriangulatedPolygon), true, true, false )); for( const auto& rSurfacePtr : maSurfaceList ) rSurfacePtr->drawWithClip( fAlpha, rPos, rTriangulatedPolygon, rTransform ); diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx index 9064345..462ae47 100644 --- a/canvas/source/vcl/canvashelper_texturefill.cxx +++ b/canvas/source/vcl/canvashelper_texturefill.cxx @@ -437,7 +437,7 @@ namespace vclcanvas (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetGreen(),rColors[nIndex+1].GetGreen(),fAlpha)), (sal_uInt8)(basegfx::tools::lerp(rColors[nIndex].GetBlue(),rColors[nIndex+1].GetBlue(),fAlpha)) )); -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 0 if( i && !(i % 10) ) rOutDev.SetFillColor( COL_RED ); #endif @@ -626,7 +626,7 @@ namespace vclcanvas } } -#if OSL_DEBUG_LEVEL > 3 +#ifdef DEBUG_CANVAS_CANVASHELPER_TEXTUREFILL // extra-verbosity { ::basegfx::B2DRectangle aRect(0.0, 0.0, 1.0, 1.0); diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx index 65d1141..775e538 100644 --- a/canvas/source/vcl/spritecanvashelper.cxx +++ b/canvas/source/vcl/spritecanvashelper.cxx @@ -124,7 +124,7 @@ namespace vclcanvas mbShowSpriteBounds( false ), mbIsUnsafeScrolling( false ) { -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 0 // inverse defaults for verbose debug mode mbShowSpriteBounds
[Libreoffice-commits] core.git: filter/source include/filter
filter/source/msfilter/msdffimp.cxx |6 ++-- filter/source/msfilter/mstoolbar.cxx| 29 +++- filter/source/svg/svgreader.cxx |6 ++-- filter/source/xsltfilter/LibXSLTTransformer.cxx |2 - include/filter/msfilter/mstoolbar.hxx | 20 5 files changed, 31 insertions(+), 32 deletions(-) New commits: commit bc504b08f008b1813a29bb90c226340407c2077b Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Thu Mar 3 16:19:27 2016 +0530 tdf#91794 OSL_DEBUG_LEVEL > 1 removed in libo/filter module I replaced the occurences of OSL_DEBUG_LEVEL > 1 with the debug macro DEBUG_{module}_{area}. Change-Id: Ibbf7345d3dc43354ff80a8ceafb4a812749513c7 Reviewed-on: https://gerrit.libreoffice.org/22355 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 85955a4..c8fd4dc 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -6373,7 +6373,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect pGrStream = xOut.get(); } -#if OSL_DEBUG_LEVEL > 2 +#ifdef DEBUG_FILTER_MSDFFIMP // extract graphics from ole storage into "dbggfxNNN.*" static sal_Int32 nGrfCount; @@ -6417,7 +6417,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect sal_Int32 nDbgLen = nLength - nSkip; if ( nDbgLen ) { -std::std::unique_ptr<sal_Char[]> xDat(new sal_Char[ nDbgLen ]); +std::unique_ptr<sal_Char[]> xDat(new sal_Char[ nDbgLen ]); pGrStream->Read( xDat.get(), nDbgLen ); pDbgOut->Write( xDat.get(), nDbgLen ); pGrStream->SeekRel( -nDbgLen ); @@ -6936,7 +6936,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo pFilter = aMatch.GetFilter4EA( aType ); } -#if OSL_DEBUG_LEVEL > 2 +#ifdef DEBUG_FILTER_MSFILTER // extract embedded ole streams into "/tmp/embedded_stream_NNN" static sal_Int32 nOleCount(0); OUString aTmpName("/tmp/embedded_stream_"); diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx index 1a7df47..9367e78 100644 --- a/filter/source/msfilter/mstoolbar.cxx +++ b/filter/source/msfilter/mstoolbar.cxx @@ -160,9 +160,8 @@ CustomToolBarImportHelper::createMenu( const OUString& rName, const uno::Referen return bRes; } -#if OSL_DEBUG_LEVEL > 1 -void -TBBase::indent_printf( FILE* fp, const char* format, ... ) +#ifdef DEBUG_FILTER_MSTOOLBAR +void TBBase::indent_printf( FILE* fp, const char* format, ... ) { va_list ap; va_start ( ap, format ); @@ -206,7 +205,7 @@ bool TBCHeader::Read( SvStream ) return true; } -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_FILTER_MSTOOLBAR void TBCHeader::Print( FILE* fp ) { Indent a; @@ -356,7 +355,7 @@ bool TBCData::ImportToolBarControl( CustomToolBarImportHelper& helper, std::vect return true; // just ignore } -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_FILTER_MSTOOLBAR void TBCData::Print( FILE* fp ) { Indent a; @@ -407,7 +406,7 @@ TBCExtraInfo::Read( SvStream ) return true; } -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_FILTER_MSTOOLBAR void TBCExtraInfo::Print( FILE* fp ) { @@ -452,7 +451,7 @@ bool TBCGeneralInfo::Read( SvStream ) return true; } -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_FILTER_MSFILTER void TBCGeneralInfo::Print( FILE* fp ) { @@ -531,7 +530,7 @@ TBCMenuSpecific::Read( SvStream ) return true; } -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_FILTER_MSFILTER void TBCMenuSpecific::Print( FILE* fp ) { @@ -586,7 +585,7 @@ bool TBCBSpecific::Read( SvStream ) } -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_FILTER_MSFILTER void TBCBSpecific::Print( FILE* fp ) { Indent a; @@ -643,7 +642,7 @@ bool TBCComboDropdownSpecific::Read( SvStream ) return true; } -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_FILTER_MSFILTER void TBCComboDropdownSpecific::Print( FILE* fp) { Indent a; @@ -690,7 +689,7 @@ bool TBCCDData::Read( SvStream ) return wstrEdit.Read( rS ); } -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_FILTER_MSFILTER void TBCCDData::Print( FILE* fp) { Indent a; @@ -726,7 +725,7 @@ bool TBCBitMap::Read( SvStream& rS) return ReadDIB(mBitMap, rS, false, true); } -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_FILTER_MSTOOLBAR void TBCBitMap::Print( FILE* fp ) { Indent a; @@ -760,7 +759,7 @@ bool TB::IsEnabled() return ( bFlags & 0x01 ) != 0x01;
[Libreoffice-commits] core.git: linguistic/source
linguistic/source/hyphdsp.cxx |6 ++ linguistic/source/lngsvcmgr.cxx | 33 + linguistic/source/spelldta.cxx |4 ++-- 3 files changed, 13 insertions(+), 30 deletions(-) New commits: commit 931d003ade7c4a88f46be1e89b32d58e5eb9d083 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Sat Mar 5 12:21:23 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I disentangled my previous patch and uploaded one patch per module Change-Id: Ic7351452833816358cff96e154d6d5d40f094aa8 Reviewed-on: https://gerrit.libreoffice.org/22666 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx index 5ed22c5..42c42e4 100644 --- a/linguistic/source/hyphdsp.cxx +++ b/linguistic/source/hyphdsp.cxx @@ -120,8 +120,7 @@ Reference HyphenatorDispatcher::buildHyphWord( if (nHyphenationPos > 0) { - -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 { if (aTmp.toString() != rOrigWord) { @@ -142,8 +141,7 @@ Reference HyphenatorDispatcher::buildHyphWord( sal_Int32 nL = aLonger.getLength(); if (nS > 0 && nL > 0) { -DBG_ASSERT( (nS + 1 == nL) && aLonger[nL-1] == '.', -"HyphenatorDispatcher::buildHyphWord: unexpected difference between words!" ); +assert( ((nS + 1 == nL) && aLonger[nL-1] == '.') && "HyphenatorDispatcher::buildHyphWord: unexpected difference between words!" ); } } } diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index d77a372..d45b409 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -782,12 +782,7 @@ void LngSvcMgr::UpdateAll() { // add new or replace existing entries. bool bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues ); -if (!bRes) -{ -#if OSL_DEBUG_LEVEL > 1 -SAL_WARN( "linguistic", "failed to set new configuration values" ); -#endif -} +SAL_WARN_IF(!bRes, "linguistic", "failed to set new configuration values"); } } } @@ -1428,8 +1423,8 @@ uno::Reference< linguistic2::XSpellChecker > SAL_CALL throw(uno::RuntimeException, std::exception) { osl::MutexGuard aGuard( GetLinguMutex() ); -#if OSL_DEBUG_LEVEL > 1 -getAvailableLocales( SN_SPELLCHECKER ); +#if OSL_DEBUG_LEVEL > 0 +getAvailableLocales(SN_SPELLCHECKER); #endif uno::Reference< linguistic2::XSpellChecker > xRes; @@ -1448,10 +1443,9 @@ uno::Reference< linguistic2::XHyphenator > SAL_CALL throw(uno::RuntimeException, std::exception) { osl::MutexGuard aGuard( GetLinguMutex() ); -#if OSL_DEBUG_LEVEL > 1 -getAvailableLocales( SN_HYPHENATOR ); +#if OSL_DEBUG_LEVEL > 0 +getAvailableLocales(SN_HYPHENATOR); #endif - uno::Reference< linguistic2::XHyphenator > xRes; if (!bDisposing) { @@ -1468,10 +1462,9 @@ uno::Reference< linguistic2::XThesaurus > SAL_CALL throw(uno::RuntimeException, std::exception) { osl::MutexGuard aGuard( GetLinguMutex() ); -#if OSL_DEBUG_LEVEL > 1 -getAvailableLocales( SN_THESAURUS ); +#if OSL_DEBUG_LEVEL > 0 +getAvailableLocales(SN_THESAURUS); #endif - uno::Reference< linguistic2::XThesaurus >xRes; if (!bDisposing) { @@ -1645,9 +1638,6 @@ void SAL_CALL osl::MutexGuard aGuard( GetLinguMutex() ); -#if OSL_DEBUG_LEVEL > 1 -#endif - LanguageType nLanguage = LinguLocaleToLanguage( rLocale ); if (!LinguIsUnspecified( nLanguage)) { @@ -1814,15 +1804,14 @@ static uno::Sequence< OUString > GetLangSvcList( const uno::Any ) if (rVal.hasValue()) { rVal >>= aRes; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 sal_Int32 nSvcs = aRes.getLength(); if (nSvcs) { const OUString *pSvcName = aRes.getConstArray(); for (sal_Int32 j = 0; j < nSvcs; ++j) { -OUString aImplName( pSvcName[j] ); -SAL_WARN_IF( aImplName.isEmpty(), "linguistic", "service impl-name missing" ); +SAL_WARN_IF( pSvcName[j].isEmpty(), "linguistic", "service impl-name missing" ); } } #endif @@ -1930,10 +1919,6 @@ uno::Sequence< OUString > SAL_CALL } } -#if OSL_DEBUG_LEVEL &
[Libreoffice-commits] core.git: slideshow/source
slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx | 16 +- slideshow/source/inc/delayevent.hxx|2 - 2 files changed, 9 insertions(+), 9 deletions(-) New commits: commit 0161f713c722392796347cf12d94423e218bdc4c Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Wed Mar 9 17:02:48 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I blindly replaced OSL_DEBUG_LEVEL > 1 conditionals to OSL_DEBUG_LEVEL > 0 as suggested in the easy hack Change-Id: Iac829aa648fd0bd5d170e92a72809a2078e1f020 Reviewed-on: https://gerrit.libreoffice.org/23066 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx index 393675b..17e501a 100644 --- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx +++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx @@ -76,7 +76,7 @@ #include -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 #include using namespace ::boost::posix_time; @@ -95,7 +95,7 @@ namespace typedef cppu::WeakComponentImplHelper OGLTransitionerImplBase; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 class TimerContext { public: @@ -299,7 +299,7 @@ public: */ bool mbHasTFPVisual; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 ptime maUpdateStartTime; ptime maUpdateEndTime; ptime maStartTime; @@ -350,7 +350,7 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta if( !mxView.is() ) return false; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 TimerContext aTimerContext("initWindowFromSlideShowView"); #endif @@ -1155,7 +1155,7 @@ void OGLTransitionerImpl::GLInitSlides() if (isDisposed() || !mpTransition || mpTransition->getSettings().mnRequiredGLVersion > mnGLVersion) return; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 TimerContext aTimerContext("texture creation"); #endif @@ -1191,7 +1191,7 @@ void OGLTransitionerImpl::GLInitSlides() void SAL_CALL OGLTransitionerImpl::update( double nTime ) throw (uno::RuntimeException, std::exception) { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 mnFrameCount ++; maUpdateStartTime = microsec_clock::local_time(); if( mnFrameCount == 1 ) { @@ -1223,7 +1223,7 @@ void SAL_CALL OGLTransitionerImpl::update( double nTime ) throw (uno::RuntimeExc mpContext->sync(); CHECK_GL_ERROR(); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 maUpdateEndTime = microsec_clock::local_time(); SAL_INFO("slideshow.opengl", "update time: " << nTime); @@ -1308,7 +1308,7 @@ void OGLTransitionerImpl::disposing() { osl::MutexGuard const guard( m_aMutex ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 SAL_INFO("slideshow.opengl", "dispose " << this); if( mnFrameCount ) { maEndTime = microsec_clock::local_time(); diff --git a/slideshow/source/inc/delayevent.hxx b/slideshow/source/inc/delayevent.hxx index 2e99ab7..fd43d29 100644 --- a/slideshow/source/inc/delayevent.hxx +++ b/slideshow/source/inc/delayevent.hxx @@ -98,7 +98,7 @@ inline EventSharedPtr makeEvent_( FuncT const& func, OUString const& rsDescripti #define makeDelay(f, t, d) makeDelay_(f, t, d) #define makeEvent(f, d) makeEvent_(f, d) -#else // OSL_DEBUG_LEVEL > 1 +#else // OSL_DEBUG_LEVEL > 0 class Delay_ : public Delay { public: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: svl/source svtools/source
svl/source/items/poolitem.cxx |8 svtools/source/brwbox/brwbox3.cxx |6 +++--- svtools/source/config/helpopt.cxx |4 +--- svtools/source/config/menuoptions.cxx |5 + svtools/source/misc/sampletext.cxx| 10 +- 5 files changed, 14 insertions(+), 19 deletions(-) New commits: commit 0452db13db40e81522fb6bc49136d25b6ffcff41 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Wed Mar 9 19:08:34 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I removed OSL_DEBUG_LEVEL > 1 conditionals, replaced DBG_ASSERT to standard assert(..) and used SAL_INFO() in some places Change-Id: Ib6d6065e3f141e60f865fef1faacdb5598e12431 Reviewed-on: https://gerrit.libreoffice.org/23073 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx index 50a91fe..90f5b73 100644 --- a/svl/source/items/poolitem.cxx +++ b/svl/source/items/poolitem.cxx @@ -25,7 +25,7 @@ #include -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 static sal_uLong nItemCount = 0; const char* pw1 = "Wow! 10.000 items!"; @@ -41,7 +41,7 @@ SfxPoolItem::SfxPoolItem(sal_uInt16 const nWhich) , m_nKind(SFX_ITEMS_NONE) { DBG_ASSERT(nWhich <= SHRT_MAX, "invalid WhichId"); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 ++nItemCount; if ( pw1 && nItemCount>=1 ) { @@ -77,7 +77,7 @@ SfxPoolItem::SfxPoolItem( const SfxPoolItem& rCpy ) , m_nWhich(rCpy.Which()) // call function because of ChkThis() (WTF does that mean?) , m_nKind( SFX_ITEMS_NONE ) { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 ++nItemCount; if ( pw1 && nItemCount>=1 ) { @@ -112,7 +112,7 @@ SfxPoolItem::~SfxPoolItem() { DBG_ASSERT(m_nRefCount == 0 || m_nRefCount > SFX_ITEMS_MAXREF, "destroying item in use"); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 --nItemCount; #endif } diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx index c98cc99..4562ddd 100644 --- a/svtools/source/brwbox/brwbox3.cxx +++ b/svtools/source/brwbox/brwbox3.cxx @@ -234,7 +234,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e } else aRetText = "TableCell"; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 aRetText += " ["; aRetText += OUString::number(sal_Int32(GetCurRow())); aRetText += ","; @@ -247,7 +247,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e sal_Int32 rowId = _nPosition + 1; aRetText = OUString::number( rowId ); } -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 aRetText += " ["; aRetText += OUString::number(sal_Int32(GetCurRow())); aRetText += ","; @@ -257,7 +257,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e break; case ::svt::BBTYPE_COLUMNHEADERCELL: aRetText = GetColumnDescription( sal_Int16( _nPosition ) ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 aRetText += " ["; aRetText += OUString::number(sal_Int32(GetCurRow())); aRetText += ","; diff --git a/svtools/source/config/helpopt.cxx b/svtools/source/config/helpopt.cxx index 01bf065..f03ebcf 100644 --- a/svtools/source/config/helpopt.cxx +++ b/svtools/source/config/helpopt.cxx @@ -150,9 +150,7 @@ void SvtHelpOptions_Impl::Load(const uno::Sequence< OUString>& rPropertyNames) { for ( int nProp = 0; nProp < rPropertyNames.getLength(); nProp++ ) { -#if OSL_DEBUG_LEVEL > 1 -DBG_ASSERT( pValues[nProp].hasValue(), "property value missing" ); -#endif +assert(pValues[nProp].hasValue() && "property value missing"); if ( pValues[nProp].hasValue() ) { bool bTmp; diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx index 1f27fc7..7146b23 100644 --- a/svtools/source/config/menuoptions.cxx +++ b/svtools/source/config/menuoptions.cxx @@ -276,10 +276,7 @@ void SvtMenuOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Menu\\IsSystemIconsInMenus\"?" ); bMenuSettingsChanged |= seqValues[nProperty] >>= bSystemMenuIcons; } -
[Libreoffice-commits] core.git: svx/source
svx/source/customshapes/EnhancedCustomShape2d.cxx | 13 -- svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx |5 ++- svx/source/form/formcontroller.cxx|4 +-- svx/source/form/navigatortree.cxx |4 +-- svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx | 10 +++ 5 files changed, 18 insertions(+), 18 deletions(-) New commits: commit 901d04d3965ed73696586de06c6890e79299f266 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 7 22:19:36 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0 in order to reduce debug levels. In some places i also used SAL_INFO(..) and SAL_WARN(..) statements to replace their deprecated OSL_ counterparts Change-Id: I73ecc20ffd654501b16820e3bf748f1bcbcdab79 Reviewed-on: https://gerrit.libreoffice.org/23004 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 3c5f604..aa3c594 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -850,13 +850,13 @@ double EnhancedCustomShape2d::GetAdjustValueAsDouble( const sal_Int32 nIndex ) c double EnhancedCustomShape2d::GetEquationValueAsDouble( const sal_Int32 nIndex ) const { double fNumber = 0.0; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 static sal_uInt32 nLevel = 0; #endif if ( nIndex < (sal_Int32)vNodesSharedPtr.size() ) { if ( vNodesSharedPtr[ nIndex ].get() ) { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 nLevel ++; #endif try @@ -873,10 +873,9 @@ double EnhancedCustomShape2d::GetEquationValueAsDouble( const sal_Int32 nIndex ) if ( !rtl::math::isFinite( fNumber ) ) fNumber = 0.0; -#if OSL_DEBUG_LEVEL > 1 -OSL_TRACE("equation %d (level: %d): %s --> %f (angle: %f)", nIndex, - nLevel, OUStringToOString( seqEquations[ nIndex ], - RTL_TEXTENCODING_ASCII_US ).getStr(), fNumber, 180.0*fNumber/1080.0); +#if OSL_DEBUG_LEVEL > 0 +SAL_INFO("svx", "equation " << nLevel << " (level: " << seqEquations[nIndex] << "): " + << fNumber << " --> " << 180.0*fNumber/1080.0); #endif } } @@ -884,7 +883,7 @@ double EnhancedCustomShape2d::GetEquationValueAsDouble( const sal_Int32 nIndex ) { OSL_TRACE("error: EnhancedCustomShape2d::GetEquationValueAsDouble failed"); } -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 nLevel --; #endif } diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx index 9a2f31b..63c2ccd 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx @@ -248,7 +248,7 @@ public: } virtual double operator()() const override { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 const char *funcName; switch (meFunct) { @@ -268,7 +268,8 @@ public: default:funcName = "???"; break; } -OSL_TRACE(" %s --> %f (angle: %f)", funcName, getValue( mrCustoShape, meFunct ), 180.0*getValue( mrCustoShape, meFunct )/1080.0); +SAL_INFO("svx", funcName << " --> " << getValue(mrCustoShape, meFunct) << "(angle: " << + 180.0*getValue(mrCustoShape, meFunct)/1080.0 << ")"); #endif return getValue( mrCustoShape, meFunct ); diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 7f41de7..b3a7843 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -1653,10 +1653,10 @@ void FormController::focusGained(const FocusEvent& e) throw( RuntimeException, s ) { // check the old control if the content is ok -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 Reference< XBoundControl > xLockingTest(m_xCurrentControl, UNO_QUERY); sal_Bool bControlIsLocked = xLockingTest.is() && xLockingTest->getLock(); -OSL_ENSURE(!bControlIsLocked, "FormController::Gained: I'm modified and the cu
[Libreoffice-commits] core.git: cppuhelper/source cppuhelper/test
cppuhelper/source/factory.cxx| 11 ++- cppuhelper/test/testdefaultbootstrapping.cxx |9 ++--- cppuhelper/test/testlib/defbootstrap_lib.cxx | 13 +++-- 3 files changed, 7 insertions(+), 26 deletions(-) New commits: commit d6411207bd83b34b4d6c6fd68cd41d3005228b05 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Wed Mar 9 17:53:50 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I removed OSL_DEBUG_LEVEL > 1 conditionals to SAL_INFO statements Change-Id: I6f74f5146473464758f35629877a76bb2bc39b4e Reviewed-on: https://gerrit.libreoffice.org/23071 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index f14494f..5748921 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -699,9 +699,7 @@ Reference SAL_CALL ORegistryFactoryHelper::createInstanceWithArgume } else if( xModuleFactory.is() ) { -#if OSL_DEBUG_LEVEL > 1 -OSL_TRACE( "### no context ORegistryFactoryHelper::createInstanceWithArgumentsAndContext()!" ); -#endif +SAL_INFO("cppuhelper", "no context ORegistryFactoryHelper::createInstanceWithArgumentsAndContext()!"); return xModuleFactory->createInstanceWithArgumentsAndContext( Arguments, Reference< XComponentContext >() ); } @@ -732,12 +730,7 @@ Reference< XInterface > ORegistryFactoryHelper::createInstanceWithArgumentsAndCo } else if( xModuleFactoryDepr.is() ) { -#if OSL_DEBUG_LEVEL > 1 -if (xContext.is()) -{ -OSL_TRACE( "### ignoring context calling ORegistryFactoryHelper::createInstanceWithArgumentsAndContext()!" ); -} -#endif +SAL_INFO_IF(xContext.is(), "cppuhelper", "ignoring context calling ORegistryFactoryHelper::createInstaceWithArgumentsAndContext()!"); return xModuleFactoryDepr->createInstanceWithArguments( rArguments ); } diff --git a/cppuhelper/test/testdefaultbootstrapping.cxx b/cppuhelper/test/testdefaultbootstrapping.cxx index 8e80efa..4e40d25 100644 --- a/cppuhelper/test/testdefaultbootstrapping.cxx +++ b/cppuhelper/test/testdefaultbootstrapping.cxx @@ -50,10 +50,7 @@ SAL_IMPLEMENT_MAIN() if (!arg.isEmpty()) { Reference xInterface = smgr->createInstance(arg); -OString tmp = OUStringToOString(arg, RTL_TEXTENCODING_ASCII_US); -#if OSL_DEBUG_LEVEL > 1 -fprintf(stderr, "got the %s service %p\n", tmp.getStr(), xInterface.get()); -#endif +SAL_INFO("cppuhelper", "got the " << arg << " service " << xInterface.get()); result = result && (xInterface.get() != 0); } @@ -65,9 +62,7 @@ SAL_IMPLEMENT_MAIN() fprintf(stderr, "an exception occurred: %s\n", message.getStr()); } -#if OSL_DEBUG_LEVEL > 1 -OSL_TRACE("-- %i", result); -#endif +SAL_INFO("extensions", "-- " << result); return result; } diff --git a/cppuhelper/test/testlib/defbootstrap_lib.cxx b/cppuhelper/test/testlib/defbootstrap_lib.cxx index be14184..26d229f 100644 --- a/cppuhelper/test/testlib/defbootstrap_lib.cxx +++ b/cppuhelper/test/testlib/defbootstrap_lib.cxx @@ -43,10 +43,7 @@ static sal_Bool tryService(const char * serviceName) OUString iniName = libraryFileUrl.copy(0, libraryFileUrl.lastIndexOf((sal_Unicode)'.')); // cut the library extension iniName += SAL_CONFIGFILE(""); // add the rc file extension -#if OSL_DEBUG_LEVEL > 1 -OString sIniName = OUStringToOString(iniName, RTL_TEXTENCODING_ASCII_US); -fprintf(stderr, "defbootstrap.cxx:tryService: using ini: %s\n", sIniName.getStr()); -#endif +SAL_INFO("cppuhelper", "using ini: " << iniName); sal_Bool result = sal_True; @@ -57,9 +54,7 @@ static sal_Bool tryService(const char * serviceName) OUString arg = OUString::createFromAscii(serviceName); Reference xInterface = smgr->createInstance(arg); -#if OSL_DEBUG_LEVEL > 1 -fprintf(stderr, "got the %s service %p\n", serviceName, xInterface.get()); -#endif +SAL_INFO("cppuhelper", "got the " << serviceName << " service " << xInterface.get()); result = result && (xInterface.get() != 0); } catch(Exception & exception) { @@ -68,9 +63,7 @@ static sal_Bool tryService(const char * serviceName) fprintf(stderr, "an exception occurred: %s\n", message.getStr()); } -#if OSL_DEBUG_LEV
[Libreoffice-commits] core.git: starmath/inc starmath/source
starmath/inc/parse.hxx|2 starmath/inc/view.hxx |7 --- starmath/source/accessibility.cxx |8 +-- starmath/source/dialog.cxx| 85 -- starmath/source/document.cxx |7 --- starmath/source/edit.cxx |3 - starmath/source/mathtype.cxx |7 --- starmath/source/parse.cxx | 12 - starmath/source/view.cxx | 15 -- 9 files changed, 29 insertions(+), 117 deletions(-) New commits: commit 28aaa27438fb3a743792ce821ba1f523a5d9947f Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Thu Mar 17 12:03:50 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I removed all the OSL_DEBUG_LEVEL > 1 conditionals and also made SAL_WARN open to production code which was earlier under OSL_DEBUG_LEVEL > 0 Change-Id: Ibe71defed9a7191ec8e4a934e746ef0f3ebd8b3a Reviewed-on: https://gerrit.libreoffice.org/23065 Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Tested-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/starmath/inc/parse.hxx b/starmath/inc/parse.hxx index 8c51220..3ae3f66 100644 --- a/starmath/inc/parse.hxx +++ b/starmath/inc/parse.hxx @@ -53,9 +53,7 @@ class SmParser SmParser(const SmParser&) = delete; SmParser& operator=(const SmParser&) = delete; -#if OSL_DEBUG_LEVEL > 1 boolIsDelimiter( const OUString , sal_Int32 nPos ); -#endif voidNextToken(); sal_Int32 GetTokenIndex() const { return m_nTokenIndex; } voidReplace( sal_Int32 nPos, sal_Int32 nLen, const OUString ); diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx index 37344be..397dca9 100644 --- a/starmath/inc/view.hxx +++ b/starmath/inc/view.hxx @@ -161,9 +161,6 @@ protected: public: SmEditController(SmEditWindow &, sal_uInt16, SfxBindings & ); -#if OSL_DEBUG_LEVEL > 1 -virtual ~SmEditController(); -#endif virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState) override; }; @@ -216,10 +213,6 @@ class SmCmdBoxWrapper : public SfxChildWindow protected: SmCmdBoxWrapper(vcl::Window* pParentWindow, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo); -#if OSL_DEBUG_LEVEL > 1 -virtual ~SmCmdBoxWrapper(); -#endif - public: SmEditWindow& GetEditWindow() diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index 17e8624..93656c7 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -240,10 +240,10 @@ awt::Size SAL_CALL SmGraphicAccessible::getSize() "mismatch of window parent and accessible parent" ); Size aSz( pWin->GetSizePixel() ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 awt::Rectangle aRect( lcl_GetBounds( pWin ) ); Size aSz2( aRect.Width, aRect.Height ); -OSL_ENSURE( aSz == aSz2, "mismatch in width" ); +assert(aSz == aSz2 && "mismatch in width" ); #endif return awt::Size( aSz.Width(), aSz.Height() ); } @@ -1718,10 +1718,10 @@ awt::Size SAL_CALL SmEditAccessible::getSize( ) "mismatch of window parent and accessible parent" ); Size aSz( pWin->GetSizePixel() ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 awt::Rectangle aRect( lcl_GetBounds( pWin ) ); Size aSz2( aRect.Width, aRect.Height ); -OSL_ENSURE( aSz == aSz2, "mismatch in width" ); +assert(aSz == aSz2 && "mismatch in width"); #endif return awt::Size( aSz.Width(), aSz.Height() ); } diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 87fba57..9a2f2a0 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -151,9 +151,7 @@ void SetFontStyle(const OUString , vcl::Font ) for (i = 0; i < SmFontStyles::GetCount(); ++i) if (rStyleName == rStyles.GetStyleName(i)) break; -#if OSL_DEBUG_LEVEL > 1 -OSL_ENSURE(i < rStyles.GetCount(), "style-name unknown"); -#endif +assert(i < rStyles.GetCount() && "style-name unknown"); nIndex = i; } @@ -766,16 +764,11 @@ void SmDistanceDialog::SetHelpId(MetricField , const OString& sHelpId) void SmDistanceDialog::SetCategory(sal_uInt16 nCategory) { -#if OSL_DEBUG_LEVEL > 1 -OSL_ENSURE(/*0 <= nCategory &&*/ nCategory < NOCATEGORIES, -"Sm: wrong category number in SmDistanceDialog"); -#endif +assert(nCategory < NOCATEGORIES && "Sm: wrong category number in SmDistanceDialog"); // array to convert category- and metricfield-number in help ids. // 0 is used in case of unused combinations. -#if OSL_DEBUG_LEVEL > 1 -OSL_ENSURE(NOCATEGORIES
[Libreoffice-commits] core.git: i18npool/source
i18npool/source/localedata/data/az_AZ.xml |2 +- i18npool/source/localedata/data/be_BY.xml |2 +- i18npool/source/localedata/data/bn_IN.xml |2 +- i18npool/source/localedata/data/ca_ES.xml |2 +- i18npool/source/localedata/data/cs_CZ.xml |2 +- i18npool/source/localedata/data/cv_RU.xml |2 +- i18npool/source/localedata/data/da_DK.xml |2 +- i18npool/source/localedata/data/de_AT.xml |2 +- i18npool/source/localedata/data/de_CH.xml |2 +- i18npool/source/localedata/data/de_DE.xml |2 +- i18npool/source/localedata/data/de_LI.xml |2 +- i18npool/source/localedata/data/de_LU.xml |2 +- i18npool/source/localedata/data/dsb_DE.xml |2 +- i18npool/source/localedata/data/el_GR.xml |2 +- i18npool/source/localedata/data/en_NA.xml |2 +- i18npool/source/localedata/data/en_ZA.xml |2 +- i18npool/source/localedata/data/eo.xml |2 +- i18npool/source/localedata/data/fo_FO.xml |2 +- i18npool/source/localedata/data/fr_BE.xml |2 +- i18npool/source/localedata/data/fr_BF.xml |2 +- i18npool/source/localedata/data/fr_CA.xml |2 +- i18npool/source/localedata/data/fr_CH.xml |2 +- i18npool/source/localedata/data/fr_FR.xml |2 +- i18npool/source/localedata/data/fr_LU.xml |2 +- i18npool/source/localedata/data/gl_ES.xml |2 +- i18npool/source/localedata/data/hi_IN.xml |2 +- i18npool/source/localedata/data/hsb_DE.xml |2 +- i18npool/source/localedata/data/hu_HU.xml |2 +- i18npool/source/localedata/data/ia.xml |2 +- i18npool/source/localedata/data/id_ID.xml |2 +- i18npool/source/localedata/data/is_IS.xml |2 +- i18npool/source/localedata/data/it_CH.xml |2 +- i18npool/source/localedata/data/it_IT.xml |2 +- i18npool/source/localedata/data/ja_JP.xml |2 +- i18npool/source/localedata/data/kl_GL.xml |2 +- i18npool/source/localedata/data/ky_KG.xml |2 +- i18npool/source/localedata/data/la_VA.xml |2 +- i18npool/source/localedata/data/lb_LU.xml |2 +- i18npool/source/localedata/data/lo_LA.xml |2 +- i18npool/source/localedata/data/lv_LV.xml |2 +- i18npool/source/localedata/data/ml_IN.xml |2 +- i18npool/source/localedata/data/mn_Cyrl_MN.xml |2 +- i18npool/source/localedata/data/nds_DE.xml |2 +- i18npool/source/localedata/data/ne_NP.xml |2 +- i18npool/source/localedata/data/nl_BE.xml |2 +- i18npool/source/localedata/data/no_NO.xml |2 +- i18npool/source/localedata/data/pl_PL.xml |2 +- i18npool/source/localedata/data/ro_RO.xml |2 +- i18npool/source/localedata/data/ru_RU.xml |2 +- i18npool/source/localedata/data/rw_RW.xml |2 +- i18npool/source/localedata/data/sk_SK.xml |2 +- i18npool/source/localedata/data/sl_SI.xml |2 +- i18npool/source/localedata/data/sr_RS.xml |2 +- i18npool/source/localedata/data/sv_SE.xml |2 +- i18npool/source/localedata/data/tg_TJ.xml |2 +- i18npool/source/localedata/data/th_TH.xml |4 ++-- i18npool/source/localedata/data/tr_TR.xml |2 +- i18npool/source/localedata/data/tt_RU.xml |2 +- i18npool/source/localedata/data/uk_UA.xml |2 +- i18npool/source/localedata/data/uz_UZ.xml |2 +- i18npool/source/localedata/data/vec_IT.xml |2 +- i18npool/source/localedata/data/wa_BE.xml |2 +- 62 files changed, 63 insertions(+), 63 deletions(-) New commits: commit 547617955af87640b46211b6715032bc6576279a Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Wed Mar 16 23:48:15 2016 +0530 Text General inconsistent with cell formatting dlg I just replaced Standard to General in order to ensure some sort of consistency as mentioned in comment 1 of bug description. Reviewed by the localization team. Change-Id: I7d75e7e9855d43a9ff709478a2f3e867b2a479a2 Reviewed-on: https://gerrit.libreoffice.org/23310 Reviewed-by: jan iversen <j...@documentfoundation.org> Tested-by: jan iversen <j...@documentfoundation.org> diff --git a/i18npool/source/localedata/data/az_AZ.xml b/i18npool/source/localedata/data/az_AZ.xml index 1bb700b..27f6a99 100644 --- a/i18npool/source/localedata/data/az_AZ.xml +++ b/i18npool/source/localedata/data/az_AZ.xml @@ -54,7 +54,7 @@ D.M - Standard + General 0 diff --git a/i18npool/source/localedata/data/be_BY.xml b/i18npool/source/localedata/data/be_BY.xml index 545ceeb..cd04599 100644 --- a/i18npool/source/localedata/data/be_BY.xml +++ b/i18npool/source/localedata/data/be_BY.xml @@ -55,7 +55,7 @@ D/M/ D.M. - Standard + General 0 diff --git a/i18npool/source/localedata/data/bn_IN.xml b/i18npool/sour
[Libreoffice-commits] core.git: ucbhelper/source
ucbhelper/source/client/content.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit bfa7b700480fdc4c52ea91f30bcd274d963721f5 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 14 11:51:55 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I simply replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0 as suggested in easy hack Change-Id: Id30d93fa439fa4cddf4a56c90b6054203c7882b1 Reviewed-on: https://gerrit.libreoffice.org/23233 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx index aa5dc96..87ec398 100644 --- a/ucbhelper/source/client/content.cxx +++ b/ucbhelper/source/client/content.cxx @@ -1120,7 +1120,7 @@ Content_Impl::Content_Impl( const Reference< XComponentContext >& rCtx, m_xContentEventListener = new ContentEventListener_Impl( *this ); m_xContent->addContentEventListener( m_xContentEventListener ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 // Only done on demand in product version for performance reasons, // but a nice debug helper. getURL(); @@ -1153,7 +1153,7 @@ void Content_Impl::reinit( const Reference< XContent >& xContent ) m_xContent = xContent; m_xContent->addContentEventListener( m_xContentEventListener ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 // Only done on demand in product version for performance reasons, // but a nice debug helper. getURL(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: jvmfwk/source
jvmfwk/source/fwkutil.cxx |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) New commits: commit 20efe5ebcbc49ef3ea46bb13b8aec05c81b86308 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 14 11:36:12 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I replaced OSL_ASSERT() with standard C++ assert Change-Id: I92e07d62f3dfe2ad914c49e2b596aef28c35e225 Reviewed-on: https://gerrit.libreoffice.org/23231 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx index 591a12a..9c026de 100644 --- a/jvmfwk/source/fwkutil.cxx +++ b/jvmfwk/source/fwkutil.cxx @@ -82,10 +82,8 @@ bool isAccessibilitySupportDesired() else if (strcmp((char*) arData, "false") == 0 || strcmp((char*) arData, "0") == 0) retVal = false; -#if OSL_DEBUG_LEVEL > 1 else -OSL_ASSERT(0); -#endif +assert(0); } else if (dwType == REG_DWORD) { @@ -93,10 +91,8 @@ bool isAccessibilitySupportDesired() retVal = true; else if (arData[0] == 0) retVal = false; -#if OSL_DEBUG_LEVEL > 1 else -OSL_ASSERT(0); -#endif +assert(0); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: ucb/source
ucb/source/ucp/gio/gio_content.cxx | 29 +++-- 1 file changed, 7 insertions(+), 22 deletions(-) New commits: commit b64c7f946ad56a7566e117b63657e654afaab2bd Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 14 11:47:57 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I removed OSL_DEBUG_LEVEL > 1 conditionals and the g_warning() with SAL_INFO() and SAL_WARN Change-Id: Icb4ab72245111b52c59a47cc659dfdb79d5690ee Reviewed-on: https://gerrit.libreoffice.org/23232 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx index 10b24e7..5305486 100644 --- a/ucb/source/ucp/gio/gio_content.cxx +++ b/ucb/source/ucp/gio/gio_content.cxx @@ -685,9 +685,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( for ( sal_Int32 n = 0; n < nCount; ++n ) { const beans::PropertyValue& rValue = pValues[ n ]; -#if OSL_DEBUG_LEVEL > 1 -g_warning("Set prop '%s'", OUStringToOString(rValue.Name, RTL_TEXTENCODING_UTF8).getStr()); -#endif +SAL_WARN("ucb.ucp.gio", "Set prop '" << rValue.Name << "'"); if ( rValue.Name == "ContentType" || rValue.Name == "MediaType" || rValue.Name == "IsDocument" || @@ -723,9 +721,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( if (!newName || !oldName || strcmp(newName, oldName)) { -#if OSL_DEBUG_LEVEL > 1 -g_warning ("Set new name to '%s'", newName); -#endif +SAL_WARN("ucb.ucp.gio", "Set new name to '" << newName << "'"); aEvent.PropertyName = "Title"; if (oldName) @@ -910,10 +906,7 @@ uno::Any Content::open(const ucb::OpenCommandArgument2 & rOpenCommand, // Note: rOpenCommand.Sink may contain an XStream // implementation. Support for this type of // sink is optional... -#ifdef DEBUG -g_warning ("Failed to load data from '%s'", -OUStringToOString(m_xIdentifier->getContentIdentifier(), RTL_TEXTENCODING_UTF8).getStr()); -#endif +SAL_WARN("ucb.ucp.gio", "Failed to load data from '" << m_xIdentifier->getContentIdentifier() << "'"); ucbhelper::cancelCommandExecution( uno::makeAny (ucb::UnsupportedDataSinkException @@ -923,7 +916,7 @@ uno::Any Content::open(const ucb::OpenCommandArgument2 & rOpenCommand, } } else -g_warning ("Open falling through ..."); +SAL_INFO("ucb.ucp.gio", "Open falling through ..."); return aRet; } @@ -1049,9 +1042,7 @@ void Content::insert(const uno::Reference< io::XInputStream > , g_file_info_has_attribute(pInfo, G_FILE_ATTRIBUTE_STANDARD_TYPE) && g_file_info_get_file_type(pInfo) == G_FILE_TYPE_DIRECTORY ) { -#if OSL_DEBUG_LEVEL > 1 -g_warning ("Make directory"); -#endif +SAL_INFO("ucb.ucp.gio", "Make directory"); if( !g_file_make_directory( getGFile(), nullptr, )) ucbhelper::cancelCommandExecution(mapGIOError(pError), xEnv); return; @@ -1171,17 +1162,11 @@ uno::Reference< ucb::XContent > create_document = false; else { -#ifdef DEBUG -g_warning( "Failed to create new content '%s'", OUStringToOString(Info.Type, -RTL_TEXTENCODING_UTF8).getStr() ); -#endif +SAL_WARN("ucb.ucp.gio", "Failed to create new content '" << Info.Type << "'"); return uno::Reference< ucb::XContent >(); } -#if OSL_DEBUG_LEVEL > 1 -g_warning( "createNewContent (%d)", (int) create_document ); -#endif - +SAL_INFO("ucb.ucp.gio", "createNewContent (" << create_document << ")"); OUString aURL = m_xIdentifier->getContentIdentifier(); if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: fpicker/source
fpicker/source/aqua/FilterHelper.mm |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit b69d253fe4192c7224b4205ca52109070d2df5ed Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 14 11:13:18 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0 and added SAL_INFO statements intead of OSL_TRACE Change-Id: Id3fda00e64eacc952e9317d854b179ac8f26d6ed Reviewed-on: https://gerrit.libreoffice.org/23229 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/fpicker/source/aqua/FilterHelper.mm b/fpicker/source/aqua/FilterHelper.mm index ca91f7a..c539fd6 100644 --- a/fpicker/source/aqua/FilterHelper.mm +++ b/fpicker/source/aqua/FilterHelper.mm @@ -251,20 +251,20 @@ void FilterHelper::SetCurFilter( const rtl::OUString& rFilter ) } //only for output purposes -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 FilterList::iterator aFilter = ::std::find_if(m_pFilterList->begin(), m_pFilterList->end(), FilterTitleMatch(m_aCurrentFilter)); if (aFilter != m_pFilterList->end()) { OUStringList suffixes = aFilter->getFilterSuffixList(); if (!suffixes.empty()) { -OSL_TRACE("Current active suffixes: "); +SAL_INFO("fpicker.aqua", "Current active suffixes: "); OUStringList::iterator suffIter = suffixes.begin(); while(suffIter != suffixes.end()) { -OSL_TRACE("%s", OUStringToOString((*suffIter), RTL_TEXTENCODING_UTF8).getStr()); +SAL_INFO("fpicker.aqua", *suffIter); suffIter++; } } } else { -OSL_TRACE("No filter entry was found for that name!"); +SAL_INFO("fpicker.aqua", "No filter entry was found for that name!"); } #endif } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: framework/source
framework/source/services/autorecovery.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit afbdde44b85e0d76bbc102188391b296113802dd Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 14 11:32:24 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVLEL > 1 conditionals I replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0 and made sure that the build doesn't break. Change-Id: I9a07da5b0f19d695339705e00112956a56589327 Reviewed-on: https://gerrit.libreoffice.org/23230 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 82ef364..f45e0ec 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -439,7 +439,7 @@ private: we use [ms] instead of that. Further we don't wait 10 s for user idle ... */ -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 sal_Bool m_dbg_bMakeItFaster; #endif @@ -1266,7 +1266,7 @@ AutoRecovery::AutoRecovery(const css::uno::Reference< css::uno::XComponentContex , m_nMinSpaceDocSave(MIN_DISCSPACE_DOCSAVE ) , m_nMinSpaceConfigSave (MIN_DISCSPACE_CONFIGSAVE ) -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 , m_dbg_bMakeItFaster (sal_False ) #endif { @@ -2291,7 +2291,7 @@ void AutoRecovery::implts_updateTimer() if (m_eTimerType == AutoRecovery::E_NORMAL_AUTOSAVE_INTERVALL) { nMilliSeconds = (m_nAutoSaveTimeIntervall*6); // [min] => 60.000 ms -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 if (m_dbg_bMakeItFaster) nMilliSeconds = m_nAutoSaveTimeIntervall; // [ms] #endif @@ -2299,7 +2299,7 @@ void AutoRecovery::implts_updateTimer() else if (m_eTimerType == AutoRecovery::E_POLL_FOR_USER_IDLE) { nMilliSeconds = MIN_TIME_FOR_USER_IDLE; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 if (m_dbg_bMakeItFaster) nMilliSeconds = 300; // let us some time, to finish this method .-) #endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/source desktop/unx
desktop/source/app/officeipcthread.cxx | 15 +++-- desktop/source/deployment/registry/dp_registry.cxx |2 - desktop/source/splash/unxsplash.cxx| 21 +++-- desktop/unx/source/start.c | 33 +++-- 4 files changed, 19 insertions(+), 52 deletions(-) New commits: commit 221144f9c995fe30adf577c02f756b3123fb2550 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Wed Mar 9 02:16:47 2016 +0530 tdf#91794 OSL_DEBUG_LEVEL > 1 removed (desktop) [UPDATED PATCH]: I removed the trailing newline characters in the SAL_WARN macro as pointed by Jan Iverson Change-Id: If90b0d44777ec2ab1bd646f22f4c9cdf798cf8b4 Reviewed-on: https://gerrit.libreoffice.org/22315 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx index 6bf4dc5..e9ad39b 100644 --- a/desktop/source/app/officeipcthread.cxx +++ b/desktop/source/app/officeipcthread.cxx @@ -249,10 +249,7 @@ rtl::Reference< OfficeIPCThread > OfficeIPCThread::pGlobalOfficeIPCThread; // Into a hex string of well known length ff132a86... OUString CreateMD5FromString( const OUString& aMsg ) { -#if (OSL_DEBUG_LEVEL > 2) -fprintf( stderr, "create md5 from '%s'\n", - OUStringToOString (aMsg, RTL_TEXTENCODING_UTF8).getStr() ); -#endif +SAL_WARN("desktop.app", "create md5 from '" << aMsg << "'"); rtlDigest handle = rtl_digest_create( rtl_Digest_AlgorithmMD5 ); if ( handle ) @@ -750,8 +747,8 @@ void OfficeIPCThread::execute() } catch ( const CommandLineArgs::Supplier::Exception & ) { -#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL -fprintf( stderr, "Error in received command line arguments\n" ); +#if (OSL_DEBUG_LEVEL > 0) || defined DBG_UTIL +SAL_WARN("desktop.app", "Error in received command line arguments"); #endif continue; } @@ -955,7 +952,7 @@ void OfficeIPCThread::execute() PROCESSING_DONE, SAL_N_ELEMENTS(PROCESSING_DONE)); // incl. terminating NUL if (n != SAL_N_ELEMENTS(PROCESSING_DONE)) { -SAL_WARN("desktop", "short write: " << n); +SAL_WARN("desktop" , "short write: " << n); continue; } } @@ -969,8 +966,8 @@ void OfficeIPCThread::execute() } } -#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL -fprintf( stderr, "Error on accept: %d\n", (int)nError ); +#if (OSL_DEBUG_LEVEL > 0) || defined DBG_UTIL +SAL_WARN( "desktop.app", "Error on accept: " << (int)nError); #endif TimeValue tval; tval.Seconds = 1; diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx index 4c07228..6faba93 100644 --- a/desktop/source/deployment/registry/dp_registry.cxx +++ b/desktop/source/deployment/registry/dp_registry.cxx @@ -376,7 +376,7 @@ Reference PackageRegistryImpl::create( create_folder( nullptr, registryCachePath, Reference()); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 // dump tables: { t_registryset allBackends; diff --git a/desktop/source/splash/unxsplash.cxx b/desktop/source/splash/unxsplash.cxx index c396fc5..4018535 100644 --- a/desktop/source/splash/unxsplash.cxx +++ b/desktop/source/splash/unxsplash.cxx @@ -36,10 +36,7 @@ namespace desktop UnxSplashScreen::~UnxSplashScreen() { -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "UnxSplashScreen::~UnxSplashScreen()\n" ); -#endif - +SAL_WARN("desktop.splash", "UnxSplashScreen::~UnxSplashScreen()"); if ( m_pOutFd ) { fclose( m_pOutFd ); @@ -55,9 +52,7 @@ void SAL_CALL UnxSplashScreen::start( const OUString& /*aText*/, sal_Int32 /*nRa void SAL_CALL UnxSplashScreen::end() throw ( uno::RuntimeException, std::exception ) { -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "UnxSplashScreen::end()\n" ); -#endif +SAL_WARN("desktop.splash", "UnxSplashScreen::end()"); if( !m_pOutFd ) return; @@ -68,9 +63,7 @@ void SAL_CALL UnxSplashScreen::end() void SAL_CALL UnxSplashScreen::reset() throw ( uno::RuntimeException, std::exception ) { -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "UnxSplashScreen::reset()\n" ); -#endif +SAL_WARN("desktop.splash", "UNXSplashScreen::reset()"); if( !m_pOutFd ) return; @@ -108,11 +101,9 @@ UnxSplashScreen::initi
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rscdb.cxx | 11 ++- rsc/source/prj/gui.cxx |4 +--- rsc/source/rsc/rsc.cxx | 12 +++- rsc/source/rscpp/cpp.h | 10 +- rsc/source/rscpp/cpp1.c | 14 +++--- rsc/source/rscpp/cpp2.c |6 +++--- rsc/source/rscpp/cpp3.c | 16 rsc/source/rscpp/cpp4.c | 12 ++-- rsc/source/rscpp/cpp6.c |4 ++-- 9 files changed, 37 insertions(+), 52 deletions(-) New commits: commit 0c3ff8ca07265304f9ea0a7aca8c83703cff01a1 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 7 22:56:00 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0 conditionals and in some places i used SAL_INFO(..)s Change-Id: I87e2e4d73be22630dbcce6df2650b924cba9f8ec Reviewed-on: https://gerrit.libreoffice.org/23005 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index 2c253e8..dbf0a54 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -83,9 +83,6 @@ OString RscTypCont::ChangeLanguage(const OString& rNewLang) if (bAppendEnUsFallback) aFallbacks.push_back( "en-US"); -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "RscTypCont::ChangeLanguage: " ); -#endif aLangFallbacks.clear(); @@ -99,15 +96,11 @@ OString RscTypCont::ChangeLanguage(const OString& rNewLang) AddLanguage( aLang.getStr() ); nID = GetLangId( aLang ); } -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, " '%s' (0x%hx) (%s)", aLang.getStr(), (int)nID, (bAdd ? "added" : "exists") ); -#endif +SAL_INFO("rsc", "RscTypCont::ChangeLanguage: " << +"'" << aLang << "'" << " (0x" << std::hex << nID << ") (" << (bAdd ? "added" : "exists")); aLangFallbacks.push_back( nID); } -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "\n" ); -#endif return aRet; } diff --git a/rsc/source/prj/gui.cxx b/rsc/source/prj/gui.cxx index 3a0f060..f95f469 100644 --- a/rsc/source/prj/gui.cxx +++ b/rsc/source/prj/gui.cxx @@ -42,9 +42,7 @@ static RscVerbosity lcl_determineVerbosity( int argc, char ** argv ) int rsc2_main( int argc, char **argv ) { -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "debugging %s\n", argv[0] ); -#endif +SAL_WARN("rsc", "debugging " << argv[0]); ERRTYPE aError; diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 6d663a2..e4e9a83 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -96,9 +96,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) i = 1; while( ppStr && i < (aCmdLine.GetCount() -1) ) { -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "CmdLineArg: \"%s\"\n", *ppStr ); -#endif +SAL_INFO("rsc", "CmdLineArg: \"" << *ppStr << "\""); if (strcmp(*ppStr, "-isystem") == 0) { // ignore "-isystem" and following arg @@ -775,9 +773,7 @@ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile, bFile = aFS.isRegular(); } -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "Searching image: %s\n", aSysPath.getStr() ); -#endif +SAL_INFO("rsc", "Searching image: " << aSysPath); if( bFile ) { @@ -812,9 +808,7 @@ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile, fprintf( pSysListFile, "%s\n", rContext.pCmdLine->substitutePaths( aSysPath ).getStr() ); } -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "ImagePath to add: %s\n", rImagePath.getStr() ); -#endif +SAL_INFO("rsc", "ImagePath to add: " << rImagePath); } ++aDirIter; diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h index 0114c29..fb7ff4d 100644 --- a/rsc/source/rscpp/cpp.h +++ b/rsc/source/rscpp/cpp.h @@ -28,7 +28,7 @@ /* in cpp1.c: file-pointer auf stdout oder file */ extern FILE* pCppOut; /* BP */ #define PUTCHAR( d ) fprintf( pCppOut, "%c", (d) )/* BP */ -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 extern FILE* pDefOut; /* ER */ #ifdef EVALDEFS #define NEVALBUF2048 @@ -228,7 +228,7 @@ extern char*magic[];
[Libreoffice-commits] core.git: toolkit/source
toolkit/source/awt/vclxaccessiblecomponent.cxx|2 - toolkit/source/controls/controlmodelcontainerbase.cxx | 30 -- 2 files changed, 1 insertion(+), 31 deletions(-) New commits: commit f3d454647ae5f0398ce3b38a71ed525bc16c3722 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Fri Mar 11 19:00:31 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I replaced OSL_DEBUG_LEVEL > 1 conditionals to OSL_DEBUG_LEVEL > 0 as suggested in easy hack Change-Id: Ie852e95992bb8b0c49f2d01348ed598dfc26a39a Reviewed-on: https://gerrit.libreoffice.org/23074 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index b7a89fa..c182d56 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -628,7 +628,7 @@ OUString VCLXAccessibleComponent::getAccessibleName( ) throw (uno::RuntimeExcep if ( GetWindow() ) { aName = GetWindow()->GetAccessibleName(); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 aName += " (Type = "; aName += OUString::number(static_cast(GetWindow()->GetType())); aName += ")"; diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index be6c1f9..56475ff 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -949,9 +949,6 @@ void ControlModelContainerBase::implUpdateGroupStructure() AllGroups::iterator aCurrentGroup = maGroups.end(); // the group which we're currently building sal_Int32 nCurrentGroupStep = -1; // the step which all controls of the current group belong to -#if OSL_DEBUG_LEVEL > 1 -::std::vector< OUString > aCurrentGroupLabels; -#endif for ( ; pControlModels != pControlModelsEnd; ++pControlModels ) { @@ -981,13 +978,6 @@ void ControlModelContainerBase::implUpdateGroupStructure() // new state: looking for further members eState = eExpandingGroup; -#if OSL_DEBUG_LEVEL > 1 -Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY ); -OUString sLabel; -if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName("Label") ) -xModelProps->getPropertyValue("Label") >>= sLabel; -aCurrentGroupLabels.push_back( sLabel ); -#endif } break; @@ -997,9 +987,6 @@ void ControlModelContainerBase::implUpdateGroupStructure() { // no radio button -> the group is done aCurrentGroup = maGroups.end(); eState = eLookingForGroup; -#if OSL_DEBUG_LEVEL > 1 -aCurrentGroupLabels.clear(); -#endif continue; } @@ -1014,22 +1001,12 @@ void ControlModelContainerBase::implUpdateGroupStructure() // state still is eExpandingGroup - we're looking for further elements eState = eExpandingGroup; -#if OSL_DEBUG_LEVEL > 1 -Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY ); -OUString sLabel; -if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName("Label") ) -xModelProps->getPropertyValue("Label") >>= sLabel; -aCurrentGroupLabels.push_back( sLabel ); -#endif continue; } // it's a radio button, but on a different page // -> we open a new group for it -#if OSL_DEBUG_LEVEL > 1 -aCurrentGroupLabels.clear(); -#endif // open a new group size_t nGroups = maGroups.size(); @@ -1042,13 +1019,6 @@ void ControlModelContainerBase::implUpdateGroupStructure() // state is the same: we still are looking for further elements of the current group eState = eExpandingGroup; -#if OSL_DEBUG_LEVEL > 1 -Reference< XPropertySet > xModelProps( *pControlModels, UNO_QUERY ); -OUString sLabel; -if ( xModelProps.is() && xModelProps->getPropertySetInfo().is() && xModelProps->getPropertySetInfo()->hasPropertyByName("Label") ) -xModelProps->getPropertyValue("Label") >>= sLa
[Libreoffice-commits] core.git: basctl/source
basctl/source/basicide/baside2b.cxx |7 --- 1 file changed, 7 deletions(-) New commits: commit eda245925170eab692143deed367ab11a9adb310 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Fri Mar 11 18:49:08 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I removed the OSL_DEBUG_LEVEL > 1 conditional and replaced it to OSL_DEBUG_LEVEL > 0 as suggested in easy hack. Change-Id: If5f086f280d01e7a80be59f3c992dc2d0a7663cf Reviewed-on: https://gerrit.libreoffice.org/23062 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 4b40a42..73354e1 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -497,13 +497,6 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt ) if ( !pEditView ) // Happens in Win95 return; -#if OSL_DEBUG_LEVEL > 1 -Range aRange = rModulWindow.GetHScrollBar()->GetRange(); (void)aRange; -long nVisSz = rModulWindow.GetHScrollBar()->GetVisibleSize(); (void)nVisSz; -long nPapSz = rModulWindow.GetHScrollBar()->GetPageSize(); (void)nPapSz; -long nLinSz = rModulWindow.GetHScrollBar()->GetLineSize(); (void)nLinSz; -long nThumb = rModulWindow.GetHScrollBar()->GetThumbPos(); (void)nThumb; -#endif bool const bWasModified = pEditEngine->IsModified(); // see if there is an accelerator to be processed first SfxViewShell *pVS( SfxViewShell::Current()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source
forms/source/xforms/model.cxx | 16 forms/source/xforms/model.hxx |2 +- 2 files changed, 9 insertions(+), 9 deletions(-) New commits: commit b430ec96e3b131734239305715e2593dc4b57af2 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Wed Mar 9 18:41:20 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I removed OSL_DEBUG_LEVEL > 1 conditionals and in some places i replaced OSL_ENSURE(..) with assert() Change-Id: Ide7e4b633e85a699f680f47caac5bff36bf180a2 Reviewed-on: https://gerrit.libreoffice.org/23076 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index c567303..9d6b89a 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -73,7 +73,7 @@ using namespace com::sun::star::xml::dom; using namespace xforms; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 #define DBG_INVARIANT_TYPE(TYPE) class DBG_##TYPE { const TYPE* mpT; void check() { mpT->dbg_assertInvariant(); } public: DBG_##TYPE(const TYPE* pT) : mpT(pT) { check(); } ~DBG_##TYPE() { check(); } } _DBG_##TYPE(this); #define DBG_INVARIANT() DBG_INVARIANT_TYPE(Model) @@ -197,17 +197,17 @@ void Model::setExternalData( bool _bData ) mbExternalData = _bData; } -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 void Model::dbg_assertInvariant() const { -OSL_ENSURE( mpInstances != NULL, "no instances found" ); -OSL_ENSURE( mxInstances.is(), "No instance container!" ); +assert(mpInstances && "no instances found"); +assert(mxInstances.is() && "No instance container!"); -OSL_ENSURE( mpBindings != NULL, "no bindings element" ); -OSL_ENSURE( mxBindings.is(), "No Bindings container" ); +assert(mpBindings && "no bindings element"); +assert(mxBindings.is() && "No Bindings container"); -OSL_ENSURE( mpSubmissions != NULL, "no submissions element" ); -OSL_ENSURE( mxSubmissions.is(), "No Submission container" ); +assert(mpSubmissions && "no submissions element"); +assert(mxSubmissions.is() && "No Submission container"); } #endif diff --git a/forms/source/xforms/model.hxx b/forms/source/xforms/model.hxx index 222bb67..70e067c 100644 --- a/forms/source/xforms/model.hxx +++ b/forms/source/xforms/model.hxx @@ -145,7 +145,7 @@ public: void setExternalData( bool _bData ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 void dbg_assertInvariant() const; #endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sot/source
sot/source/sdstor/ucbstorage.cxx | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) New commits: commit 004c233d30a432ba4e8e4c0d0052d34798850bd4 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Wed Mar 9 16:07:44 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I removed OSL_DEBUG_LEVEL > 1 conditionals and replaced them with OSL_DEBUG_LEVEL > 0 as suggested in easy hack Change-Id: I6495bf203365356e0969a057f5238c2343931d2b Reviewed-on: https://gerrit.libreoffice.org/23061 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 3b69a4b..d3b53a7 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -74,8 +74,7 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::sdbc; using namespace ::ucbhelper; -#if OSL_DEBUG_LEVEL > 1 -#include +#if OSL_DEBUG_LEVEL > 0 static int nOpenFiles=0; static int nOpenStreams=0; #endif @@ -120,7 +119,7 @@ FileStreamWrapper_Impl::~FileStreamWrapper_Impl() if ( m_pSvStream ) { delete m_pSvStream; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 --nOpenFiles; #endif } @@ -225,7 +224,7 @@ void SAL_CALL FileStreamWrapper_Impl::closeInput() throw( NotConnectedException, ::osl::MutexGuard aGuard( m_aMutex ); checkConnected(); DELETEZ( m_pSvStream ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 --nOpenFiles; #endif ::utl::UCBContentHelper::Kill( m_aURL ); @@ -288,7 +287,7 @@ void FileStreamWrapper_Impl::checkConnected() if ( !m_pSvStream ) { m_pSvStream = ::utl::UcbStreamHelper::CreateStream( m_aURL, STREAM_STD_READ ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 ++nOpenFiles; #endif } @@ -729,7 +728,7 @@ bool UCBStorageStream_Impl::Init() m_aTempURL = ::utl::TempFile().GetURL(); m_pStream = ::utl::UcbStreamHelper::CreateStream( m_aTempURL, STREAM_STD_READWRITE, true /* bFileExists */ ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 ++nOpenFiles; #endif @@ -1206,7 +1205,7 @@ bool UCBStorageStream_Impl::Clear() void UCBStorageStream_Impl::Free() { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 if ( m_pStream ) { if ( !m_aTempURL.isEmpty() ) @@ -2253,9 +2252,9 @@ sal_Int16 UCBStorage_Impl::Commit() } else { -#if OSL_DEBUG_LEVEL > 1 -fprintf ( stderr, "Files: %i\n", nOpenFiles ); -fprintf ( stderr, "Streams: %i\n", nOpenStreams ); +#if OSL_DEBUG_LEVEL > 0 +SAL_INFO("sot", "Files: " << nOpenFiles); +SAL_INFO("sot", "Streams: " << nOpenStreams); #endif // force writing Any aAny; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: cpputools/source include/sal
cpputools/source/unoexe/unoexe.cxx | 24 +++- include/sal/log-areas.dox |5 + 2 files changed, 8 insertions(+), 21 deletions(-) New commits: commit 2e0c1e03e85ef6a20ca362f263c60b141741f698 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Fri Mar 11 18:25:32 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0 and made sure that it doesn't break the build Change-Id: I9febeed949a24d7bc5afb13dedde03fd812b5b20 Reviewed-on: https://gerrit.libreoffice.org/23077 Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> Tested-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx index 806e7a1..a8ddbdf 100644 --- a/cpputools/source/unoexe/unoexe.cxx +++ b/cpputools/source/unoexe/unoexe.cxx @@ -109,13 +109,7 @@ static bool readOption( OUString * pValue, const sal_Char * pOpt, } else { -#if OSL_DEBUG_LEVEL > 1 -out( "\n> identified option -" ); -out( pOpt ); -out( " = " ); -OString tmp = OUStringToOString(aArg, RTL_TEXTENCODING_ASCII_US); - out( tmp.getStr() ); -#endif +SAL_INFO("cpputools.unoexe", "> identified option -" << pOpt << " = " << aArg); ++(*pnIndex); return true; } @@ -123,13 +117,7 @@ static bool readOption( OUString * pValue, const sal_Char * pOpt, else if (aArg.indexOf(aOpt) == 1) { *pValue = aArg.copy(1 + aOpt.getLength()); -#if OSL_DEBUG_LEVEL > 1 -out( "\n> identified option -" ); -out( pOpt ); -out( " = " ); -OString tmp = OUStringToOString(aArg.copy(aOpt.getLength()), RTL_TEXTENCODING_ASCII_US); -out( tmp.getStr() ); -#endif +SAL_INFO("cpputools.unoexe", "> identified option -" << pOpt << " = " << aArg); ++(*pnIndex); return true; @@ -146,10 +134,7 @@ static bool readOption( bool * pbOpt, const sal_Char * pOpt, { ++(*pnIndex); *pbOpt = true; -#if OSL_DEBUG_LEVEL > 1 -out( "\n> identified option --" ); -out( pOpt ); -#endif +SAL_INFO("cpputools.unoexe", "> identified option --" << pOpt); return true; } return false; @@ -557,9 +542,6 @@ SAL_IMPLEMENT_MAIN() if (xComp.is()) xComp->dispose(); -#if OSL_DEBUG_LEVEL > 1 -out( "\n" ); -#endif return nRet; } diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index 207f843..e76e948 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -100,6 +100,11 @@ certain functionality. @li @c cppuhelper @li @c cppuhelper.shlib +@section cpputools + +@li @c cpputools +@li @c cpputools.unoexe + @section cui @li @c cui.customize ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: testtools/source
testtools/source/performance/pseudo.cxx |2 +- testtools/source/performance/ubtest.cxx |3 --- 2 files changed, 1 insertion(+), 4 deletions(-) New commits: commit 96e44b3b510bc97ddda6caf937d031ae6a656d58 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Wed Mar 9 17:13:25 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I replaced the OSL_DEBUG_LEVEL > 1 to OSL_DEBUG_LEVEL > 0 conditionals. At some places i removed the logs containing OSL_DEBUG_LEVEL > 1 as OSL_DEBUG_LEVEL > 0 is compiled in production code Change-Id: I4466e7a2025b055f89fc525d7412f10bd4d8a07f Reviewed-on: https://gerrit.libreoffice.org/23067 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/testtools/source/performance/pseudo.cxx b/testtools/source/performance/pseudo.cxx index a23ea01..bff6e99 100644 --- a/testtools/source/performance/pseudo.cxx +++ b/testtools/source/performance/pseudo.cxx @@ -84,7 +84,7 @@ static void SAL_CALL pseudo_unoInterfaceProxy_free( uno_ExtEnvironment * pEnv, v typelib_typedescription_release( (typelib_TypeDescription *)pThis->pTypeDescr ); (*pThis->pPseudoMapping->release)( pThis->pPseudoMapping ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 *(int *)pProxy = 0xdeadbabe; #endif delete pThis; diff --git a/testtools/source/performance/ubtest.cxx b/testtools/source/performance/ubtest.cxx index f135113..abc532f 100644 --- a/testtools/source/performance/ubtest.cxx +++ b/testtools/source/performance/ubtest.cxx @@ -1161,9 +1161,6 @@ sal_Int32 TestImpl::run( const Sequence< OUString > & rArgs ) // dump out tables out( "\nTimes( ratio to direct in process )", stream ); -#if OSL_DEBUG_LEVEL > 1 -out ("; compiled with OSL_DEBUG_LEVEL > 1", stream ); -#endif out( ":", stream ); sal_Int32 nPos = 60; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: shell/source
shell/source/win32/simplemail/senddoc.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit a32bfdfd280b51d1bd5283243e286f056d3986dd Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Wed Mar 9 19:17:44 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I replaced OSL_DEBUG_LEVEL > 2 conditionals with OSL_DEBUG_LEVEL > 0 conditionals Change-Id: Ibfb3a4e00da7ef6a213dcd4659c7963935cfad1f Reviewed-on: https://gerrit.libreoffice.org/23081 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx index ace7303..a17df21 100644 --- a/shell/source/win32/simplemail/senddoc.cxx +++ b/shell/source/win32/simplemail/senddoc.cxx @@ -33,7 +33,7 @@ #include #include -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 0 void dumpParameter(); #endif @@ -248,7 +248,7 @@ int main(int argc, char* argv[]) initParameter(argc, argv); -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 0 dumpParameter(); #endif @@ -300,7 +300,7 @@ int main(int argc, char* argv[]) return ulRet; } -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 0 void dumpParameter() { std::ostringstream oss; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: xmlscript/source
xmlscript/source/xml_helper/xml_impctx.cxx | 18 +++--- xmlscript/source/xmldlg_imexp/xmldlg_import.cxx |8 +--- xmlscript/source/xmllib_imexp/xmllib_import.cxx |7 +-- xmlscript/source/xmlmod_imexp/xmlmod_import.cxx |7 +-- 4 files changed, 6 insertions(+), 34 deletions(-) New commits: commit 0a8c9fde3ba59a278c9ee4d18f099cfeec71fbef Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Wed Mar 9 11:32:40 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I removed OSL_DEBUG_LEVEL > 1 conditionals and left SAL_INFO()s statements alone. I also removed OUStringToOString(..) calls that were used by SAL_INFO(..) Change-Id: I01cce00265531d7f0ad0a6f564fef6262d3d1205 Reviewed-on: https://gerrit.libreoffice.org/23036 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/xmlscript/source/xml_helper/xml_impctx.cxx b/xmlscript/source/xml_helper/xml_impctx.cxx index 02ae45c..493c333 100644 --- a/xmlscript/source/xml_helper/xml_impctx.cxx +++ b/xmlscript/source/xml_helper/xml_impctx.cxx @@ -497,11 +497,7 @@ void DocumentHandlerImpl::startElement( if (m_nSkipElements > 0) { ++m_nSkipElements; // wait for another end tag -#if OSL_DEBUG_LEVEL > 1 -OString aQName( -OUStringToOString( rQElementName, RTL_TEXTENCODING_ASCII_US ) ); -SAL_INFO("xmlscript.xmlhelper", "### no context given on createChildElement() => ignoring element \"" << aQName.getStr() << "\" ..."); -#endif +SAL_INFO("xmlscript.xmlhelper", " no context given on createChildElement() => ignoring element \"" << rQElementName << "\" ..."); return; } @@ -608,11 +604,7 @@ void DocumentHandlerImpl::startElement( else { ++m_nSkipElements; -#if OSL_DEBUG_LEVEL > 1 -OString aQName( -OUStringToOString( rQElementName, RTL_TEXTENCODING_ASCII_US ) ); -SAL_INFO("xmlscript.xmlhelper", "### no context given on createChildElement() => ignoring element \"" << aQName.getStr() << "\" ..."); -#endif +SAL_INFO("xmlscript.xmlhelper", " no context given on createChildElement() => ignoring element \"" << rQElementName << "\" ..."); } } } @@ -627,11 +619,7 @@ void DocumentHandlerImpl::endElement( if (m_nSkipElements) { --m_nSkipElements; -#if OSL_DEBUG_LEVEL > 1 -OString aQName( -OUStringToOString( rQElementName, RTL_TEXTENCODING_ASCII_US ) ); -SAL_INFO("xmlscript.xmlhelper", "### received endElement() for \"" << aQName.getStr() << "\"."); -#endif +SAL_INFO("xmlscript.xmlhelper", "### received endElement() for \"" << rQElementName << "\"."); static_cast(rQElementName); return; } diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx index 89069cb..c82d306 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx @@ -1702,11 +1702,7 @@ ElementBase::~ElementBase() _pParent->release(); } -#if OSL_DEBUG_LEVEL > 1 -OString aStr( OUStringToOString( - _aLocalName, RTL_TEXTENCODING_ASCII_US ) ); -SAL_INFO("xmlscript.xmldlg", "ElementBase::~ElementBase(): " << aStr.getStr() ); -#endif +SAL_INFO("xmlscript.xmldlg", "ElementBase::~ElementBase(): " << _aLocalName ); } // XRoot @@ -1761,9 +1757,7 @@ Reference< xml::input::XElement > DialogImport::startRootElement( DialogImport::~DialogImport() { -#if OSL_DEBUG_LEVEL > 1 SAL_INFO("xmlscript.xmldlg", "DialogImport::~DialogImport()." ); -#endif } Reference< util::XNumberFormatsSupplier > const & DialogImport::getNumberFormatsSupplier() diff --git a/xmlscript/source/xmllib_imexp/xmllib_import.cxx b/xmlscript/source/xmllib_imexp/xmllib_import.cxx index 0b0e6b1..8919192 100644 --- a/xmlscript/source/xmllib_imexp/xmllib_import.cxx +++ b/xmlscript/source/xmllib_imexp/xmllib_import.cxx @@ -110,10 +110,7 @@ LibElementBase::~LibElementBase() _pParent->release(); } -#if OSL_DEBUG_LEVEL > 1 -OString aStr( OUStringToOString( _aLocalName, RTL_TEXTENCODING_ASCII_US ) ); -SAL_INFO("xmlscript.xmllib", "LibElementBase::~LibElementBase(): " << aStr.getStr() ); -#endif +SAL_INFO("xmlscript.xmllib", "LibElementBase::~LibElementBase(): " << _aLocalName ); } // XRoot @@
[Libreoffice-commits] core.git: cppu/source include/sal
cppu/source/threadpool/thread.cxx |8 -- cppu/source/typelib/typelib.cxx | 73 +++--- cppu/source/uno/data.cxx | 147 -- cppu/source/uno/lbenv.cxx |7 - cppu/source/uno/prim.hxx |6 - include/sal/log-areas.dox |1 6 files changed, 96 insertions(+), 146 deletions(-) New commits: commit 05bca569232d0ece0c6700513b7b1351238c85ec Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Tue Mar 8 22:22:16 2016 +0530 tdf#91794: Remove OSL_DEBUG_LEVEL > 1 conditionals Updates pointed by sberg Change-Id: Ie12548dfa9ad3a6836efbfe64153bc075f138fc6 Reviewed-on: https://gerrit.libreoffice.org/22622 Reviewed-by: Stephan Bergmann <sberg...@redhat.com> Tested-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/cppu/source/threadpool/thread.cxx b/cppu/source/threadpool/thread.cxx index 3b95c8d..06fd30d 100644 --- a/cppu/source/threadpool/thread.cxx +++ b/cppu/source/threadpool/thread.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include "thread.hxx" #include "jobqueue.hxx" @@ -38,12 +39,7 @@ namespace cppu_threadpool { ThreadAdmin::~ThreadAdmin() { -#if OSL_DEBUG_LEVEL > 1 -if( m_lst.size() ) -{ -fprintf( stderr, "%lu Threads left\n" , static_cast(m_lst.size()) ); -} -#endif +SAL_WARN_IF(m_lst.size(), "cppu.threadpool", m_lst.size() << "Threads left"); } bool ThreadAdmin::add( rtl::Reference< ORequestThread > const & p ) diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx index f873b75..12fe995 100644 --- a/cppu/source/typelib/typelib.cxx +++ b/cppu/source/typelib/typelib.cxx @@ -18,10 +18,6 @@ */ -#if OSL_DEBUG_LEVEL > 1 -#include -#endif - #include #include #include @@ -188,7 +184,7 @@ struct TypeDescriptor_Init_Impl inline void callChain( typelib_TypeDescription ** ppRet, rtl_uString * pName ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 // only for debugging sal_Int32 nTypeDescriptionCount; sal_Int32 nCompoundTypeDescriptionCount; @@ -202,7 +198,7 @@ struct TypeDescriptor_Init_Impl TypeDescriptor_Init_Impl(): pWeakMap(nullptr), pCallbacks(nullptr), pCache(nullptr), pMutex(nullptr) -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 , nTypeDescriptionCount(0), nCompoundTypeDescriptionCount(0), nIndirectTypeDescriptionCount(0), nEnumTypeDescriptionCount(0), @@ -290,41 +286,38 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() typelib_typedescriptionreference_release( pTDR ); } -#if OSL_DEBUG_LEVEL > 1 aIt = pWeakMap->begin(); +#if defined SAL_LOG_INFO while( aIt != pWeakMap->end() ) { typelib_TypeDescriptionReference * pTDR = (*aIt).second; if (pTDR) { OString aTypeName( rtl::OUStringToOString( pTDR->pTypeName, RTL_TEXTENCODING_ASCII_US ) ); -OSL_TRACE( -"### remaining type: %s; ref count = %d", aTypeName.getStr(), pTDR->nRefCount ); +SAL_INFO("cppu.typelib", "remaining type: " << aTypeName << "; ref count = " << pTDR->nRefCount); } else { -OSL_TRACE( "### remaining null type entry!?" ); +SAL_INFO("cppu.typelib", "remaining null type entry!?"); } ++aIt; } #endif - delete pWeakMap; pWeakMap = nullptr; } -#if OSL_DEBUG_LEVEL > 1 -OSL_ENSURE( !nTypeDescriptionCount, "### nTypeDescriptionCount is not zero" ); -OSL_ENSURE( !nCompoundTypeDescriptionCount, "### nCompoundTypeDescriptionCount is not zero" ); -OSL_ENSURE( !nIndirectTypeDescriptionCount, "### nIndirectTypeDescriptionCount is not zero" ); -OSL_ENSURE( !nEnumTypeDescriptionCount, "### nEnumTypeDescriptionCount is not zero" ); -OSL_ENSURE( !nInterfaceMethodTypeDescriptionCount, "### nInterfaceMethodTypeDescriptionCount is not zero" ); -OSL_ENSURE( !nInterfaceAttributeTypeDescriptionCount, "### nInterfaceAttributeTypeDescriptionCount is not zero" ); -OSL_ENSURE( !nInterfaceTypeDescriptionCount, "### nInterfaceTypeDescriptionCount is not zero" ); -OSL_ENSURE( !nTypeDescriptionReferenceCount, "### nTypeDescriptionReferenceCount is not zero" ); - -OSL_ENSURE( !pCallbacks || pCallbacks->empty(), "### pCallbacks is not NULL or empty" ); +#if OSL_DEBUG_LEVEL > 0 +SAL_WARN_IF( (!nTypeDescriptionCount), "cppu.typelib", "nTypeD
[Libreoffice-commits] core.git: unotools/source
unotools/source/config/fontcfg.cxx | 37 - unotools/source/config/fontoptions.cxx |6 ++-- unotools/source/config/localisationoptions.cxx |8 ++--- unotools/source/config/securityoptions.cxx |8 ++--- 4 files changed, 18 insertions(+), 41 deletions(-) New commits: commit 6326d76101857e94f241dc671c3e3a2a7bf9b031 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 7 19:42:54 2016 +0530 tdf#91794 Remove OSL_DEBUG_LEVEL > 1 conditionals Updates pointed by Sweet5hark Change-Id: I747e92ca9ee39a027b1e9b27b131f249a33b77db Reviewed-on: https://gerrit.libreoffice.org/22980 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx index e310b6a..62913d1 100644 --- a/unotools/source/config/fontcfg.cxx +++ b/unotools/source/config/fontcfg.cxx @@ -32,10 +32,6 @@ #include #include -#if OSL_DEBUG_LEVEL > 1 -#include -#endif - #include #include #include @@ -143,12 +139,8 @@ DefaultFontConfiguration::DefaultFontConfiguration() catch (const WrappedTargetException&) { } -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "config provider: %s, config access: %s\n", - m_xConfigProvider.is() ? "true" : "false", - m_xConfigAccess.is() ? "true" : "false" - ); -#endif +SAL_INFO("unotools.config", "config provider: " << static_cast(m_xConfigProvider.is()) +<< ", config access: " << static_cast(m_xConfigAccess.is())); } DefaultFontConfiguration::~DefaultFontConfiguration() @@ -400,12 +392,8 @@ FontSubstConfiguration::FontSubstConfiguration() : m_xConfigProvider.clear(); m_xConfigAccess.clear(); } -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "config provider: %s, config access: %s\n", - m_xConfigProvider.is() ? "true" : "false", - m_xConfigAccess.is() ? "true" : "false" - ); -#endif +SAL_WARN("unotools.config", "config provider: " << static_cast(m_xConfigProvider.is()) +<< ", config access: " << static_cast(m_xConfigAccess.is())); } /* @@ -937,11 +925,7 @@ FontWeight FontSubstConfiguration::getSubstWeight( const css::uno::Reference< XN if( pLine->equalsIgnoreAsciiCaseAscii( pWeightNames[weight].pName ) ) break; } -#if OSL_DEBUG_LEVEL > 1 -if( weight < 0 ) -fprintf( stderr, "Error: invalid weight %s\n", - OUStringToOString( *pLine, RTL_TEXTENCODING_ASCII_US ).getStr() ); -#endif +SAL_WARN_IF(weight < 0, "unotools.config", "Error: invalid weight " << *pLine); } } catch (const NoSuchElementException&) @@ -969,11 +953,7 @@ FontWidth FontSubstConfiguration::getSubstWidth( const css::uno::Reference< XNam if( pLine->equalsIgnoreAsciiCaseAscii( pWidthNames[width].pName ) ) break; } -#if OSL_DEBUG_LEVEL > 1 -if( width < 0 ) -fprintf( stderr, "Error: invalid width %s\n", - OUStringToOString( *pLine, RTL_TEXTENCODING_ASCII_US ).getStr() ); -#endif +SAL_WARN_IF( width < 0, "unotools.config", "Error: invalid width " << *pLine); } } catch (const NoSuchElementException&) @@ -1072,10 +1052,7 @@ void FontSubstConfiguration::readLocaleSubst( const OUString& rBcp47 ) const } if( ! xFont.is() ) { -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "did not get font attributes for %s\n", - OUStringToOString( pFontNames[i], RTL_TEXTENCODING_UTF8 ).getStr() ); -#endif +SAL_WARN("unotools.config", "did not get font attributes for " << pFontNames[i]); continue; } diff --git a/unotools/source/config/fontoptions.cxx b/unotools/source/config/fontoptions.cxx index ad6fa0b..9214987 100644 --- a/unotools/source/config/fontoptions.cxx +++ b/unotools/source/config/fontoptions.cxx @@ -182,9 +182,9 @@ void SvtFontOptions_Impl::Notify( const Sequence< OUString >& seqPropertyNames ) DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtFontOptions_Impl::Notify()\nWho has changed the value type of \&
[Libreoffice-commits] core.git: sdext/source
sdext/source/pdfimport/filterdet.cxx |2 +- sdext/source/pdfimport/pdfparse/pdfentries.cxx|6 +++--- sdext/source/pdfimport/pdfparse/pdfparse.cxx | 16 sdext/source/pdfimport/sax/emitcontext.cxx| 12 ++-- sdext/source/pdfimport/tree/genericelements.cxx |4 ++-- sdext/source/pdfimport/tree/genericelements.hxx |4 ++-- sdext/source/pdfimport/tree/pdfiprocessor.cxx |4 ++-- sdext/source/presenter/PresenterAccessibility.cxx |2 +- 8 files changed, 25 insertions(+), 25 deletions(-) New commits: commit ea3151acb4915e56c702e4edfa92a9b571c3d104 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Tue Mar 8 00:05:29 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I replaced OSL_DEBUG_LEVEL > 1 to OSL_DEBUG_LEVEL > 0 in most of the files as suggested in easy hack Change-Id: I2c46dfd9de2ae965680494146120ea3c7530cc98 Reviewed-on: https://gerrit.libreoffice.org/23012 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index a1016de..5e5485f 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -468,7 +468,7 @@ bool checkDocChecksum( const OUString& rInPDFFileURL, // compare the contents bRet = (0 == memcmp( nActualChecksum, nTestChecksum, sizeof( nActualChecksum ) )); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 OSL_TRACE( "test checksum: " ); for( unsigned int i = 0; i < sizeof(nTestChecksum); i++ ) OSL_TRACE( "%.2X", int(nTestChecksum[i]) ); diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx index b39fb25..ab5f2e8 100644 --- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx @@ -1302,7 +1302,7 @@ PDFFileImplData* PDFFile::impl_getData() const PDFString* pStr = dynamic_cast<PDFString*>(pArr->m_aSubElements[0]); if( pStr ) m_pData->m_aDocID = pStr->getFilteredString(); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 OUString aTmp; for( int i = 0; i < m_pData->m_aDocID.getLength(); i++ ) aTmp += OUString::number((unsigned int)sal_uInt8(m_pData->m_aDocID[i]), 16); @@ -1364,7 +1364,7 @@ PDFFileImplData* PDFFile::impl_getData() const OString aEnt = pString->getFilteredString(); if( aEnt.getLength() == 32 ) memcpy( m_pData->m_aOEntry, aEnt.getStr(), 32 ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 else { OUString aTmp; @@ -1384,7 +1384,7 @@ PDFFileImplData* PDFFile::impl_getData() const OString aEnt = pString->getFilteredString(); if( aEnt.getLength() == 32 ) memcpy( m_pData->m_aUEntry, aEnt.getStr(), 32 ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 else { OUString aTmp; diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx b/sdext/source/pdfimport/pdfparse/pdfparse.cxx index f4304b4..2d73ffd 100644 --- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx @@ -547,20 +547,20 @@ PDFEntry* PDFReader::read( const char* pBuffer, unsigned int nLen ) try { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 boost::spirit::parse_info aInfo = #endif boost::spirit::parse( pBuffer, pBuffer+nLen, aGrammar, boost::spirit::space_p ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 SAL_INFO("sdext.pdfimport.pdfparse", "parseinfo: stop = " << aInfo.stop << " (buff=" << pBuffer << ", offset = " << aInfo.stop - pBuffer << "), hit = " << (aInfo.hit ? OUString("true") : OUString("false")) << ", full = " << (aInfo.full ? OUString("true") : OUString("false")) << ", length = " << (int)aInfo.length ); #endif } catch( const parser_error& rError ) { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 OString aTmp; unsigned int nElem = aGrammar.m_aObjectStack.size();
[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity
connectivity/source/parse/sqlbison.y|2 +- dbaccess/source/core/api/RowSetCache.cxx|4 ++-- dbaccess/source/core/dataaccess/databasecontext.cxx | 15 --- dbaccess/source/filter/xml/xmlfilter.cxx|2 +- dbaccess/source/ui/browser/unodatbr.cxx |2 +- dbaccess/source/ui/querydesign/querycontroller.cxx |8 include/connectivity/sqlparse.hxx |2 +- 7 files changed, 14 insertions(+), 21 deletions(-) New commits: commit 576ab772555ed9f06995d9b5d605c90191500a76 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 7 21:50:41 2016 +0530 tdf#91794 Remove OSL_DEBUG_LEVEL > 1 conditionals I either replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0 statements or i used SAL_INFO(..)s Change-Id: Iefb6b83e86e1767e55600b6e1989ee91207fb220 Reviewed-on: https://gerrit.libreoffice.org/23000 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: jan iversen <j...@documentfoundation.org> diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y index b5289df..9428804 100644 --- a/connectivity/source/parse/sqlbison.y +++ b/connectivity/source/parse/sqlbison.y @@ -4651,7 +4651,7 @@ OString OSQLParser::TokenIDToStr(sal_uInt32 nTokenID, const IParseContext* pCont return aStr; } -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 OUString OSQLParser::RuleIDToStr(sal_uInt32 nRuleID) { OSL_ENSURE(nRuleID < SAL_N_ELEMENTS(yytname), "OSQLParser::RuleIDToStr: Invalid nRuleId!"); diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 69d388c..1d4970a 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -1133,10 +1133,10 @@ bool ORowSetCache::last( ) OSL_ENSURE(m_bBeforeFirst,"ORowSetCache::last return false and BeforeFirst isn't true"); m_aMatrixIter = m_pMatrix->end(); } -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 if(bRet) { -OSL_ENSURE((*m_aMatrixIter).is(),"ORowSetCache::last: Row not valid!"); +assert((*m_aMatrixIter).is() && "ORowSetCache::last: Row not valid!"); } #endif diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index b12ace6..f4e92b5 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -685,9 +685,7 @@ Reference< XInterface > ODatabaseContext::getObject( const OUString& _rURL ) void ODatabaseContext::registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl ) { OUString sURL( _rModelImpl.getURL() ); -#if OSL_DEBUG_LEVEL > 1 -OSL_TRACE( "DatabaseContext: registering %s", OUStringToOString( sURL, RTL_TEXTENCODING_UTF8 ).getStr() ); -#endif +SAL_INFO("dbaccess.core", "DatabaseContext: registering " << sURL); if ( m_aDatabaseObjects.find( sURL ) == m_aDatabaseObjects.end() ) { m_aDatabaseObjects[ sURL ] = &_rModelImpl; @@ -700,19 +698,14 @@ void ODatabaseContext::registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl void ODatabaseContext::revokeDatabaseDocument( const ODatabaseModelImpl& _rModelImpl ) { OUString sURL( _rModelImpl.getURL() ); -#if OSL_DEBUG_LEVEL > 1 -OSL_TRACE( "DatabaseContext: deregistering %s", OUStringToOString( sURL, RTL_TEXTENCODING_UTF8 ).getStr() ); -#endif +SAL_INFO("dbaccess.core", "DatabaseContext: deregistering " << sURL); m_aDatabaseObjects.erase( sURL ); } void ODatabaseContext::databaseDocumentURLChange( const OUString& _rOldURL, const OUString& _rNewURL ) { -#if OSL_DEBUG_LEVEL > 1 -OSL_TRACE( "DatabaseContext: changing registration from %s to %s", -OUStringToOString( _rOldURL, RTL_TEXTENCODING_UTF8 ).getStr(), -OUStringToOString( _rNewURL, RTL_TEXTENCODING_UTF8 ).getStr() ); -#endif +SAL_INFO("dbaccess.core", "DatabaseContext: changing registrations from " << _rOldURL << + " to " << _rNewURL); ObjectCache::iterator oldPos = m_aDatabaseObjects.find( _rOldURL ); ENSURE_OR_THROW( oldPos != m_aDatabaseObjects.end(), "illegal old database document URL" ); ObjectCache::iterator newPos = m_aDatabaseObjects.find( _rNewURL ); diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index bd1d661..44a3848 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -114,7 +114,7 @@ sal_Int32 ReadThroughComponent( } catch (const SAXParseException& r) { -#if OSL_DEBUG_LEVEL > 1 +#if
[Libreoffice-commits] core.git: include/sal unodevtools/source
include/sal/log-areas.dox |4 unodevtools/source/unodevtools/options.cxx | 29 +++-- 2 files changed, 7 insertions(+), 26 deletions(-) New commits: commit 26b69a9d0f6ae454ccd57019a68ef96be2568ba5 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 7 19:57:40 2016 +0530 tdf#91794 Remove OSL_DEBUG_LEVEL > 1 conditionals I removed the fprintf statements and replaced them with SAL_WARN statements. Change-Id: Id75e310e3a95b249fdf92a4dd5a9bcf1b7fb9be6 Reviewed-on: https://gerrit.libreoffice.org/22984 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: jan iversen <j...@documentfoundation.org> diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index d2de637..3387889 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -386,6 +386,10 @@ certain functionality. @li @c unotools.misc @li @c unotools.ucbhelper +@section unodevtools + +@li @c unodevtools + @section URE @li @c rtl.string - ::rtl::OString, ::rtl::OUString, and related functionality diff --git a/unodevtools/source/unodevtools/options.cxx b/unodevtools/source/unodevtools/options.cxx index 8e0e870..fbbca04 100644 --- a/unodevtools/source/unodevtools/options.cxx +++ b/unodevtools/source/unodevtools/options.cxx @@ -27,14 +27,6 @@ namespace unodevtools { -#if OSL_DEBUG_LEVEL > 1 -static void out( const sal_Char * pText ) -{ -fprintf( stderr, pText ); -} -#endif - - bool readOption( OUString * pValue, const sal_Char * pOpt, sal_uInt32 * pnIndex, const OUString & aArg) { @@ -58,25 +50,13 @@ bool readOption( OUString * pValue, const sal_Char * pOpt, throw CannotDumpException( "incomplete option \"-" + aOpt + "\" given!"); } else { -#if OSL_DEBUG_LEVEL > 1 -out( "\n> identified option -" ); -out( pOpt ); -out( " = " ); -OString tmp = OUStringToOString(*pValue, RTL_TEXTENCODING_ASCII_US); - out( tmp.getStr() ); -#endif +SAL_INFO("unodevtools", "> identified option -" << pOpt << " = " << *pValue); ++(*pnIndex); return true; } } else if (aArg.indexOf(aOpt) == 1) { *pValue = aArg.copy(1 + aOpt.getLength()); -#if OSL_DEBUG_LEVEL > 1 -out( "\n> identified option -" ); -out( pOpt ); -out( " = " ); -OString tmp = OUStringToOString(*pValue, RTL_TEXTENCODING_ASCII_US); -out( tmp.getStr() ); -#endif +SAL_INFO("unodevtools", "> identified option -" << pOpt << " = " << *pValue); ++(*pnIndex); return true; @@ -95,10 +75,7 @@ bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt, { ++(*pnIndex); *pbOpt = sal_True; -#if OSL_DEBUG_LEVEL > 1 -out( "\n> identified option --" ); -out( pOpt ); -#endif +SAL_INFO("unodevtools", "> identified option --" << pOpt); return true; } return false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: i18npool/inc i18npool/source
i18npool/inc/transliterationImpl.hxx |2 +- i18npool/source/transliteration/transliterationImpl.cxx |2 +- i18npool/source/transliteration/transliteration_body.cxx |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 856cf7115d7b52f38371047b4a1aeae747a5d9bc Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 7 23:28:39 2016 +0530 tdf#91794 Remove OSL_DEBUG_LEVEL > 1 conditionals I removed OSL_DEBUG_LEVEL > 1 conditionals in order to reduce debug levels. Change-Id: Ia1890277aec8ba0b57e325564a107d7fe2f6e967 Reviewed-on: https://gerrit.libreoffice.org/23008 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: jan iversen <j...@documentfoundation.org> diff --git a/i18npool/inc/transliterationImpl.hxx b/i18npool/inc/transliterationImpl.hxx index e50b63a..0c0fd5a 100644 --- a/i18npool/inc/transliterationImpl.hxx +++ b/i18npool/inc/transliterationImpl.hxx @@ -28,7 +28,7 @@ namespace com { namespace sun { namespace star { namespace i18n { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 #define RETURN_DEBUG_STRING ("return from transliterationImpl"); #define RETURN_DEBUG_NUMBER 'TRAN' #else diff --git a/i18npool/source/transliteration/transliterationImpl.cxx b/i18npool/source/transliteration/transliterationImpl.cxx index 287d2ce..abe434c 100644 --- a/i18npool/source/transliteration/transliterationImpl.cxx +++ b/i18npool/source/transliteration/transliterationImpl.cxx @@ -35,7 +35,7 @@ #include -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 #include #endif diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx index 875b4a1..2730e9d 100644 --- a/i18npool/source/transliteration/transliteration_body.cxx +++ b/i18npool/source/transliteration/transliteration_body.cxx @@ -301,7 +301,7 @@ static OUString transliterate_titlecase_Impl( pOffset[i] = nIdx; } } -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 const sal_Int32 *pCOffset = offset.getConstArray(); (void) pCOffset; #endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: l10ntools/inc l10ntools/source
l10ntools/inc/helpmerge.hxx|2 +- l10ntools/source/helpmerge.cxx |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 3f80f144cff8d8ddd1d33e7b8ca6dbe2ad8d8491 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Mon Mar 7 23:38:58 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I removed OSL_DEBUG_LEVEL > 1 conditionals, replaced them with OSL_DEBUG_LEVEL > 0 as suggested in updated easy hack Change-Id: I4af8cd2a9bf9980fc98967d499d1fc30642251f4 Reviewed-on: https://gerrit.libreoffice.org/23010 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: jan iversen <j...@documentfoundation.org> diff --git a/l10ntools/inc/helpmerge.hxx b/l10ntools/inc/helpmerge.hxx index 89c8543..dcc3130 100644 --- a/l10ntools/inc/helpmerge.hxx +++ b/l10ntools/inc/helpmerge.hxx @@ -31,7 +31,7 @@ class HelpParser private: OString sHelpFile; -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 0 /// Debugmethod, prints the content of the map to stdout static void Dump(LangHashMap* rElem_in , const OString & sKey_in); diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx index c5fda05..6766036 100644 --- a/l10ntools/source/helpmerge.cxx +++ b/l10ntools/source/helpmerge.cxx @@ -46,7 +46,7 @@ #include "helper.hxx" #include "po.hxx" -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 0 void HelpParser::Dump(XMLHashMap* rElem_in) { for(XMLHashMap::iterator pos = rElem_in->begin();pos != rElem_in->end(); ++pos) @@ -180,7 +180,7 @@ bool HelpParser::MergeSingleFile( XMLFile* file , MergeDataFile* pMergeDataFile { posm = aXMLStrHM->find( *pos ); LangHashMap* aLangHM = posm->second; -#if OSL_DEBUG_LEVEL > 2 +#if OSL_DEBUG_LEVEL > 0 printf("*DUMPING HASHMAP***"); Dump(aXMLStrHM); printf("DBG: sHelpFile = %s\n",sHelpFile.getStr() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/inc sc/source
sc/inc/attarray.hxx |4 +++- sc/source/core/data/attarray.cxx| 12 ++-- sc/source/core/data/column.cxx |6 +++--- sc/source/core/data/dptabres.cxx| 12 +--- sc/source/core/inc/parclass.hxx |6 -- sc/source/core/tool/interpr2.cxx|2 +- sc/source/core/tool/interpr5.cxx|6 +++--- sc/source/core/tool/parclass.cxx| 13 - sc/source/core/tool/token.cxx |4 ++-- sc/source/filter/excel/excimp8.cxx |2 +- sc/source/filter/excel/xltoolbar.cxx| 10 +- sc/source/filter/excel/xltoolbar.hxx| 10 +- sc/source/filter/qpro/biff.cxx |2 +- sc/source/filter/xml/XMLStylesExportHelper.cxx |3 --- sc/source/filter/xml/xmlbodyi.cxx |5 + sc/source/ui/Accessibility/DrawModelBroadcaster.cxx |6 +- 16 files changed, 45 insertions(+), 58 deletions(-) New commits: commit 5f164b6e01496655ee0616e16d251e066d99ea73 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Sat Mar 5 00:23:12 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I made small changes to disable some test code conditionally by adding a few new debug macros. Change-Id: Ieaf6f1b29343fb896cc64163a116c629165e8db3 Reviewed-on: https://gerrit.libreoffice.org/22711 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx index bf6a916..2be8e55 100644 --- a/sc/inc/attarray.hxx +++ b/sc/inc/attarray.hxx @@ -44,6 +44,8 @@ namespace editeng { class SvxBorderLine; } #define SC_ATTRARRAY_DELTA 4 +#define DEBUG_SC_TESTATTRARRAY 0 + struct ScLineFlags { sal_uInt8 nLeft; @@ -104,7 +106,7 @@ public: voidSetTab(SCTAB nNewTab) { nTab = nNewTab; } voidSetCol(SCCOL nNewCol) { nCol = nNewCol; } -#if OSL_DEBUG_LEVEL > 1 +#if DEBUG_SC_TESTATTRARRAY voidTestData() const; #endif voidReset( const ScPatternAttr* pPattern); diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index 8839444..d97b7e2 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -63,7 +63,7 @@ ScAttrArray::ScAttrArray( SCCOL nNewCol, SCTAB nNewTab, ScDocument* pDoc ) : ScAttrArray::~ScAttrArray() { -#if OSL_DEBUG_LEVEL > 1 +#if DEBUG_SC_TESTATTRARRAY TestData(); #endif @@ -74,7 +74,7 @@ ScAttrArray::~ScAttrArray() delete[] pData; } -#if OSL_DEBUG_LEVEL > 1 +#if DEBUG_SC_TESTATTRARRAY void ScAttrArray::TestData() const { @@ -555,7 +555,7 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern } } -#if OSL_DEBUG_LEVEL > 1 +#if DEBUG_SC_TESTATTRARRAY TestData(); #endif } @@ -628,7 +628,7 @@ void ScAttrArray::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet* pDocument->SetStreamValid(nTab, false); } -#if OSL_DEBUG_LEVEL > 1 +#if DEBUG_SC_TESTATTRARRAY TestData(); #endif } @@ -778,7 +778,7 @@ void ScAttrArray::ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow, void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCache* pCache, ScEditDataArray* pDataArray ) { -#if OSL_DEBUG_LEVEL > 1 +#if DEBUG_SC_TESTATTRARRAY TestData(); #endif @@ -850,7 +850,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac pDocument->SetStreamValid(nTab, false); } -#if OSL_DEBUG_LEVEL > 1 +#if DEBUG_SC_TESTATTRARRAY TestData(); #endif } diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 4c94bab..0bfb0fe 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -2792,19 +2792,19 @@ struct CalcAllHandler { void operator() (size_t /*nRow*/, ScFormulaCell* pCell) { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 // after F9 ctrl-F9: check the calculation for each FormulaTree double nOldVal, nNewVal; nOldVal = pCell->GetValue(); #endif pCell->Interpret(); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 if (pCell->GetCode()->IsRecalcModeNormal()) nNewVal = pCell->GetValue(); else nNewVal = nOldVal; // random(), jetzt() etc. -OSL_ENSURE(nOldVal == nNewVal, "CalcAll: nOldVal != nNewVal"); +assert(nOldVal == nNewVal); #endif } }; diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index 2078cf6..a7f96e3 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -2880,10 +2880,
[Libreoffice-commits] core.git: include/sal sal/osl sal/qa sal/rtl sal/test
include/sal/log-areas.dox |4 +++ sal/osl/unx/profile.cxx |4 +-- sal/osl/unx/socket.cxx | 10 sal/osl/w32/socket.cxx | 12 -- sal/qa/osl/process/osl_process.cxx | 24 ++--- sal/qa/rtl/doublelock/rtl_doublelocking.cxx | 15 +++-- sal/rtl/bootstrap.cxx | 32 sal/test/testbootstrap.cxx | 17 +- 8 files changed, 43 insertions(+), 75 deletions(-) New commits: commit f59136a2ed1e3eb01cc5b62c5a7da07c34cbdfae Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Wed Mar 2 01:28:58 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals Change-Id: If329cf8257684e7bd2936641b8f14ec3e9b9f733 Reviewed-on: https://gerrit.libreoffice.org/22647 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index d2de637..d4a020a 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -30,6 +30,10 @@ certain functionality. @li @c sal.rtl - SAL RTL library @li @c sal.rtl.xub - SAL RTL warnings related to possible String->OUString conversion issues. @li @c sal.textenc - the textencoding SAL library +@li @c sal.w32 +@li @c sal.test +@li @c sal.process +@li @c sal.doublelock @section basctl diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index 8cad965..9cbab6b 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -320,7 +320,7 @@ sal_Bool SAL_CALL osl_flushProfile(oslProfile Profile) static bool writeProfileImpl(osl_TFile* pFile) { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 unsigned int nLen=0; #endif @@ -329,7 +329,7 @@ static bool writeProfileImpl(osl_TFile* pFile) return false; } -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 nLen=strlen(pFile->m_pWriteBuf); SAL_WARN_IF(nLen != (pFile->m_nWriteBufLen - pFile->m_nWriteBufFree), "sal.osl", "nLen != (pFile->m_nWriteBufLen - pFile->m_nWriteBufFree)"); #endif diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx index 190e7c3..1065c79 100644 --- a/sal/osl/unx/socket.cxx +++ b/sal/osl/unx/socket.cxx @@ -429,7 +429,7 @@ oslSocketResult SAL_CALL osl_psz_getDottedInetAddrOfSocketAddr ( void SAL_CALL osl_psz_getLastSocketErrorDescription ( oslSocket Socket, sal_Char* pBuffer, sal_uInt32 BufferSize); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 static sal_uInt32 g_nSocketImpl = 0; static sal_uInt32 g_nSocketAddr = 0; @@ -451,7 +451,7 @@ oslSocket __osl_createSocketImpl(int Socket) pSocket->m_bIsAccepting = false; #endif -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 g_nSocketImpl ++; #endif return pSocket; @@ -461,7 +461,7 @@ void __osl_destroySocketImpl(oslSocket Socket) { if ( Socket != nullptr) free(Socket); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 g_nSocketImpl --; #endif } @@ -469,7 +469,7 @@ void __osl_destroySocketImpl(oslSocket Socket) static oslSocketAddr __osl_createSocketAddr() { oslSocketAddr pAddr = static_cast(rtl_allocateZeroMemory( sizeof( struct oslSocketAddrImpl ))); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 g_nSocketAddr ++; #endif return pAddr; @@ -509,7 +509,7 @@ static oslSocketAddr __osl_createSocketAddrFromSystem( struct sockaddr *pSystemS static void __osl_destroySocketAddr( oslSocketAddr addr ) { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 g_nSocketAddr --; #endif rtl_freeMemory( addr ); diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx index 927da21..e3aad35 100644 --- a/sal/osl/w32/socket.cxx +++ b/sal/osl/w32/socket.cxx @@ -406,16 +406,14 @@ static sal_Bool __osl_attemptSocketDialupImpl() /*/ static sal_uInt32 g_nSocketImpl = 0; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 static sal_uInt32 g_nSocketAddr = 0; struct LeakWarning { ~LeakWarning() { -if( g_nSocketImpl ) -OSL_TRACE( "sal_socket: %d socket instances leak" , g_nSocketImpl ); -if( g_nSocketAddr ) -OSL_TRACE( "sal_socket: %d socket address instances leak" , g_nSocketAddr ); +SAL_WARN_IF( g_nSocketImpl, "sal.w32", "sal_socket: " << g_nSocketImpl << " socket instances leak" ); +SAL_WARN_IF( g_nSocketAddr, "sal.w32", "sal_socket: " << g_nSocketAddr << " socket address instances leak" ); } }; LeakWarning socketWarning; @@ -455,7 +453,7 @@ static oslSocketAddr __osl_createSocketAddr( ) { oslSocketAddr pAddr = (oslSocketAddr) rtl
[Libreoffice-commits] core.git: sw/source
sw/source/uibase/utlui/navipi.src |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 10b803cf8f065f73b784304d5434b2ccd2baac46 Author: Rohan Kumar <rohankanojia...@gmail.com> Date: Tue Feb 23 22:09:38 2016 +0530 tdf#43514 Navigation tree: improve button name I renamed the button "Content View" to "Content Navigation View" as proposed by Jay Philips in order to clear the confusion of an already implemented feature. Change-Id: I4784499f306de9d8859258ba741c23ac57ddb349 Reviewed-on: https://gerrit.libreoffice.org/22614 Reviewed-by: Michael Stahl <mst...@redhat.com> Tested-by: Michael Stahl <mst...@redhat.com> diff --git a/sw/source/uibase/utlui/navipi.src b/sw/source/uibase/utlui/navipi.src index 01cfa8b..c1463cd 100644 --- a/sw/source/uibase/utlui/navipi.src +++ b/sw/source/uibase/utlui/navipi.src @@ -140,7 +140,7 @@ Window DLG_NAVIGATION_PI { Identifier = FN_SHOW_ROOT ; HelpID = HID_NAVI_TBX8 ; -Text [ en-US ] = "Content View" ; +Text [ en-US ] = "Content Navigation View" ; }; ToolBoxItem { @@ -343,7 +343,7 @@ String STR_ACCESS_TL_GLOBAL }; String STR_ACCESS_TL_CONTENT { -Text [ en-US ] = "Content View"; +Text [ en-US ] = "Content Navigation View"; }; String STR_OUTLINE_LEVEL { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits