diff options
author | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-02-03 12:19:25 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-02-03 12:19:25 +0100 |
commit | 7ce87234ca470fe1dc6668ff221300c703b535d8 (patch) | |
tree | 40c18479f7ca90514c779f6d1b2efa9a7ed87457 /svx/source | |
parent | 38bb869fa8db331b62853f2b2759ac4b8bedf781 (diff) | |
parent | a1a2a5a68046e75aba3dfd6ba06083a314f12182 (diff) |
merge from master
Diffstat (limited to 'svx/source')
26 files changed, 105 insertions, 124 deletions
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 ; }; }; diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index f281580b93db..8a5bfa75f7fa 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<long>(aNumFldDivisionX.GetValue()); - aGridItem.nFldDivisionY = static_cast<long>(aNumFldDivisionY.GetValue()); + aGridItem.nFldDivisionX = static_cast<long>(aNumFldDivisionX.GetValue()-1); + aGridItem.nFldDivisionY = static_cast<long>(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 ; diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index f546a2cef0b8..33a7dde794b4 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 ); diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index 154999333296..3e8aa88a2612 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include "fmscriptingenv.hxx" -#include <svx/fmmodel.hxx> +#include "svx/fmmodel.hxx" /** === begin UNO includes === **/ #include <com/sun/star/lang/IllegalArgumentException.hpp> @@ -37,6 +37,7 @@ #include <com/sun/star/reflection/XInterfaceMethodTypeDescription.hpp> #include <com/sun/star/lang/DisposedException.hpp> /** === end UNO includes === **/ + #include <tools/diagnose_ex.h> #include <cppuhelper/implbase1.hxx> #include <comphelper/implementationreference.hxx> @@ -45,6 +46,8 @@ #include <vcl/svapp.hxx> #include <vos/mutex.hxx> #include <sfx2/objsh.hxx> +#include <sfx2/app.hxx> +#include <basic/basmgr.hxx> #include <boost/shared_ptr.hpp> @@ -416,60 +419,6 @@ namespace svxform m_rObjectShell.CallXScript( m_sScriptCode, _rArguments, _rSynchronousResult, aOutArgsIndex, aOutArgs ); } - - //................................................................ - //. QualifiedBasicScript - //................................................................ - class QualifiedBasicScript : public IScript - { - SfxObjectShell& m_rObjectShell; - const ::rtl::OUString m_sMacroLocation; - const ::rtl::OUString m_sScriptCode; - - public: - QualifiedBasicScript( SfxObjectShell& _rObjectShell, const ::rtl::OUString& _rLocation, const ::rtl::OUString& _rScriptCode ) - :m_rObjectShell( _rObjectShell ) - ,m_sMacroLocation( _rLocation ) - ,m_sScriptCode( _rScriptCode ) - { - } - - // IScript - virtual void invoke( const Sequence< Any >& _rArguments, Any& _rSynchronousResult ); - }; - - //................................................................ - void QualifiedBasicScript::invoke( const Sequence< Any >& _rArguments, Any& _rSynchronousResult ) - { - m_rObjectShell.CallStarBasicScript( m_sScriptCode, m_sMacroLocation, - &_rArguments, &_rSynchronousResult ); - } - - //................................................................ - //. UnqualifiedBasicScript - //................................................................ - class UnqualifiedBasicScript : public IScript - { - SfxObjectShell& m_rObjectShell; - const ::rtl::OUString m_sScriptCode; - - public: - UnqualifiedBasicScript( SfxObjectShell& _rObjectShell, const ::rtl::OUString& _rScriptCode ) - :m_rObjectShell( _rObjectShell ) - ,m_sScriptCode( _rScriptCode ) - { - } - - // IScript - virtual void invoke( const Sequence< Any >& _rArguments, Any& _rSynchronousResult ); - }; - - //................................................................ - void UnqualifiedBasicScript::invoke( const Sequence< Any >& _rArguments, Any& _rSynchronousResult ) - { - m_rObjectShell.CallScript( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StarBasic" ) ), m_sScriptCode, - &_rArguments, &_rSynchronousResult ); - } } //-------------------------------------------------------------------- @@ -481,6 +430,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; @@ -513,14 +463,24 @@ namespace svxform sScriptCode = sScriptCode.copy( nPrefixLen + 1 ); } - if ( sMacroLocation.getLength() ) - { // we have a StarBasic macro with fully-qualified macro location - pScript.reset( new QualifiedBasicScript( *xObjectShell, sMacroLocation, sScriptCode ) ); - } - else - { // we have a StarBasic macro without qualified location - let the object shell gues .... - pScript.reset( new UnqualifiedBasicScript( *xObjectShell, sScriptCode ) ); + if ( !sMacroLocation.getLength() ) + { + // legacy format: use the app-wide Basic, if it has a respective method, otherwise fall back to the doc's Basic + if ( SFX_APP()->GetBasicManager()->HasMacro( sScriptCode ) ) + sMacroLocation = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application" ) ); + else + sMacroLocation = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "document" ) ); } + + ::rtl::OUStringBuffer aScriptURI; + aScriptURI.appendAscii( "vnd.sun.star.script:" ); + aScriptURI.append( sScriptCode ); + aScriptURI.appendAscii( "?language=Basic" ); + aScriptURI.appendAscii( "&location=" ); + aScriptURI.append( sMacroLocation ); + + const ::rtl::OUString sScriptURI( aScriptURI.makeStringAndClear() ); + pScript.reset( new NewStyleUNOScript( *xObjectShell, sScriptURI ) ); } OSL_ENSURE( pScript.get(), "FormScriptingEnvironment::doFireScriptEvent: no script to execute!" ); diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index e63325f710e9..ed0d57b96f97 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() ) { diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index f9980284993d..1147e71b0731 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -46,7 +46,6 @@ #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <basic/sbuno.hxx> -#include <sfx2/macrconf.hxx> #include <basic/sbx.hxx> #include "fmitems.hxx" #include "fmobj.hxx" diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 7087e3d6793f..528661d2abe4 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -81,7 +81,7 @@ #include <comphelper/property.hxx> #include <comphelper/sequence.hxx> #include <comphelper/uno3.hxx> -#include <comphelper/scopeguard.hxx> +#include <comphelper/flagguard.hxx> #include <cppuhelper/queryinterface.hxx> #include <cppuhelper/typeprovider.hxx> #include <toolkit/controls/unocontrol.hxx> diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 32ad01aca4a2..9198f02278bb 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 ); 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 e24aa1c29de7..5d4e6d71fbe9 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<com::sun::star::beans::PropertyValue>()); 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 d2264e219c48..d804cce575a1 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<beans::PropertyValue>()); 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 d4748a14ed98..845f1c813325 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/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index d41b5b1a1c34..058ba94cf3a6 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/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 7718451ab945..80b586c01600 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -2115,6 +2115,11 @@ void SdrModel::SetSdrUndoManager( SfxUndoManager* pUndoManager ) mpImpl->mpUndoManager = pUndoManager; } +SfxUndoManager* SdrModel::GetSdrUndoManager() const +{ + return mpImpl->mpUndoManager; +} + SdrUndoFactory& SdrModel::GetSdrUndoFactory() const { if( !mpImpl->mpUndoFactory ) diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 0a0c35aec524..18e04f648725 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/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 7b9185ca7d3b..f10e3bf33fc3 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/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index 4559dacb31d8..65514307bb86 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 diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index 1320aef9b17b..51ab577ca74c 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); diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index a905aa0fd2f4..af6a35ddd5ef 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -58,6 +58,7 @@ #include <svx/extrud3d.hxx> #include <svx/lathe3d.hxx> #include <vcl/svapp.hxx> +#include <tools/diagnose_ex.h> using ::rtl::OUString; using namespace ::vos; @@ -306,7 +307,7 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape { OGuard aGuard( Application::GetSolarMutex() ); - if( (mpModel == 0) || (mpPage == 0) ) + if ( ( mpModel == NULL ) || ( mpPage == NULL ) ) throw lang::DisposedException(); SvxShape* pShape = SvxShape::getImplementation( xShape ); @@ -319,6 +320,7 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape if(!pObj) { pObj = CreateSdrObject( xShape ); + ENSURE_OR_RETURN_VOID( pObj != NULL, "SvxDrawPage::add: no SdrObject was created!" ); } else if ( !pObj->IsInserted() ) { @@ -326,14 +328,10 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape mpPage->InsertObject( pObj ); } - if(pObj == NULL) - return; - - if(pShape) - pShape->Create( pObj, this ); + pShape->Create( pObj, this ); + OSL_ENSURE( pShape->GetSdrObject() == pObj, "SvxDrawPage::add: shape does not know about its newly created SdrObject!" ); - if( mpModel ) - mpModel->SetChanged(); + mpModel->SetChanged(); } //---------------------------------------------------------------------- diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index ffc6c28f9fec..6132139e0164 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -39,7 +39,7 @@ #include <com/sun/star/media/ZoomLevel.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include <tools/shl.hxx> #include <vos/mutex.hxx> #include <vcl/svapp.hxx> diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 0f1482adaf5d..839c4553a859 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -147,7 +147,7 @@ struct SvxShapeImpl * SdrObject so a multiple call to SvxShape::Create() with same SdrObject * is prohibited. */ - SdrObject* mpCreatedObj; + ::tools::WeakReference< SdrObject > mpCreatedObj; // for xComponent ::cppu::OInterfaceContainerHelper maDisposeListeners; @@ -160,7 +160,7 @@ struct SvxShapeImpl ,mpMaster( NULL ) ,mbHasSdrObjectOwnership( false ) ,mbDisposing( false ) - ,mpCreatedObj( NULL ) + ,mpCreatedObj() ,maDisposeListeners( _rMutex ) ,maPropertyNotifier( _rAntiImpl, _rMutex ) { @@ -468,11 +468,12 @@ void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* /*pNewPage*/ ) if ( !pNewObj ) return; - OSL_ENSURE( ( mpImpl->mpCreatedObj == NULL ) || ( mpImpl->mpCreatedObj == pNewObj ), + SdrObject* pCreatedObj = mpImpl->mpCreatedObj.get(); + OSL_ENSURE( ( pCreatedObj == NULL ) || ( pCreatedObj == pNewObj ), "SvxShape::Create: the same shape used for two different objects?! Strange ..." ); // --> CL, OD 2005-07-19 #i52126# - correct condition - if ( mpImpl->mpCreatedObj != pNewObj ) + if ( pCreatedObj != pNewObj ) // <-- { DBG_ASSERT( pNewObj->GetModel(), "no model for SdrObject?" ); diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 04770faf694b..f82283417be6 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(); +} diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx index 3d377c88fa4d..0435b62cd3c8 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)); |