diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-11-23 17:39:22 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-11-23 17:39:22 +0100 |
commit | 9edc763c5ec6d909a8080d30b5ab029c8d0779ba (patch) | |
tree | 07b94867f33b51218bc177a1de445254fe56152d /svx | |
parent | a4d4ea40f2e8b5a3b3ea469bfa36104d751b6d96 (diff) | |
parent | b4083630cb439a9f54340db6840e8bc6cfcc42c8 (diff) |
merge commit for m65
Diffstat (limited to 'svx')
30 files changed, 87 insertions, 96 deletions
diff --git a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx index 1e68a61432a0..a7084993b5f2 100644 --- a/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx +++ b/svx/inc/svx/sdr/primitive2d/sdrmeasureprimitive2d.hxx @@ -39,19 +39,19 @@ ////////////////////////////////////////////////////////////////////////////// // predefines -namespace drawinglayer -{ - namespace primitive2d +namespace drawinglayer { namespace primitive2d { + enum MeasureTextPosition { - enum MeasureTextPosition - { - MEASURETEXTPOSITION_AUTOMATIC, - MEASURETEXTPOSITION_NEGATIVE, - MEASURETEXTPOSITION_CENTERED, - MEASURETEXTPOSITION_POSITIVE - }; - } // end of namespace primitive2d -} // end of namespace drawinglayer + MEASURETEXTPOSITION_AUTOMATIC, + MEASURETEXTPOSITION_NEGATIVE, + MEASURETEXTPOSITION_CENTERED, + MEASURETEXTPOSITION_POSITIVE + }; +}} + +namespace drawinglayer { namespace attribute { + class SdrLineAttribute; +}} ////////////////////////////////////////////////////////////////////////////// @@ -80,6 +80,7 @@ namespace drawinglayer // internal decomposition helper Primitive2DReference impCreatePart( + const attribute::SdrLineAttribute& rLineAttribute, const basegfx::B2DHomMatrix& rObjectMatrix, const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd, diff --git a/svx/inc/svx/svdoashp.hxx b/svx/inc/svx/svdoashp.hxx index faf1aa7055aa..f65afc0b4efe 100644 --- a/svx/inc/svx/svdoashp.hxx +++ b/svx/inc/svx/svdoashp.hxx @@ -179,6 +179,8 @@ public: virtual UINT16 GetObjIdentifier() const; virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; + virtual void SetModel(SdrModel* pNewModel);
+ virtual void RecalcSnapRect(); virtual const Rectangle& GetSnapRect() const; diff --git a/svx/prj/build.lst b/svx/prj/build.lst index a09ecef38424..3f66b2ae19f8 100644 --- a/svx/prj/build.lst +++ b/svx/prj/build.lst @@ -22,7 +22,7 @@ sx svx\source\svdraw nmake - all sx_draw sx_inc NULL sx svx\source\sdr\attribute nmake - all sx_attribute sx_inc NULL sx svx\source\sdr\primitive2d nmake - all sx_primitive2d sx_inc NULL sx svx\source\sdr\primitive3d nmake - all sx_primitive3d sx_inc NULL -sx svx\source\table nmake - all sx_table NULL +sx svx\source\table nmake - all sx_table sx_inc NULL sx svx\source\sdr\properties nmake - all sx_properties sx_inc NULL sx svx\source\sdr\contact nmake - all sx_contact sx_inc NULL sx svx\source\sdr\event nmake - all sx_event sx_inc NULL diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index ff34fc520ef8..2d5b12ff7129 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1700,19 +1700,6 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm if(aNewB2DPolyPolygon.count()) { - if( !bLineGeometryNeededOnly )
- {
- // hack aNewB2DPolyPolygon to fill logic rect - this is
- // needed to produce gradient fills that look like mso
- aNewB2DPolygon.clear();
- aNewB2DPolygon.append(basegfx::B2DPoint(0,0));
- aNewB2DPolyPolygon.append(aNewB2DPolygon);
-
- aNewB2DPolygon.clear();
- aNewB2DPolygon.append(basegfx::B2DPoint(aLogicRect.GetWidth(),
- aLogicRect.GetHeight()));
- aNewB2DPolyPolygon.append(aNewB2DPolygon);
- }
// #i37011# bool bForceCreateTwoObjects(false); diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index b71432ed15eb..cda3f993a76b 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -1212,7 +1212,7 @@ void SvxBmpMask::DataChanged( const DataChangedEvent& rDCEvt ) void SvxBmpMask::ApplyStyle() { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); aTbxPipette.SetItemImage( TBI_PIPETTE, bHighContrast ? maImgPipetteH : maImgPipette ); } diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 8d8cb7c8810d..0c87beb39a74 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -1133,7 +1133,7 @@ IMPL_LINK( SvxSuperContourDlg, WorkplaceClickHdl, ContourWindow*, pWnd ) void SvxSuperContourDlg::ApplyImageList() { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); ImageList& rImgLst = bHighContrast ? maImageListH : maImageList; diff --git a/svx/source/dialog/connctrl.cxx b/svx/source/dialog/connctrl.cxx index acc101cf4fb3..74fde268f9fa 100644 --- a/svx/source/dialog/connctrl.cxx +++ b/svx/source/dialog/connctrl.cxx @@ -374,7 +374,7 @@ void SvxXConnectionPreview::MouseButtonDown( const MouseEvent& rMEvt ) void SvxXConnectionPreview::SetStyles() { const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings(); - SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); SetBackground( Wallpaper( Color( rStyles.GetFieldColor() ) ) ); } diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 4566199287d6..d0a15be5e4f2 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1203,7 +1203,7 @@ void HatchingLB::UserDraw( const UserDrawEvent& rUDEvt ) OutputDevice* pDevice = rUDEvt.GetDevice(); ULONG nOldDrawMode = pDevice->GetDrawMode(); - pDevice->SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + pDevice->SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); XHatch& rXHatch = mpList->GetHatch( rUDEvt.GetItemId() )->GetHatch(); MapMode aMode( MAP_100TH_MM ); @@ -1968,7 +1968,7 @@ SvxPreviewBase::SvxPreviewBase( Window* pParent, const ResId& rResId ) { // Draw the control's border as a flat thin black line. SetBorderStyle(WINDOW_BORDER_MONO); - SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); SetMapMode(MAP_100TH_MM); // init model @@ -2031,7 +2031,7 @@ void SvxPreviewBase::StateChanged(StateChangedType nType) void SvxPreviewBase::DataChanged(const DataChangedEvent& rDCEvt) { - SetDrawMode(GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR); + SetDrawMode(GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR); if((DATACHANGED_SETTINGS == rDCEvt.GetType()) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) { diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 12f5d44ddb1e..f407e532f1fd 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -917,9 +917,7 @@ void RecovDocListEntry::Paint(const Point& aPos , const String* pTxt = 0; RecovDocList* pList = static_cast< RecovDocList* >(&aDevice); - Wallpaper aBackground = aDevice.GetBackground(); - Color aColor = aBackground.GetColor(); - BOOL bHC = aColor.IsDark(); + BOOL bHC = aDevice.GetSettings().GetStyleSettings().GetHighContrastMode(); TURLInfo* pInfo = (TURLInfo*)pEntry->GetUserData(); switch(pInfo->RecoveryState) diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index 54f831f3505a..ffcf8f21b49d 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -1228,9 +1228,7 @@ void SvxFontWorkDialog::DataChanged( const DataChangedEvent& rDCEvt ) ---------------------------------------------------------------------------*/ void SvxFontWorkDialog::ApplyImageList() { - bool bHighContrast = - (GetSettings().GetStyleSettings().GetHighContrastMode() != 0) && - (GetDisplayBackground().GetColor().IsDark() != 0); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); ResMgr* _pMgr = &DIALOG_MGR(); diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 10e53698af7e..fa413d81ed17 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -328,7 +328,7 @@ void FrameSelectorImpl::InitColors() { const StyleSettings& rSett = mrFrameSel.GetSettings().GetStyleSettings(); maBackCol = rSett.GetFieldColor(); - mbHCMode = maBackCol.IsDark(); + mbHCMode = rSett.GetHighContrastMode(); maArrowCol = rSett.GetFieldTextColor(); maMarkCol.operator=( maBackCol ).Merge( maArrowCol, mbHCMode ? 0x80 : 0xC0 ); maHCLineCol = rSett.GetLabelTextColor(); diff --git a/svx/source/dialog/hyprlink.cxx b/svx/source/dialog/hyprlink.cxx index 01c5629dc10c..413289599d33 100644 --- a/svx/source/dialog/hyprlink.cxx +++ b/svx/source/dialog/hyprlink.cxx @@ -838,10 +838,7 @@ void SvxHyperlinkDlg::DataChanged( const DataChangedEvent& rDCEvt ) void SvxHyperlinkDlg::SetImages() { - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode() != 0; - - if( bHighContrast ) - bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); SetItemImage( BTN_LINK, mpManager->GetImage( BTN_LINK, bHighContrast ) ); SetItemImage( BTN_INSERT_BOOKMARK, mpManager->GetImage( BTN_INSERT_BOOKMARK, bHighContrast ) ); diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 71e97076e8e0..2157fecc7cce 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -1042,7 +1042,7 @@ IMPL_LINK( SvxIMapDlg, MiscHdl, void*, EMPTYARG ) void SvxIMapDlg::ApplyImageList() { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0; + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); ImageList& rImgLst = bHighContrast ? maImageListH : maImageList; diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx index c196178a4d16..87f1b89bd3f4 100644 --- a/svx/source/dialog/langbox.cxx +++ b/svx/source/dialog/langbox.cxx @@ -181,7 +181,7 @@ USHORT SvxLanguageBox::ImplInsertImgEntry( const String& rEntry, USHORT nPos, bo USHORT nRet = 0; if( !bChecked ) nRet = InsertEntry( rEntry, m_aNotCheckedImage, nPos ); - else if( GetSettings().GetStyleSettings().GetFaceColor().IsDark() ) + else if( GetSettings().GetStyleSettings().GetHighContrastMode() ) nRet = InsertEntry( rEntry, m_aCheckedImageHC, nPos ); else nRet = InsertEntry( rEntry, m_aCheckedImage, nPos ); diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx index 2c1747dbc0b4..73e376f9eac1 100644 --- a/svx/source/dialog/measctrl.cxx +++ b/svx/source/dialog/measctrl.cxx @@ -79,7 +79,7 @@ SvxXMeasurePreview::SvxXMeasurePreview //pMeasureObj->SetItemSetAndBroadcast(rInAttrs); pMeasureObj->SetMergedItemSetAndBroadcast(rInAttrs); - SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); Invalidate(); } @@ -196,7 +196,7 @@ void SvxXMeasurePreview::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); } } diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index 67f5ee2ea318..79035bc4b8cb 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -76,7 +76,7 @@ void SvxSwFrameExample::InitColors_Impl( void ) const StyleSettings& rSettings = GetSettings().GetStyleSettings(); m_aBgCol = Color( rSettings.GetWindowColor() ); // old: COL_WHITE - BOOL bHC = m_aBgCol.IsDark(); + BOOL bHC = rSettings.GetHighContrastMode(); m_aFrameColor = Color( COL_LIGHTGREEN ); m_aAlignColor = Color( COL_LIGHTRED ); diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index f652be197bbd..2ce8e1728ee4 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -778,7 +778,7 @@ namespace svxform SvLBoxEntry* XFormsPage::AddEntry( ItemNode* _pNewNode, bool _bIsElement ) { SvLBoxEntry* pParent = m_aItemList.FirstSelected(); - const ImageList& rImageList = GetBackground().GetColor().IsDark() + const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode() ? m_pNaviWin->GetItemHCImageList() : m_pNaviWin->GetItemImageList(); USHORT nImageID = ( _bIsElement ) ? IID_ELEMENT : IID_ATTRIBUTE; @@ -988,7 +988,7 @@ namespace svxform SvLBoxEntry* XFormsPage::AddEntry( const Reference< XPropertySet >& _rEntry ) { SvLBoxEntry* pEntry = NULL; - const ImageList& rImageList = GetBackground().GetColor().IsDark() + const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode() ? m_pNaviWin->GetItemHCImageList() : m_pNaviWin->GetItemImageList(); Image aImage = rImageList.GetImage( IID_ELEMENT ); @@ -1244,7 +1244,7 @@ namespace svxform m_xUIHelper = Reference< css::xforms::XFormsUIHelper1 >( _xModel, UNO_QUERY ); String sRet; m_bHasModel = true; - const ImageList& rImageList = GetBackground().GetColor().IsDark() + const ImageList& rImageList = GetSettings().GetStyleSettings().GetHighContrastMode() ? m_pNaviWin->GetItemHCImageList() : m_pNaviWin->GetItemImageList(); diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 13060a11279b..4d265d324820 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -987,7 +987,7 @@ PopupMenu* FmXFormShell::GetConversionMenu() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmXFormShell::GetConversionMenu" ); const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark(); + BOOL bIsHiContrastMode = rSettings.GetHighContrastMode(); PopupMenu* pNewMenu = new PopupMenu(SVX_RES( RID_FMSHELL_CONVERSIONMENU )); @@ -2001,7 +2001,7 @@ bool FmXFormShell::setCurrentSelection( const InterfaceBag& _rSelection ) m_aCurrentSelection = _rSelection; - // determine the form which all the selected objcts belong to, if any + // determine the form which all the selected obj�cts belong to, if any Reference< XForm > xNewCurrentForm; for ( InterfaceBag::const_iterator loop = m_aCurrentSelection.begin(); loop != m_aCurrentSelection.end(); diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx index cc5cd24ebcf0..bcdde07ec84e 100644 --- a/svx/source/form/tbxform.cxx +++ b/svx/source/form/tbxform.cxx @@ -219,7 +219,7 @@ void SvxFmTbxCtlConfig::StateChanged(USHORT nSID, SfxItemState eState, const Sfx Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages(), - GetToolBox().GetDisplayBackground().GetColor().IsDark() ); + GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode() ); GetToolBox().SetItemImage( GetId(), aImage ); nLastSlot = nSlot; diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index f1a13c95a638..6e212a0ff58b 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -1231,7 +1231,7 @@ IMPL_LINK( GalleryBrowser2, SelectTbxHdl, ToolBox*, pBox ) IMPL_LINK( GalleryBrowser2, MiscHdl, void*, EMPTYARG ) { - const sal_Bool bHC = GALLERY_DLG_COLOR.IsDark(); + const sal_Bool bHC = maViewBox.GetSettings().GetStyleSettings().GetHighContrastMode(); maViewBox.SetOutStyle( maMiscOptions.GetToolboxStyle() ); diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index f5445cefa5f6..cb2452e8ba1f 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -52,27 +52,29 @@ namespace drawinglayer namespace primitive2d { Primitive2DReference SdrMeasurePrimitive2D::impCreatePart( + const attribute::SdrLineAttribute& rLineAttribute, const basegfx::B2DHomMatrix& rObjectMatrix, const basegfx::B2DPoint& rStart, const basegfx::B2DPoint& rEnd, bool bLeftActive, bool bRightActive) const { + const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd(); basegfx::B2DPolygon aPolygon; + aPolygon.append(rStart); aPolygon.append(rEnd); - if(!getSdrLSTAttribute().getLineStartEnd() || (!bLeftActive && !bRightActive)) + if(!pLineStartEnd || (!bLeftActive && !bRightActive)) { - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), 0L); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, 0); } if(bLeftActive && bRightActive) { - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), getSdrLSTAttribute().getLineStartEnd()); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, pLineStartEnd); } - const attribute::SdrLineStartEndAttribute* pLineStartEnd = getSdrLSTAttribute().getLineStartEnd(); const basegfx::B2DPolyPolygon aEmpty; const attribute::SdrLineStartEndAttribute aLineStartEnd( bLeftActive ? pLineStartEnd->getStartPolyPolygon() : aEmpty, bRightActive ? pLineStartEnd->getEndPolyPolygon() : aEmpty, @@ -80,7 +82,7 @@ namespace drawinglayer bLeftActive ? pLineStartEnd->isStartActive() : false, bRightActive ? pLineStartEnd->isEndActive() : false, bLeftActive ? pLineStartEnd->isStartCentered() : false, bRightActive? pLineStartEnd->isEndCentered() : false); - return createPolygonLinePrimitive(aPolygon, rObjectMatrix, *getSdrLSTAttribute().getLine(), &aLineStartEnd); + return createPolygonLinePrimitive(aPolygon, rObjectMatrix, rLineAttribute, &aLineStartEnd); } Primitive2DSequence SdrMeasurePrimitive2D::createLocalDecomposition(const geometry::ViewInformation2D& aViewInformation) const @@ -278,12 +280,12 @@ namespace drawinglayer const basegfx::B2DPoint aMainLeftLeft(aMainLeft.getX() - fLenLeft, aMainLeft.getY()); const basegfx::B2DPoint aMainRightRight(aMainRight.getX() + fLenRight, aMainRight.getY()); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeftLeft, aMainLeft, false, true)); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainRight, aMainRightRight, true, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeftLeft, aMainLeft, false, true)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainRight, aMainRightRight, true, false)); if(!bMainLineSplitted || MEASURETEXTPOSITION_CENTERED != eHorizontal) { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainRight, false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(* pLineAttribute, aObjectMatrix, aMainLeft, aMainRight, false, false)); } } else @@ -294,12 +296,12 @@ namespace drawinglayer const basegfx::B2DPoint aMainInnerLeft(aMainLeft.getX() + fHalfLength, aMainLeft.getY()); const basegfx::B2DPoint aMainInnerRight(aMainRight.getX() - fHalfLength, aMainRight.getY()); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainInnerLeft, true, false)); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainInnerRight, aMainRight, false, true)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeft, aMainInnerLeft, true, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainInnerRight, aMainRight, false, true)); } else { - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aMainLeft, aMainRight, true, true)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aMainLeft, aMainRight, true, true)); } } @@ -312,13 +314,13 @@ namespace drawinglayer const basegfx::B2DPoint aLeftUp(0.0, fTopEdge); const basegfx::B2DPoint aLeftDown(0.0, fBottomLeft); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aLeftDown, aLeftUp, false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aLeftDown, aLeftUp, false, false)); // right help line const basegfx::B2DPoint aRightUp(fDistance, fTopEdge); const basegfx::B2DPoint aRightDown(fDistance, fBottomRight); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(aObjectMatrix, aRightDown, aRightUp, false, false)); + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, impCreatePart(*pLineAttribute, aObjectMatrix, aRightDown, aRightUp, false, false)); // text horizontal position if(MEASURETEXTPOSITION_NEGATIVE == eHorizontal) diff --git a/svx/source/stbctrls/xmlsecctrl.cxx b/svx/source/stbctrls/xmlsecctrl.cxx index 63ef175a83dd..a73aeaa3ab8c 100644 --- a/svx/source/stbctrls/xmlsecctrl.cxx +++ b/svx/source/stbctrls/xmlsecctrl.cxx @@ -97,12 +97,12 @@ XmlSecStatusBarControl::XmlSecStatusBarControl( USHORT _nSlotId, USHORT _nId, S { mpImpl->mnState = (UINT16)SIGNATURESTATE_UNKNOWN; - sal_Bool bIsDark = GetStatusBar().GetBackground().GetColor().IsDark(); - mpImpl->maImage = Image( SVX_RES( bIsDark ? RID_SVXBMP_SIGNET_H : RID_SVXBMP_SIGNET ) ); + sal_Bool bHC = GetStatusBar().GetSettings().GetStyleSettings().GetHighContrastMode(); + mpImpl->maImage = Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_H : RID_SVXBMP_SIGNET ) ); mpImpl->maImageBroken = - Image( SVX_RES( bIsDark ? RID_SVXBMP_SIGNET_BROKEN_H : RID_SVXBMP_SIGNET_BROKEN ) ); + Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_BROKEN_H : RID_SVXBMP_SIGNET_BROKEN ) ); mpImpl->maImageNotValidated = - Image( SVX_RES( bIsDark ? RID_SVXBMP_SIGNET_NOTVALIDATED_H : RID_SVXBMP_SIGNET_NOTVALIDATED ) ); + Image( SVX_RES( bHC ? RID_SVXBMP_SIGNET_NOTVALIDATED_H : RID_SVXBMP_SIGNET_NOTVALIDATED ) ); } XmlSecStatusBarControl::~XmlSecStatusBarControl() diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index 2f3431accf64..70b12ac628a6 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -188,10 +188,10 @@ SvxZoomSliderControl::SvxZoomSliderControl( USHORT _nSlotId, USHORT _nId, Statu SfxStatusBarControl( _nSlotId, _nId, _rStb ), mpImpl( new SvxZoomSliderControl_Impl ) { - const sal_Bool bIsDark = GetStatusBar().GetBackground().GetColor().IsDark(); - mpImpl->maSliderButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) ); - mpImpl->maIncreaseButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) ); - mpImpl->maDecreaseButton = Image( SVX_RES( bIsDark ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) ); + const sal_Bool bHC = GetStatusBar().GetSettings().GetStyleSettings().GetHighContrastMode(); + mpImpl->maSliderButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERBUTTON_HC : RID_SVXBMP_SLIDERBUTTON ) ); + mpImpl->maIncreaseButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERINCREASE_HC : RID_SVXBMP_SLIDERINCREASE ) ); + mpImpl->maDecreaseButton = Image( SVX_RES( bHC ? RID_SVXBMP_SLIDERDECREASE_HC : RID_SVXBMP_SLIDERDECREASE ) ); } // ----------------------------------------------------------------------- diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 936c073f6e84..d3202e389f83 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -2004,7 +2004,7 @@ void SdrHdlList::TravelFocusHdl(sal_Bool bForward) } // #105678# free mem again - delete pHdlAndIndex; + delete [] pHdlAndIndex; } } diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index bb5f2b377e99..4c4c39f7225b 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -1673,6 +1673,12 @@ void SdrObjCustomShape::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const } } +void SdrObjCustomShape::SetModel(SdrModel* pNewModel)
+{
+ SdrTextObj::SetModel(pNewModel);
+ mXRenderedCustomShape.clear();
+}
+ UINT16 SdrObjCustomShape::GetObjIdentifier() const { return UINT16(OBJ_CUSTOMSHAPE); diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx index cee193d32eb8..3b484d770397 100644 --- a/svx/source/tbxctrls/extrusioncontrols.cxx +++ b/svx/source/tbxctrls/extrusioncontrols.cxx @@ -137,7 +137,7 @@ void ExtrusionDirectionWindow::implInit() mpDirectionSet->SetColCount( 3 ); mpDirectionSet->EnableFullItemMode( FALSE ); - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) { @@ -174,7 +174,7 @@ void ExtrusionDirectionWindow::DataChanged( const DataChangedEvent& rDCEvt ) if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); USHORT i; for( i = DIRECTION_NW; i <= DIRECTION_SE; i++ ) @@ -514,7 +514,7 @@ void ExtrusionDepthWindow::implInit() mpMenu->SetSelectHdl( LINK( this, ExtrusionDepthWindow, SelectHdl ) ); - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); String aEmpty; mpMenu->appendEntry( 0, aEmpty, bHighContrast ? maImgDepth0h : maImgDepth0 ); @@ -635,7 +635,7 @@ void ExtrusionDepthWindow::DataChanged( const DataChangedEvent& rDCEvt ) if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); mpMenu->setEntryImage( 0, bHighContrast ? maImgDepth0h : maImgDepth0 ); mpMenu->setEntryImage( 1, bHighContrast ? maImgDepth1h : maImgDepth1 ); @@ -882,7 +882,7 @@ void ExtrusionLightingWindow::implInit() mpLightingSet->SetColCount( 3 ); mpLightingSet->EnableFullItemMode( FALSE ); - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); for( i = FROM_TOP_LEFT; i <= FROM_BOTTOM_RIGHT; i++ ) { @@ -949,7 +949,7 @@ void ExtrusionLightingWindow::implSetDirection( int nDirection, bool bEnabled ) mnDirection = nDirection; mbDirectionEnabled = bEnabled; - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); if( !bEnabled ) nDirection = FROM_FRONT; @@ -1022,7 +1022,7 @@ void ExtrusionLightingWindow::DataChanged( const DataChangedEvent& rDCEvt ) if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); implSetDirection( mnDirection, mbDirectionEnabled ); mpMenu->setEntryImage( 0, bHighContrast ? maImgBrighth : maImgBright ); @@ -1231,7 +1231,7 @@ void ExtrusionSurfaceWindow::implInit() { SetHelpId( HID_POPUP_EXTRUSION_SURFACE ); - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); // mpSurfaceForewarder = new SfxStatusForwarder( SID_EXTRUSION_SURFACE, *this ); @@ -1316,7 +1316,7 @@ void ExtrusionSurfaceWindow::DataChanged( const DataChangedEvent& rDCEvt ) if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); mpMenu->appendEntry( 0, String( SVX_RES( STR_WIREFRAME ) ), bHighContrast ? maImgSurface1h : maImgSurface1 ); mpMenu->appendEntry( 1, String( SVX_RES( STR_MATTE ) ), bHighContrast ? maImgSurface2h : maImgSurface2 ); diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 8d2c8f2c10bc..13a01b6dc31b 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -397,7 +397,7 @@ void FontWorkAlignmentWindow::implInit() { SetHelpId( HID_POPUP_FONTWORK_ALIGN ); - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN ); mpMenu->SetHelpId( HID_POPUP_FONTWORK_ALIGN ); @@ -477,7 +477,7 @@ void FontWorkAlignmentWindow::DataChanged( const DataChangedEvent& rDCEvt ) if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { - bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); + bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); mpMenu->appendEntry( 0, String( SVX_RES( STR_ALIGN_LEFT ) ), bHighContrast ? maImgAlgin1h : maImgAlgin1 ); mpMenu->appendEntry( 1, String( SVX_RES( STR_ALIGN_CENTER ) ), bHighContrast ? maImgAlgin2h : maImgAlgin2 ); @@ -637,7 +637,7 @@ void FontWorkCharacterSpacingWindow::implInit() { SetHelpId( HID_POPUP_FONTWORK_CHARSPACE ); -// bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); +// bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); mpMenu = new ToolbarMenu( this, WB_CLIPCHILDREN ); mpMenu->SetHelpId( HID_POPUP_FONTWORK_CHARSPACE ); @@ -754,7 +754,7 @@ void FontWorkCharacterSpacingWindow::DataChanged( const DataChangedEvent& rDCEvt if( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) { -// bool bHighContrast = GetDisplayBackground().GetColor().IsDark(); +// bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); mpMenu->appendEntry( 0, String( SVX_RES( STR_CHARS_SPACING_VERY_TIGHT ) ), MIB_CHECKABLE ); mpMenu->appendEntry( 1, String( SVX_RES( STR_CHARS_SPACING_TIGHT ) ), MIB_CHECKABLE ); diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index 153ff664019f..518621a4cc38 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -74,7 +74,7 @@ using namespace ::com::sun::star::beans; SvxLineBox::SvxLineBox( Window* pParent, const Reference< XFrame >& rFrame, WinBits nBits ) : LineLB( pParent, nBits ), - meBmpMode ( GetDisplayBackground().GetColor().IsDark() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL ), + meBmpMode ( GetSettings().GetStyleSettings().GetHighContrastMode() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL ), nCurPos ( 0 ), aLogicalSize(40,140), bRelease ( TRUE ), @@ -268,7 +268,7 @@ void SvxLineBox::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - BmpColorMode eMode = GetDisplayBackground().GetColor().IsDark() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL; + BmpColorMode eMode = GetSettings().GetStyleSettings().GetHighContrastMode() ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL; if( eMode != meBmpMode ) { meBmpMode = eMode; diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index c1b87f46b22b..5c283b3aae24 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -282,7 +282,7 @@ public: inline BOOL SvxFrameWindow_Impl::IsHighContrast( void ) const { - return GetDisplayBackground().GetColor().IsDark(); + return GetSettings().GetStyleSettings().GetHighContrastMode(); } //======================================================================== diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index 4d0ebe5dd6c2..3df0d8487ac2 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -63,7 +63,7 @@ namespace svx if (mnSlotId == SID_BACKGROUND_COLOR) mnDrawMode = TBX_UPDATER_MODE_CHAR_COLOR_NEW; DBG_ASSERT( ptrTbx, "ToolBox not found :-(" ); - mbWasHiContrastMode = ptrTbx ? ( ptrTbx->GetBackground().GetColor().IsDark() ) : FALSE; + mbWasHiContrastMode = ptrTbx ? ( ptrTbx->GetSettings().GetStyleSettings().GetHighContrastMode() ) : FALSE; Update(mnSlotId == SID_ATTR_CHAR_COLOR2 ? COL_BLACK : COL_GRAY); } @@ -79,7 +79,7 @@ namespace svx { Image aImage( mpTbx->GetItemImage( mnBtnId ) ); const bool bSizeChanged = ( maBmpSize != aImage.GetSizePixel() ); - const bool bDisplayModeChanged = ( mbWasHiContrastMode != mpTbx->GetBackground().GetColor().IsDark() ); + const bool bDisplayModeChanged = ( mbWasHiContrastMode != mpTbx->GetSettings().GetStyleSettings().GetHighContrastMode() ); Color aColor( rColor ); // !!! #109290# Workaround for SetFillColor with COL_AUTO @@ -107,7 +107,7 @@ namespace svx else pMskAcc = NULL; - mbWasHiContrastMode = mpTbx->GetBackground().GetColor().IsDark(); + mbWasHiContrastMode = mpTbx->GetSettings().GetStyleSettings().GetHighContrastMode(); if( mnDrawMode == TBX_UPDATER_MODE_CHAR_COLOR_NEW && ( COL_TRANSPARENT != aColor.GetColor() ) ) pBmpAcc->SetLineColor( aColor ); |