From 8dfe965a32b7d99d5bd70489f5f45652114ca889 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Tue, 13 Jul 2010 18:26:57 +0200 Subject: dr77: #i113097# make Sequence(sal_Int32) explicit --- svx/source/items/customshapeitem.cxx | 2 +- svx/source/sdr/contact/objectcontactofobjlistpainter.cxx | 2 +- svx/source/sdr/contact/objectcontactofpageview.cxx | 2 +- svx/source/sdr/contact/viewcontactofgraphic.cxx | 2 +- svx/source/sdr/overlay/overlaymanager.cxx | 2 +- svx/source/svdraw/svdobj.cxx | 6 +++--- svx/source/svdraw/svdotxtr.cxx | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) (limited to 'svx') diff --git a/svx/source/items/customshapeitem.cxx b/svx/source/items/customshapeitem.cxx index c7a401ed4054..08eebe99b3df 100644 --- a/svx/source/items/customshapeitem.cxx +++ b/svx/source/items/customshapeitem.cxx @@ -60,7 +60,7 @@ size_t SdrCustomShapeGeometryItem::PropertyPairHash::operator()( const SdrCustom return (size_t)r1.first.hashCode() + r1.second.hashCode(); }; -TYPEINIT1_FACTORY( SdrCustomShapeGeometryItem, SfxPoolItem , new SdrCustomShapeGeometryItem(0)); +TYPEINIT1_FACTORY( SdrCustomShapeGeometryItem, SfxPoolItem , new SdrCustomShapeGeometryItem); SdrCustomShapeGeometryItem::SdrCustomShapeGeometryItem() : SfxPoolItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ) {} diff --git a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx index da8518d7f1a1..c552af778e9e 100644 --- a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx +++ b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx @@ -121,7 +121,7 @@ namespace sdr aViewRange, GetXDrawPageForSdrPage(const_cast< SdrPage* >(mpProcessedPage)), 0.0, - 0); + com::sun::star::uno::Sequence()); updateViewInformation2D(aNewViewInformation2D); // collect primitive data in a sequence; this will already use the updated ViewInformation2D diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 1652855d84a8..f33790f82028 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -241,7 +241,7 @@ namespace sdr aViewRange, GetXDrawPageForSdrPage(GetSdrPage()), fCurrentTime, - 0); + uno::Sequence()); updateViewInformation2D(aNewViewInformation2D); // get whole Primitive2DSequence; this will already make use of updated ViewInformation2D diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index 7172b0840476..80ffa916dbeb 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -296,7 +296,7 @@ namespace sdr // decompose immediately with neutral ViewInformation. This will // layout the text to more simple TextPrimitives from drawinglayer - const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0); + const drawinglayer::geometry::ViewInformation2D aViewInformation2D; drawinglayer::primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence( xRetval, diff --git a/svx/source/sdr/overlay/overlaymanager.cxx b/svx/source/sdr/overlay/overlaymanager.cxx index f52205d88e45..93e3b03d072d 100644 --- a/svx/source/sdr/overlay/overlaymanager.cxx +++ b/svx/source/sdr/overlay/overlaymanager.cxx @@ -138,7 +138,7 @@ namespace sdr mnStripeLengthPixel(5), maDrawinglayerOpt(), maViewTransformation(), - maViewInformation2D(0), + maViewInformation2D(), mfDiscreteOne(0.0) { // set Property 'ReducedDisplayQuality' to true to allow simpler interaction diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index b9d3e24592ee..d6d51f24a294 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -940,7 +940,7 @@ void SdrObject::RecalcBoundRect() if(xPrimitives.hasElements()) { // use neutral ViewInformation and get the range of the primitives - const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0); + const drawinglayer::geometry::ViewInformation2D aViewInformation2D; const basegfx::B2DRange aRange(drawinglayer::primitive2d::getB2DRangeFromPrimitive2DSequence(xPrimitives, aViewInformation2D)); if(!aRange.isEmpty()) @@ -1202,7 +1202,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeContour() const if(xSequence.hasElements()) { // use neutral ViewInformation - const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0); + const drawinglayer::geometry::ViewInformation2D aViewInformation2D; // create extractor, process and get result drawinglayer::processor2d::ContourExtractor2D aExtractor(aViewInformation2D); @@ -2431,7 +2431,7 @@ SdrObject* SdrObject::ImpConvertToContourObj(SdrObject* pRet, BOOL bForceLineDas if(xSequence.hasElements()) { // use neutral ViewInformation - const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0); + const drawinglayer::geometry::ViewInformation2D aViewInformation2D; // create extractor, process and get result drawinglayer::processor2d::LineGeometryExtractor2D aExtractor(aViewInformation2D); diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index bd1564ab3f4e..56306721c85a 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -354,7 +354,7 @@ SdrObject* SdrTextObj::ImpConvertContainedTextToSdrPathObjs(bool bToPoly) const if(xSequence.hasElements()) { // create an extractor with neutral ViewInformation - const drawinglayer::geometry::ViewInformation2D aViewInformation2D(0); + const drawinglayer::geometry::ViewInformation2D aViewInformation2D; drawinglayer::processor2d::TextAsPolygonExtractor2D aExtractor(aViewInformation2D); // extract text as polygons -- cgit From 1f991552dd9c60d4d4008d652af4d97f232cb0f3 Mon Sep 17 00:00:00 2001 From: Thomas Benisch Date: Wed, 27 Oct 2010 16:02:26 +0200 Subject: chartextensibility: #i115276# improve layout of hierarchical axis labels in chart --- svx/inc/svx/unoshtxt.hxx | 2 ++ svx/source/svdraw/svdotext.cxx | 4 ++-- svx/source/unodraw/unoshtxt.cxx | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'svx') diff --git a/svx/inc/svx/unoshtxt.hxx b/svx/inc/svx/unoshtxt.hxx index c06d3955b442..07e6ef79f7ca 100644 --- a/svx/inc/svx/unoshtxt.hxx +++ b/svx/inc/svx/unoshtxt.hxx @@ -90,6 +90,8 @@ public: void ChangeModel( SdrModel* pNewModel ); + void UpdateOutliner(); + private: SVX_DLLPRIVATE SvxTextEditSource( SvxTextEditSourceImpl* pImpl ); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 6a79359e1a00..84f08b234ded 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1430,8 +1430,6 @@ void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaint FASTBOOL bContourFrame=IsContourTextFrame(); - ImpSetupDrawOutlinerForPaint( bContourFrame, rOutl, aTextRect, aAnchorRect, rPaintRect, aFitXKorreg ); - if( GetModel() ) { MapMode aMapMode(GetModel()->GetScaleUnit(), Point(0,0), @@ -1439,6 +1437,8 @@ void SdrTextObj::UpdateOutlinerFormatting( SdrOutliner& rOutl, Rectangle& rPaint GetModel()->GetScaleFraction()); rOutl.SetRefMapMode(aMapMode); } + + ImpSetupDrawOutlinerForPaint( bContourFrame, rOutl, aTextRect, aAnchorRect, rPaintRect, aFitXKorreg ); } //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 05551414507c..3a8c3fb069a4 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -122,7 +122,6 @@ private: SvxDrawOutlinerViewForwarder* CreateViewForwarder(); void SetupOutliner(); - void UpdateOutliner(); sal_Bool HasView() const { return mpView ? sal_True : sal_False; } sal_Bool IsEditMode() const @@ -168,6 +167,8 @@ public: virtual void ObjectInDestruction(const SdrObject& rObject); void ChangeModel( SdrModel* pNewModel ); + + void UpdateOutliner(); }; //------------------------------------------------------------------------ @@ -1147,3 +1148,8 @@ void SvxTextEditSource::ChangeModel( SdrModel* pNewModel ) { mpImpl->ChangeModel( pNewModel ); } + +void SvxTextEditSource::UpdateOutliner() +{ + mpImpl->UpdateOutliner(); +} -- cgit From f82c3a7d237a86d4835c3c22e680e3993f1faa18 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Mon, 15 Nov 2010 13:05:11 +0100 Subject: vcl117: #i113061# more clarity (thanks cmc!) --- svx/source/gallery2/gallery1.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'svx') diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 419e160e6765..683e993cb3f0 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -626,7 +626,7 @@ BOOL Gallery::CreateTheme( const String& rThemeName, UINT32 nNumFrom ) if( !HasTheme( rThemeName ) && ( GetUserURL().GetProtocol() != INET_PROT_NOT_VALID ) ) { - nLastFileNumber=nNumFrom > nLastFileNumber ? nNumFrom : ++nLastFileNumber; + nLastFileNumber = nNumFrom > nLastFileNumber ? nNumFrom : nLastFileNumber + 1; GalleryThemeEntry* pNewEntry = new GalleryThemeEntry( GetUserURL(), rThemeName, nLastFileNumber, FALSE, FALSE, TRUE, 0, FALSE ); -- cgit From 5b0573b9fbfe126f982e68fa93989239fd0874d2 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Tue, 23 Nov 2010 18:41:04 +0100 Subject: vcl117: removed obsolete header --- svx/inc/fmgridif.hxx | 2 +- svx/inc/pch/precompiled_svx.hxx | 4 ++-- svx/inc/svx/fmtools.hxx | 2 +- svx/source/unodraw/unoprov.cxx | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'svx') diff --git a/svx/inc/fmgridif.hxx b/svx/inc/fmgridif.hxx index 886db3280d60..df21245bc99b 100644 --- a/svx/inc/fmgridif.hxx +++ b/svx/inc/fmgridif.hxx @@ -49,7 +49,7 @@ #include #include -#include +#include #include #include #include diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx index b53064312a38..e14ac49dc5c0 100644 --- a/svx/inc/pch/precompiled_svx.hxx +++ b/svx/inc/pch/precompiled_svx.hxx @@ -920,7 +920,7 @@ #include "vcl/cursor.hxx" #include "vcl/decoview.hxx" #include "vcl/dndhelp.hxx" -#include "vcl/fldunit.hxx" +#include "tools/fldunit.hxx" #include "vcl/fntstyle.hxx" #include "unotools/fontcvt.hxx" #include "vcl/gdimtf.hxx" @@ -939,7 +939,7 @@ #include "vcl/unohelp.hxx" #include "vcl/unohelp2.hxx" #include "vcl/wall.hxx" -#include "vcl/wintypes.hxx" +#include "tools/wintypes.hxx" #include "vos/mutex.hxx" #include "vos/ref.hxx" #include "vos/refernce.hxx" diff --git a/svx/inc/svx/fmtools.hxx b/svx/inc/svx/fmtools.hxx index b39f46e85d14..f98919fe47d8 100644 --- a/svx/inc/svx/fmtools.hxx +++ b/svx/inc/svx/fmtools.hxx @@ -71,7 +71,7 @@ #include #include -#include +#include #include #include #include diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 4be296d51219..585a35a128b5 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include -- cgit From 2b1b6ec0a537571bd7367446e5592d8954c10bbe Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 24 Nov 2010 18:39:49 +0100 Subject: vcl117: #i115686# remove old unused style setting --- svx/source/fmcomp/gridcell.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'svx') diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index bb8afd502d43..33df3183065b 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -1653,11 +1653,14 @@ DbCheckBox::DbCheckBox( DbGridColumn& _rColumn ) namespace { - void setCheckBoxStyle( Window* _pWindow, USHORT nStyle ) + void setCheckBoxStyle( Window* _pWindow, bool bMono ) { AllSettings aSettings = _pWindow->GetSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings(); - aStyleSettings.SetCheckBoxStyle( nStyle ); + if( bMono ) + aStyleSettings.SetOptions( aStyleSettings.GetOptions() | STYLE_OPTION_MONO ); + else + aStyleSettings.SetOptions( aStyleSettings.GetOptions() & (~STYLE_OPTION_MONO) ); aSettings.SetStyleSettings( aStyleSettings ); _pWindow->SetSettings( aSettings ); } @@ -1683,8 +1686,8 @@ void DbCheckBox::Init( Window& rParent, const Reference< XRowSet >& xCursor ) sal_Int16 nStyle = awt::VisualEffect::LOOK3D; OSL_VERIFY( xModel->getPropertyValue( FM_PROP_VISUALEFFECT ) >>= nStyle ); - setCheckBoxStyle( m_pWindow, nStyle == awt::VisualEffect::FLAT ? STYLE_CHECKBOX_MONO : STYLE_CHECKBOX_WIN ); - setCheckBoxStyle( m_pPainter, nStyle == awt::VisualEffect::FLAT ? STYLE_CHECKBOX_MONO : STYLE_CHECKBOX_WIN ); + setCheckBoxStyle( m_pWindow, nStyle == awt::VisualEffect::FLAT ); + setCheckBoxStyle( m_pPainter, nStyle == awt::VisualEffect::FLAT ); sal_Bool bTristate = sal_True; OSL_VERIFY( xModel->getPropertyValue( FM_PROP_TRISTATE ) >>= bTristate ); -- cgit From 431938ca53fa85bfb2e3352b9779b2a254c40119 Mon Sep 17 00:00:00 2001 From: Christian Lippka ORACLE Date: Tue, 30 Nov 2010 16:49:41 +0100 Subject: impressdefaults1: #i113015# #i113017# new defaults for shape filling, outline and shadows --- svx/inc/svx/xdef.hxx | 3 ++- svx/source/xoutdev/xpool.cxx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'svx') diff --git a/svx/inc/svx/xdef.hxx b/svx/inc/svx/xdef.hxx index 963e4935c617..dd0fbd802291 100644 --- a/svx/inc/svx/xdef.hxx +++ b/svx/inc/svx/xdef.hxx @@ -36,7 +36,8 @@ |* \************************************************************************/ -#define COL_DEFAULT_SHAPE_FILLING RGB_COLORDATA( 153, 204, 255 ) // blue 8 +#define COL_DEFAULT_SHAPE_FILLING RGB_COLORDATA( 0xCF, 0xE7, 0xE5 ) +#define COL_DEFAULT_SHAPE_STROKE RGB_COLORDATA( 128, 128, 128 ) #define XATTR_START 1000 diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx index 47dda35245a4..f9df4c435040 100644 --- a/svx/source/xoutdev/xpool.cxx +++ b/svx/source/xoutdev/xpool.cxx @@ -52,8 +52,8 @@ XOutdevItemPool::XOutdevItemPool( const XubString aNullStr; const Bitmap aNullBmp; const basegfx::B2DPolyPolygon aNullPol; - const Color aNullLineCol(RGB_Color(COL_BLACK)); - const Color aNullFillCol(RGB_Color(COL_DEFAULT_SHAPE_FILLING)); // "Blue 8" + const Color aNullLineCol(RGB_Color(COL_DEFAULT_SHAPE_STROKE)); + const Color aNullFillCol(RGB_Color(COL_DEFAULT_SHAPE_FILLING)); const Color aNullShadowCol(RGB_Color(COL_LIGHTGRAY)); const XDash aNullDash; const XGradient aNullGrad(aNullLineCol, RGB_Color(COL_WHITE)); -- cgit From c47f821070a75540e738495f9bc4c2be02cc027f Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Thu, 2 Dec 2010 19:07:32 +0100 Subject: impressdefaults1: #i114776# renamed 'Eyedropper' to 'Color Replacer'/'Pipette' in svx --- svx/source/dialog/bmpmask.src | 4 ++-- svx/source/dialog/contdlg.src | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'svx') diff --git a/svx/source/dialog/bmpmask.src b/svx/source/dialog/bmpmask.src index a9cd2fe60b2f..7823007dbe7c 100644 --- a/svx/source/dialog/bmpmask.src +++ b/svx/source/dialog/bmpmask.src @@ -289,7 +289,7 @@ DockingWindow RID_SVXDLG_BMPMASK ImageBitmap = Bitmap { File = "sc10350.bmp" ; }; MASKCOLOR }; - Text [ en-US ] = "Eyedropper" ; + Text [ en-US ] = "Pipette" ; }; }; }; @@ -300,7 +300,7 @@ DockingWindow RID_SVXDLG_BMPMASK Pos = MAP_APPFONT ( 22 , 6 ) ; Size = MAP_APPFONT ( 43 , 14 ) ; }; - Text [ en-US ] = "Eyedropper" ; + Text [ en-US ] = "Color Replacer" ; Image IMG_PIPETTE { diff --git a/svx/source/dialog/contdlg.src b/svx/source/dialog/contdlg.src index bf587b3b1fda..989bdd93d336 100644 --- a/svx/source/dialog/contdlg.src +++ b/svx/source/dialog/contdlg.src @@ -170,7 +170,7 @@ FloatingWindow RID_SVXDLG_CONTOUR { Identifier = TBI_PIPETTE ; HelpId = HID_CONTDLG_PIPETTE ; - Text [ en-US ] = "Eyedropper" ; + Text [ en-US ] = "Pipette" ; AutoCheck = TRUE ; }; }; -- cgit From 862b6214064cbde1e9fa5e5a93c2e49c17086dd5 Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Thu, 2 Dec 2010 20:26:50 +0100 Subject: impressdefaults1: #i112008# use space(s) for grid not point(s) --- svx/source/dialog/optgrid.cxx | 12 ++++-------- svx/source/dialog/optgrid.src | 4 +++- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'svx') diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index 7565539578df..2fc259ffd9e5 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -276,8 +276,8 @@ BOOL SvxGridTabPage::FillItemSet( SfxItemSet& rCoreSet ) aGridItem.nFldDrawX = (UINT32) nX; aGridItem.nFldDrawY = (UINT32) nY; - aGridItem.nFldDivisionX = static_cast(aNumFldDivisionX.GetValue()); - aGridItem.nFldDivisionY = static_cast(aNumFldDivisionY.GetValue()); + aGridItem.nFldDivisionX = static_cast(aNumFldDivisionX.GetValue()-1); + aGridItem.nFldDivisionY = static_cast(aNumFldDivisionY.GetValue()-1); rCoreSet.Put( aGridItem ); } @@ -303,12 +303,8 @@ void SvxGridTabPage::Reset( const SfxItemSet& rSet ) SetMetricValue( aMtrFldDrawX , pGridAttr->nFldDrawX, eUnit ); SetMetricValue( aMtrFldDrawY , pGridAttr->nFldDrawY, eUnit ); -// UINT32 nFineX = pGridAttr->nFldDivisionX; -// UINT32 nFineY = pGridAttr->nFldDivisionY; -// aNumFldDivisionX.SetValue( nFineX ? (pGridAttr->nFldDrawX / nFineX - 1) : 0 ); -// aNumFldDivisionY.SetValue( nFineY ? (pGridAttr->nFldDrawY / nFineY - 1) : 0 ); - aNumFldDivisionX.SetValue( pGridAttr->nFldDivisionX ); - aNumFldDivisionY.SetValue( pGridAttr->nFldDivisionY ); + aNumFldDivisionX.SetValue( pGridAttr->nFldDivisionX+1 ); + aNumFldDivisionY.SetValue( pGridAttr->nFldDivisionY+1 ); } ChangeGridsnapHdl_Impl( &aCbxUseGridsnap ); diff --git a/svx/source/dialog/optgrid.src b/svx/source/dialog/optgrid.src index 2bc7b430f807..0d65c63f5d2f 100644 --- a/svx/source/dialog/optgrid.src +++ b/svx/source/dialog/optgrid.src @@ -140,6 +140,7 @@ TabPage RID_SVXPAGE_GRID TabStop = TRUE ; Repeat = TRUE ; Spin = TRUE ; + Minimum = 1 ; Maximum = 99 ; Last = 99 ; StrictFormat = TRUE ; @@ -149,7 +150,7 @@ TabPage RID_SVXPAGE_GRID { Pos = MAP_APPFONT ( 223 , 56 ) ; Size = MAP_APPFONT ( 29 , 8 ) ; - Text [ en-US ] = "point(s)" ; + Text [ en-US ] = "space(s)" ; }; NumericField NUM_FLD_DIVISION_Y { @@ -160,6 +161,7 @@ TabPage RID_SVXPAGE_GRID TabStop = TRUE ; Repeat = TRUE ; Spin = TRUE ; + Minimum = 1 ; Maximum = 99 ; Last = 99 ; StrictFormat = TRUE ; -- cgit From 041132b03eec68fae2fa73775a8085a754bf98ed Mon Sep 17 00:00:00 2001 From: Christian Lippka ORACLE Date: Wed, 8 Dec 2010 10:56:28 +0100 Subject: impressdefaults1: #i112002# catching some null pointer access during double clicking on shapes --- svx/source/svdraw/svddrgmt.cxx | 38 ++++++++++++++++++++++++-------------- svx/source/svdraw/svdview.cxx | 2 -- 2 files changed, 24 insertions(+), 16 deletions(-) (limited to 'svx') diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index d04bf8851795..2e7f2b09f50e 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -902,6 +902,9 @@ void SdrDragMovHdl::TakeSdrDragComment(XubString& rStr) const bool SdrDragMovHdl::BeginSdrDrag() { + if( !GetDragHdl() ) + return false; + DragStat().Ref1()=GetDragHdl()->GetPos(); DragStat().SetShown(!DragStat().IsShown()); SdrHdlKind eKind=GetDragHdl()->GetKind(); @@ -931,7 +934,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt) { Point aPnt(rNoSnapPnt); - if (DragStat().CheckMinMoved(rNoSnapPnt)) + if ( GetDragHdl() && DragStat().CheckMinMoved(rNoSnapPnt)) { if (GetDragHdl()->GetKind()==HDL_MIRX) { @@ -1042,22 +1045,25 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt) bool SdrDragMovHdl::EndSdrDrag(bool /*bCopy*/) { - switch (GetDragHdl()->GetKind()) + if( GetDragHdl() ) { - case HDL_REF1: - Ref1()=DragStat().GetNow(); - break; + switch (GetDragHdl()->GetKind()) + { + case HDL_REF1: + Ref1()=DragStat().GetNow(); + break; - case HDL_REF2: - Ref2()=DragStat().GetNow(); - break; + case HDL_REF2: + Ref2()=DragStat().GetNow(); + break; - case HDL_MIRX: - Ref1()+=DragStat().GetNow()-DragStat().GetStart(); - Ref2()+=DragStat().GetNow()-DragStat().GetStart(); - break; + case HDL_MIRX: + Ref1()+=DragStat().GetNow()-DragStat().GetStart(); + Ref2()+=DragStat().GetNow()-DragStat().GetStart(); + break; - default: break; + default: break; + } } return true; @@ -1066,7 +1072,11 @@ bool SdrDragMovHdl::EndSdrDrag(bool /*bCopy*/) void SdrDragMovHdl::CancelSdrDrag() { Hide(); - GetDragHdl()->SetPos(DragStat().GetRef1()); + + SdrHdl* pHdl = GetDragHdl(); + if( pHdl ) + pHdl->SetPos(DragStat().GetRef1()); + SdrHdl* pHM = GetHdlList().GetHdl(HDL_MIRX); if(pHM) diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 7a4305b9581f..acf0b988d2ca 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -988,8 +988,6 @@ Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice* if ((IsDraggingPoints() || IsDraggingGluePoints()) && IsMouseHideWhileDraggingPoints()) return Pointer(POINTER_NULL); - OSL_TRACE("SdrView::GetPreferedPointer(%lx) %lx\n", this, mpCurrentSdrDragMethod); - return mpCurrentSdrDragMethod->GetSdrDragPointer(); } if (IsMarkObj() || IsMarkPoints() || IsMarkGluePoints() || IsEncirclement() || IsSetPageOrg()) return Pointer(POINTER_ARROW); -- cgit From af173db727b060d49733bd15fb210fd2f58598f1 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Mon, 3 Jan 2011 13:40:23 +0100 Subject: fwk162: #i115902# review usage of SfxObjectShellRef, SfxObjecShellLock; remove unused some methods --- svx/source/form/fmscriptingenv.cxx | 1 + svx/source/form/fmundo.cxx | 3 +++ 2 files changed, 4 insertions(+) (limited to 'svx') diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index 154999333296..b8b4055ef5de 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -481,6 +481,7 @@ namespace svxform if ( m_bDisposed ) return; + // SfxObjectShellRef is good here since the model controls the lifetime of the object SfxObjectShellRef xObjectShell = m_rFormModel.GetObjectShell(); if( !xObjectShell.Is() ) return; diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index e6559850ea5d..f66c27510b40 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -130,6 +130,8 @@ private: { Reference< XMultiComponentFactory > xMFac( xCtx->getServiceManager(), UNO_QUERY ); + + // SfxObjectShellRef is good here since the model controls the lifetime of the shell SfxObjectShellRef xObjSh = pModel->GetObjectShell(); Reference< XMultiServiceFactory > xDocFac; if ( xObjSh.Is() ) @@ -150,6 +152,7 @@ private: { try { + // SfxObjectShellRef is good here since the model controls the lifetime of the shell SfxObjectShellRef xObjSh = pModel->GetObjectShell(); if ( xObjSh.Is() && m_vbaListener.is() ) { -- cgit From 9dc4a4bb35101a091d78801b62051b7f76e0d365 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Lankenau Date: Wed, 5 Jan 2011 14:04:43 +0100 Subject: ause129: remove unused file that triggers build.pl detcetion of migrated modules --- svx/prj/makefile.mk | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 svx/prj/makefile.mk (limited to 'svx') diff --git a/svx/prj/makefile.mk b/svx/prj/makefile.mk deleted file mode 100644 index 2a0b99e72fd5..000000000000 --- a/svx/prj/makefile.mk +++ /dev/null @@ -1,2 +0,0 @@ -all: - cd .. && make -srj9 -- cgit