1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _CONTDLG_HXX_ 29 #define _CONTDLG_HXX_ 30 31 #include <sfx2/basedlgs.hxx> 32 #include <sfx2/ctrlitem.hxx> 33 #include <sfx2/childwin.hxx> 34 #include "svx/svxdllapi.h" 35 36 /************************************************************************* 37 |* 38 |* Ableitung vom SfxChildWindow als "Behaelter" fuer Float 39 |* 40 \************************************************************************/ 41 42 class Graphic; 43 44 class SVX_DLLPUBLIC SvxContourDlgChildWindow : public SfxChildWindow 45 { 46 public: 47 48 SvxContourDlgChildWindow( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); 49 50 SFX_DECL_CHILDWINDOW( SvxContourDlgChildWindow ); 51 52 static void UpdateContourDlg( const Graphic& rGraphic, sal_Bool bGraphicLinked, 53 const PolyPolygon* pPolyPoly = NULL, 54 void* pEditingObj = NULL ); 55 }; 56 57 #ifndef _REDUCED_ContourDlg_HXX_ 58 #define _REDUCED_CONTDLG_HXX_ 59 60 class SvxSuperContourDlg; 61 62 /************************************************************************* 63 |* 64 |* 65 |* 66 \************************************************************************/ 67 68 class SvxContourDlgItem : public SfxControllerItem 69 { 70 SvxSuperContourDlg& rDlg; 71 72 protected: 73 74 virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ); 75 76 public: 77 78 SvxContourDlgItem( sal_uInt16 nId, SvxSuperContourDlg& rDlg, SfxBindings& rBindings ); 79 }; 80 81 /************************************************************************* 82 |* 83 |* 84 |* 85 \************************************************************************/ 86 87 class SVX_DLLPUBLIC SvxContourDlg : public SfxFloatingWindow 88 { 89 using Window::Update; 90 91 SvxSuperContourDlg* pSuperClass; 92 93 //#if 0 // _SOLAR__PRIVATE 94 95 protected: 96 97 void SetSuperClass( SvxSuperContourDlg& rSuperClass ) { pSuperClass = &rSuperClass; } 98 99 //#endif // __PRIVATE 100 101 public: 102 103 SvxContourDlg( SfxBindings *pBindings, SfxChildWindow *pCW, 104 Window* pParent, const ResId& rResId ); 105 ~SvxContourDlg(); 106 107 void SetExecState( sal_Bool bEnable ); 108 109 void SetGraphic( const Graphic& rGraphic ); 110 void SetGraphicLinked( sal_Bool bLinked ); 111 const Graphic& GetGraphic() const; 112 sal_Bool IsGraphicChanged() const; 113 114 void SetPolyPolygon( const PolyPolygon& rPolyPoly ); 115 PolyPolygon GetPolyPolygon(); 116 117 void SetEditingObject( void* pObj ); 118 const void* GetEditingObject() const; 119 120 void Update( const Graphic& rGraphic, sal_Bool bGraphicLinked, 121 const PolyPolygon* pPolyPoly = NULL, void* pEditingObj = NULL ); 122 123 static PolyPolygon CreateAutoContour( const Graphic& rGraphic, 124 const Rectangle* pRect = NULL, 125 const sal_uIntPtr nFlags = 0L ); 126 static void ScaleContour( PolyPolygon& rContour, const Graphic& rGraphic, 127 const MapUnit eUnit, const Size& rDisplaySize ); 128 }; 129 130 /************************************************************************* 131 |* 132 |* Defines 133 |* 134 \************************************************************************/ 135 136 #define SVXCONTOURDLG() ( (SvxContourDlg*) ( SfxViewFrame::Current()->GetChildWindow( \ 137 SvxContourDlgChildWindow::GetChildWindowId() )-> \ 138 GetWindow() ) ) 139 140 #endif // _REDUCED_CONTDLG_HXX_ 141 #endif // _CONTDLG_HXX_ 142 143