diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-03-16 22:33:14 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-03-16 22:40:42 +0200 |
commit | 2976b53ff8c815f5f6a5deba1763fba153bd528f (patch) | |
tree | 178b9b8384f71f27c39922f3a30b432034375c49 /svx | |
parent | 7956ff62ee9a4b82f64d19d51cccddd73bc49d1e (diff) |
Bin more pointless comments and ASCII graphics
Suggested Easy Hack: Replace all instances of // -------- comments
including surrounding newlines with a single newline.
Another Easy Hack, slightly harder to automate: Remove all the
pointless comments that just tell the class name right before the
declaration of that class.
Change-Id: Ia890ed613b53c5d719988697e20a983d62334123
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/gallery.hrc | 4 | ||||
-rw-r--r-- | svx/inc/galobj.hxx | 33 | ||||
-rw-r--r-- | svx/inc/svx/galbrws.hxx | 17 | ||||
-rw-r--r-- | svx/inc/svx/galctrl.hxx | 16 | ||||
-rw-r--r-- | svx/inc/svx/gallery.hxx | 8 | ||||
-rw-r--r-- | svx/inc/svx/galmisc.hxx | 39 | ||||
-rw-r--r-- | svx/inc/svx/svdograf.hxx | 16 | ||||
-rw-r--r-- | svx/inc/svx/xoutbmp.hxx | 12 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 96 | ||||
-rw-r--r-- | svx/source/gallery2/galctrl.cxx | 91 | ||||
-rw-r--r-- | svx/source/svdraw/svdograf.cxx | 126 | ||||
-rw-r--r-- | svx/source/tbxctrls/grafctrl.cxx | 143 | ||||
-rw-r--r-- | svx/source/xml/xmleohlp.cxx | 37 | ||||
-rw-r--r-- | svx/source/xml/xmlgrhlp.cxx | 79 | ||||
-rw-r--r-- | svx/source/xoutdev/_xoutbmp.cxx | 24 |
15 files changed, 0 insertions, 741 deletions
diff --git a/svx/inc/gallery.hrc b/svx/inc/gallery.hrc index a7fea64688ec..2396db0dceae 100644 --- a/svx/inc/gallery.hrc +++ b/svx/inc/gallery.hrc @@ -23,10 +23,6 @@ #include <svx/dialogs.hrc> #include "galtheme.hrc" -// ----------- -// - Defines - -// ----------- - // Dialoge #define RID_SVXDLG_GALLERYBROWSER (RID_SVX_GALLERY_START + 5) diff --git a/svx/inc/galobj.hxx b/svx/inc/galobj.hxx index 6031d86cbfd7..fed858cba3e6 100644 --- a/svx/inc/galobj.hxx +++ b/svx/inc/galobj.hxx @@ -24,13 +24,8 @@ #include <vcl/graph.hxx> #include "svx/galmisc.hxx" -// ----------- -// - Defines - -// ----------- - #define S_THUMB 80 -// ----------------------------------------------------------------------------- #define SGA_FORMAT_NONE 0x00000000L #define SGA_FORMAT_STRING 0x00000001L @@ -40,10 +35,6 @@ #define SGA_FORMAT_SVDRAW 0x00010000L #define SGA_FORMAT_ALL 0xFFFFFFFFL -// ---------------- -// - GalSoundType - -// ---------------- - enum GalSoundType { SOUND_STANDARD = 0, @@ -56,10 +47,6 @@ enum GalSoundType SOUND_ANIMAL = 7 }; -// ------------- -// - SgaObject - -// ------------- - class SVX_DLLPUBLIC SgaObject { friend class GalleryTheme; @@ -104,10 +91,6 @@ public: friend SvStream& operator>>( SvStream& rIn, SgaObject& rObj ); }; -// ------------------ -// - SgaObjectSound - -// ------------------ - class SgaObjectSound : public SgaObject { private: @@ -130,10 +113,6 @@ public: GalSoundType GetSoundType() const { return eSoundType; } }; -// ------------------- -// - SgaObjectSvDraw - -// ------------------- - class FmFormModel; class SgaObjectSvDraw : public SgaObject @@ -163,10 +142,6 @@ public: static sal_Bool DrawCentered( OutputDevice* pOut, const FmFormModel& rModel ); }; -// ---------------- -// - SgaObjectBmp - -// ---------------- - class SgaObjectBmp: public SgaObject { private: @@ -188,10 +163,6 @@ public: virtual SgaObjKind GetObjKind() const { return SGA_OBJ_BMP; } }; -// ----------------- -// - SgaObjectAnim - -// ----------------- - class SgaObjectAnim : public SgaObjectBmp { private: @@ -208,10 +179,6 @@ public: virtual SgaObjKind GetObjKind() const { return SGA_OBJ_ANIM; } }; -// ----------------- -// - SgaObjectINet - -// ----------------- - class SgaObjectINet : public SgaObjectAnim { private: diff --git a/svx/inc/svx/galbrws.hxx b/svx/inc/svx/galbrws.hxx index 83c5c600488a..0269643c658b 100644 --- a/svx/inc/svx/galbrws.hxx +++ b/svx/inc/svx/galbrws.hxx @@ -26,16 +26,8 @@ #include <tools/urlobj.hxx> #include "svx/svxdllapi.h" -// ----------- -// - Defines - -// ----------- - #define GALLERYBROWSER() ((GalleryBrowser*)( SfxViewFrame::Current()->GetChildWindow(GalleryChildWindow::GetChildWindowId())->GetWindow())) -// ------------------------- -// - SvxGalleryChildWindow - -// ------------------------- - class SVX_DLLPUBLIC GalleryChildWindow : public SfxChildWindow { public: @@ -45,16 +37,7 @@ public: SFX_DECL_CHILDWINDOW_WITHID( GalleryChildWindow ); }; -// ------------------ -// - FormModel - -// ------------------ - class FmFormModel; - -// ------------------ -// - GalleryBrowser - -// ------------------ - class GalleryBrowser1; class GalleryBrowser2; class GallerySplitter; diff --git a/svx/inc/svx/galctrl.hxx b/svx/inc/svx/galctrl.hxx index 2c40880bb275..782163aa95fd 100644 --- a/svx/inc/svx/galctrl.hxx +++ b/svx/inc/svx/galctrl.hxx @@ -37,17 +37,9 @@ #include "svx/galmisc.hxx" #include "svx/svxdllapi.h" -// ------------ -// - Forwards - -// ------------ - class GalleryTheme; class GalleryBrowser2; -// ------------------ -// - GalleryPreview - -// ------------------ - class SVX_DLLPUBLIC GalleryPreview : public Window, public DropTargetHelper, public DragSourceHelper { private: @@ -87,10 +79,6 @@ public: void PreviewMedia( const INetURLObject& rURL ); }; -// ------------------- -// - GalleryIconView - -// ------------------- - class GalleryIconView : public ValueSet, public DropTargetHelper, public DragSourceHelper { using ValueSet::StartDrag; @@ -123,10 +111,6 @@ public: ~GalleryIconView(); }; -// ------------------- -// - GalleryListView - -// ------------------- - class GalleryListView : public BrowseBox { using BrowseBox::AcceptDrop; diff --git a/svx/inc/svx/gallery.hxx b/svx/inc/svx/gallery.hxx index c160ce82d583..1bbbd226b405 100644 --- a/svx/inc/svx/gallery.hxx +++ b/svx/inc/svx/gallery.hxx @@ -26,10 +26,6 @@ #include <vector> #include "svx/svxdllapi.h" -// ----------- -// - Defines - -// ----------- - #define SGA_FORMAT_NONE 0x00000000L #define SGA_FORMAT_STRING 0x00000001L #define SGA_FORMAT_GRAPHIC 0x00000010L @@ -51,10 +47,6 @@ #define GALLERY_THEME_FONTWORK 37 #define GALLERY_THEME_FONTWORK_VERTICAL 38 -// ------------------- -// - GalleryExplorer - -// ------------------- - class Gallery; class VCDrawModel; class FmFormModel; diff --git a/svx/inc/svx/galmisc.hxx b/svx/inc/svx/galmisc.hxx index 3765e487c0e1..a40e59820ac4 100644 --- a/svx/inc/svx/galmisc.hxx +++ b/svx/inc/svx/galmisc.hxx @@ -32,16 +32,8 @@ #include <tools/date.hxx> #include <tools/time.hxx> -// ------------ -// - Forwards - -// ------------ - class GalleryTheme; -// ---------------- -// - ExchangeData - -// ---------------- - struct ExchangeData { GalleryTheme* pTheme; @@ -66,10 +58,6 @@ enum SgaObjKind SGA_OBJ_INET = 6 // graphics from the internet }; -// ----------- -// - Defines - -// ----------- - #define IV_IMAPINFO (sal_uInt32('S')*0x00000001+sal_uInt32('D')*0x00000100+sal_uInt32('U')*0x00010000+sal_uInt32('D')*0x01000000) #define ID_IMAPINFO 2 @@ -89,10 +77,6 @@ enum SgaObjKind #define GALLERY_BG_COLOR Application::GetSettings().GetStyleSettings().GetWindowColor() #define GALLERY_DLG_COLOR Application::GetSettings().GetStyleSettings().GetDialogColor() -// ------------- -// - Functions - -// ------------- - class ResMgr; class String; class SvStream; @@ -114,11 +98,6 @@ sal_Bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject sal_Bool KillFile( const INetURLObject& rURL ); BitmapEx GalleryResGetBitmapEx( sal_uInt32 nId ); - -// --------------- -// - SgaIMapInfo - -// --------------- - class SgaIMapInfo : public SdrObjUserData, public SfxListener { ImageMap aImageMap; @@ -142,10 +121,6 @@ public: const ImageMap& GetImageMap() const { return aImageMap; } }; -// ---------------------- -// - SgaUserDataFactory - -// ---------------------- - class SgaUserDataFactory { public: @@ -155,10 +130,6 @@ public: DECL_LINK( MakeUserData, SdrObjFactory* ); }; -// ------------------- -// - GalleryProgress - -// ------------------- - class GraphicFilter; class SVX_DLLPUBLIC GalleryProgress @@ -174,10 +145,6 @@ class SVX_DLLPUBLIC GalleryProgress void Update( sal_uIntPtr nVal, sal_uIntPtr nMaxVal ); }; -// ----------------------- -// - GalleryTransferable - -// ----------------------- - class Gallery; class GalleryTheme; class GraphicObject; @@ -217,10 +184,6 @@ protected: sal_Int32 nDragImage = DND_IMAGE_NONE ); }; -// --------------- -// - GalleryHint - -// --------------- - #define GALLERY_HINT_NONE 0x00000000 #define GALLERY_HINT_CLOSE_THEME 0x00000001 #define GALLERY_HINT_THEME_REMOVED 0x00000002 @@ -230,8 +193,6 @@ protected: #define GALLERY_HINT_CLOSE_OBJECT 0x00000020 #define GALLERY_HINT_OBJECT_REMOVED 0x00000040 -// ----------------------------------------------------------------------------- - class GalleryHint : public SfxHint { private: diff --git a/svx/inc/svx/svdograf.hxx b/svx/inc/svx/svdograf.hxx index 1399ca9f629a..5d663dcc3215 100644 --- a/svx/inc/svx/svdograf.hxx +++ b/svx/inc/svx/svdograf.hxx @@ -26,9 +26,6 @@ #include <svtools/grfmgr.hxx> #include "svx/svxdllapi.h" -////////////////////////////////////////////////////////////////////////////// -// predeclarations - namespace sdr { namespace properties @@ -41,21 +38,12 @@ namespace sdr } // end of namespace contact } // end of namespace sdr -// ----------- -// - Defines - -// ----------- - #define SDRGRAFOBJ_TRANSFORMATTR_NONE 0x00000000UL #define SDRGRAFOBJ_TRANSFORMATTR_COLOR 0x00000001UL #define SDRGRAFOBJ_TRANSFORMATTR_MIRROR 0x00000002UL #define SDRGRAFOBJ_TRANSFORMATTR_ROTATE 0x00000004UL #define SDRGRAFOBJ_TRANSFORMATTR_ALL 0xffffffffUL -// --------------------- -// - SdrGrafObjGeoData - -// --------------------- - -// #109872# class SdrGrafObjGeoData : public SdrTextObjGeoData { public: @@ -67,10 +55,6 @@ public: } }; -// -------------- -// - SdrGrafObj - -// -------------- - class GraphicObject; class SdrGraphicLink; diff --git a/svx/inc/svx/xoutbmp.hxx b/svx/inc/svx/xoutbmp.hxx index d33d7f34fba2..0c614b93c356 100644 --- a/svx/inc/svx/xoutbmp.hxx +++ b/svx/inc/svx/xoutbmp.hxx @@ -25,10 +25,6 @@ #include <com/sun/star/beans/PropertyValue.hpp> #include "svx/svxdllapi.h" -// ----------- -// - Defines - -// ----------- - #define XOUTBMP_MIRROR_HORZ 0x00000001L #define XOUTBMP_MIRROR_VERT 0x00000010L @@ -42,10 +38,6 @@ #define XOUTBMP_USE_GIF_IF_SENSIBLE 0x40000000L #define XOUTBMP_USE_NATIVE_IF_POSSIBLE 0x80000000L -// -------------- -// - XOutBitmap - -// -------------- - class GraphicFilter; class VirtualDevice; class INetURLObject; @@ -74,10 +66,6 @@ public: const Rectangle* pWorkRect = NULL ); }; -// ---------------- -// - DitherBitmap - -// ---------------- - SVX_DLLPUBLIC sal_Bool DitherBitmap( Bitmap& rBitmap ); #endif // _XOUTBMP_HXX diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 8577703e6a60..2a5a28416ea0 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -47,25 +47,13 @@ #include <svx/svxdlg.hxx> #include <svx/dialogs.hrc> -// ----------- -// - Defines - -// ----------- - #undef GALLERY_USE_CLIPBOARD #define TBX_ID_ICON 1 #define TBX_ID_LIST 2 -// ----------- -// - statics - -// ----------- - GalleryBrowserMode GalleryBrowser2::meInitMode = GALLERYBROWSERMODE_ICON; -// -------------------------- -// - GalleryBackgroundPopup - -// -------------------------- - class GalleryBackgroundPopup : public PopupMenu, public SfxControllerItem { const GalleryTheme* mpTheme; @@ -80,7 +68,6 @@ public: ~GalleryBackgroundPopup(); }; -// ------------------------------------------------------------------------ DBG_NAME(GalleryBackgroundPopup) GalleryBackgroundPopup::GalleryBackgroundPopup( const GalleryTheme* pTheme, sal_uIntPtr nObjectPos ) : @@ -93,15 +80,11 @@ GalleryBackgroundPopup::GalleryBackgroundPopup( const GalleryTheme* pTheme, sal_ RemoveDisabledEntries(); } -// ------------------------------------------------------------------------ - GalleryBackgroundPopup::~GalleryBackgroundPopup() { DBG_DTOR(GalleryBackgroundPopup,NULL); } -// ------------------------------------------------------------------------ - void GalleryBackgroundPopup::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pItem ) { if ( ( nSID == SID_GALLERY_BG_BRUSH ) && pItem && ( eState != SFX_ITEM_DISABLED ) ) @@ -128,8 +111,6 @@ void GalleryBackgroundPopup::StateChanged( sal_uInt16 nSID, SfxItemState eState, } } -// ------------------------------------------------------------------------ - void GalleryBackgroundPopup::Select() { Menu::Select(); @@ -144,10 +125,6 @@ void GalleryBackgroundPopup::Select() &aBrushItem, &aPosItem, &aPathItem, 0L ); } -// --------------------- -// - GalleryThemePopup - -// --------------------- - class GalleryThemePopup : public PopupMenu, public SfxControllerItem { GalleryBackgroundPopup maBackgroundPopup; @@ -163,7 +140,6 @@ public: ~GalleryThemePopup(); }; -// ------------------------------------------------------------------------ DBG_NAME(GalleryThemePopup) GalleryThemePopup::GalleryThemePopup( const GalleryTheme* pTheme, sal_uIntPtr nObjectPos, sal_Bool bPreview ) : @@ -250,15 +226,11 @@ GalleryThemePopup::GalleryThemePopup( const GalleryTheme* pTheme, sal_uIntPtr nO RemoveDisabledEntries(); } -// ------------------------------------------------------------------------ - GalleryThemePopup::~GalleryThemePopup() { DBG_DTOR(GalleryThemePopup,NULL); } -// ------------------------------------------------------------------------ - void GalleryThemePopup::StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pItem ) { if( ( nSID == SID_GALLERY_ENABLE_ADDCOPY ) && pItem && ( eState != SFX_ITEM_DISABLED ) ) @@ -272,9 +244,6 @@ void GalleryThemePopup::StateChanged( sal_uInt16 nSID, SfxItemState eState, cons } } -// ------------------ -// - GalleryToolBox - -// ------------------ DBG_NAME(GalleryToolBox) GalleryToolBox::GalleryToolBox( GalleryBrowser2* pParent ) : @@ -283,24 +252,17 @@ GalleryToolBox::GalleryToolBox( GalleryBrowser2* pParent ) : DBG_CTOR(GalleryToolBox,NULL); } -// ------------------------------------------------------------------------ - GalleryToolBox::~GalleryToolBox() { DBG_DTOR(GalleryToolBox,NULL); } -// ------------------------------------------------------------------------ - void GalleryToolBox::KeyInput( const KeyEvent& rKEvt ) { if( !static_cast< GalleryBrowser2* >( GetParent() )->KeyInput( rKEvt, this ) ) ToolBox::KeyInput( rKEvt ); } -// ------------------- -// - GalleryBrowser2 - -// ------------------- DBG_NAME(GalleryBrowser2) GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId, Gallery* pGallery ) : @@ -360,8 +322,6 @@ GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId, mpIconView->SetAccessibleRelationMemberOf(mpIconView); } -// ----------------------------------------------------------------------------- - GalleryBrowser2::~GalleryBrowser2() { maMiscOptions.RemoveListenerLink( LINK( this, GalleryBrowser2, MiscHdl ) ); @@ -376,8 +336,6 @@ GalleryBrowser2::~GalleryBrowser2() DBG_DTOR(GalleryBrowser2,NULL); } -// ----------------------------------------------------------------------------- - void GalleryBrowser2::InitSettings() { Font aInfoFont( maInfoBar.GetControlFont() ); @@ -394,8 +352,6 @@ void GalleryBrowser2::InitSettings() maSeparator.SetControlForeground( GALLERY_FG_COLOR ); } -// ----------------------------------------------------------------------------- - void GalleryBrowser2::DataChanged( const DataChangedEvent& rDCEvt ) { if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) @@ -404,8 +360,6 @@ void GalleryBrowser2::DataChanged( const DataChangedEvent& rDCEvt ) Control::DataChanged( rDCEvt ); } -// ----------------------------------------------------------------------------- - void GalleryBrowser2::Resize() { Control::Resize(); @@ -439,8 +393,6 @@ void GalleryBrowser2::Resize() } } -// ----------------------------------------------------------------------------- - void GalleryBrowser2::Notify( SfxBroadcaster&, const SfxHint& rHint ) { const GalleryHint& rGalleryHint = (const GalleryHint&) rHint; @@ -461,8 +413,6 @@ void GalleryBrowser2::Notify( SfxBroadcaster&, const SfxHint& rHint ) } } -// ----------------------------------------------------------------------------- - sal_Int8 GalleryBrowser2::AcceptDrop( DropTargetHelper& rTarget, const AcceptDropEvent& ) { sal_Int8 nRet = DND_ACTION_NONE; @@ -488,8 +438,6 @@ sal_Int8 GalleryBrowser2::AcceptDrop( DropTargetHelper& rTarget, const AcceptDro return nRet; } -// ----------------------------------------------------------------------------- - sal_Int8 GalleryBrowser2::ExecuteDrop( DropTargetHelper&, const ExecuteDropEvent& rEvt ) { sal_Int8 nRet = DND_ACTION_NONE; @@ -509,8 +457,6 @@ sal_Int8 GalleryBrowser2::ExecuteDrop( DropTargetHelper&, const ExecuteDropEvent return nRet; } -// ----------------------------------------------------------------------------- - void GalleryBrowser2::StartDrag( Window*, const Point* pDragPoint ) { if( mpCurTheme ) @@ -523,16 +469,12 @@ void GalleryBrowser2::StartDrag( Window*, const Point* pDragPoint ) } } -// ----------------------------------------------------------------------------- - void GalleryBrowser2::TogglePreview( Window*, const Point* ) { SetMode( ( GALLERYBROWSERMODE_PREVIEW != GetMode() ) ? GALLERYBROWSERMODE_PREVIEW : meLastMode ); GetViewWindow()->GrabFocus(); } -// ----------------------------------------------------------------------------- - void GalleryBrowser2::ShowContextMenu( Window*, const Point* pContextPoint ) { Point aSelPos; @@ -555,8 +497,6 @@ void GalleryBrowser2::ShowContextMenu( Window*, const Point* pContextPoint ) } } -// ----------------------------------------------------------------------------- - sal_Bool GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) { Point aSelPos; @@ -637,8 +577,6 @@ sal_Bool GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) return bRet; } -// ----------------------------------------------------------------------------- - void GalleryBrowser2::SelectTheme( const String& rThemeName ) { delete mpIconView, mpIconView = NULL; @@ -680,8 +618,6 @@ void GalleryBrowser2::SelectTheme( const String& rThemeName ) mpIconView->SetAccessibleRelationMemberOf(mpIconView); } -// ----------------------------------------------------------------------------- - void GalleryBrowser2::SetMode( GalleryBrowserMode eMode ) { if( GetMode() != eMode ) @@ -762,8 +698,6 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode ) } } -// ----------------------------------------------------------------------------- - Window* GalleryBrowser2::GetViewWindow() const { Window* pRet; @@ -781,8 +715,6 @@ Window* GalleryBrowser2::GetViewWindow() const return pRet; } -// ----------------------------------------------------------------------------- - void GalleryBrowser2::Travel( GalleryBrowserTravel eTravel ) { if( mpCurTheme ) @@ -832,8 +764,6 @@ void GalleryBrowser2::Travel( GalleryBrowserTravel eTravel ) } } -// ----------------------------------------------------------------------------- - void GalleryBrowser2::ImplUpdateViews( sal_uInt16 nSelectionId ) { mpIconView->Hide(); @@ -867,8 +797,6 @@ void GalleryBrowser2::ImplUpdateViews( sal_uInt16 nSelectionId ) ImplUpdateInfoBar(); } -// ----------------------------------------------------------------------------- - void GalleryBrowser2::ImplUpdateInfoBar() { String aInfoText; @@ -900,8 +828,6 @@ void GalleryBrowser2::ImplUpdateInfoBar() maInfoBar.SetText( aInfoText ); } -// ----------------------------------------------------------------------------- - sal_uIntPtr GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point& rSelPos ) { const Size aOutputSizePixel( GetOutputSizePixel() ); @@ -954,8 +880,6 @@ sal_uIntPtr GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point& return nRet; } -// ----------------------------------------------------------------------------- - void GalleryBrowser2::ImplSelectItemId( sal_uIntPtr nItemId ) { if( nItemId ) @@ -966,8 +890,6 @@ void GalleryBrowser2::ImplSelectItemId( sal_uIntPtr nItemId ) } } -// ----------------------------------------------------------------------------- - void GalleryBrowser2::ImplExecute( sal_uInt16 nId ) { Point aSelPos; @@ -1095,8 +1017,6 @@ void GalleryBrowser2::ImplExecute( sal_uInt16 nId ) } } -// ----------------------------------------------------------------------------- - String GalleryBrowser2::GetItemText( const GalleryTheme& rTheme, const SgaObject& rObj, sal_uIntPtr nItemTextFlags ) { String aRet; @@ -1141,8 +1061,6 @@ String GalleryBrowser2::GetItemText( const GalleryTheme& rTheme, const SgaObject return aRet; } -// ----------------------------------------------------------------------------- - INetURLObject GalleryBrowser2::GetURL() const { INetURLObject aURL; @@ -1153,8 +1071,6 @@ INetURLObject GalleryBrowser2::GetURL() const return aURL; } -// ----------------------------------------------------------------------------- - String GalleryBrowser2::GetFilterName() const { String aFilterName; @@ -1177,8 +1093,6 @@ String GalleryBrowser2::GetFilterName() const return aFilterName; } -// ----------------------------------------------------------------------------- - Graphic GalleryBrowser2::GetGraphic() const { Graphic aGraphic; @@ -1189,15 +1103,11 @@ Graphic GalleryBrowser2::GetGraphic() const return aGraphic; } -// ----------------------------------------------------------------------------- - sal_Bool GalleryBrowser2::IsLinkage() const { return mbCurActionIsLinkage; } -// ----------------------------------------------------------------------------- - IMPL_LINK( GalleryBrowser2, MenuSelectHdl, Menu*, pMenu ) { if( pMenu ) @@ -1206,16 +1116,12 @@ IMPL_LINK( GalleryBrowser2, MenuSelectHdl, Menu*, pMenu ) return 0; } -// ----------------------------------------------------------------------------- - IMPL_LINK_NOARG(GalleryBrowser2, SelectObjectHdl) { ImplUpdateInfoBar(); return 0L; } -// ----------------------------------------------------------------------------- - IMPL_LINK( GalleryBrowser2, SelectTbxHdl, ToolBox*, pBox ) { if( pBox->GetCurItemId() == TBX_ID_ICON ) @@ -1226,8 +1132,6 @@ IMPL_LINK( GalleryBrowser2, SelectTbxHdl, ToolBox*, pBox ) return 0L; } -// ----------------------------------------------------------------------------- - IMPL_LINK_NOARG(GalleryBrowser2, MiscHdl) { maViewBox.SetOutStyle( maMiscOptions.GetToolboxStyle() ); diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 3645384534f3..c6cc85839a0c 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -34,16 +34,9 @@ #include "gallery.hrc" #include <vcl/graphicfilter.hxx> -// ----------- -// - Defines - -// ----------- - #define GALLERY_BRWBOX_TITLE 1 #define GALLERY_BRWBOX_PATH 2 -// ------------------ -// - GalleryPreview - -// ------------------ DBG_NAME(GalleryPreview) GalleryPreview::GalleryPreview( GalleryBrowser2* pParent, GalleryTheme* pTheme ) : @@ -58,8 +51,6 @@ GalleryPreview::GalleryPreview( GalleryBrowser2* pParent, GalleryTheme* pTheme ) InitSettings(); } -// ------------------------------------------------------------------------ - GalleryPreview::GalleryPreview( Window* pParent, const ResId & rResId ) : Window( pParent, rResId ), DropTargetHelper( this ), @@ -72,8 +63,6 @@ GalleryPreview::GalleryPreview( Window* pParent, const ResId & rResId ) : InitSettings(); } -// ------------------------------------------------------------------------ - GalleryPreview::~GalleryPreview() { DBG_DTOR(GalleryPreview,NULL); @@ -101,8 +90,6 @@ bool GalleryPreview::SetGraphic( const INetURLObject& _aURL ) return bRet; } -// ------------------------------------------------------------------------ - void GalleryPreview::InitSettings() { SetBackground( Wallpaper( GALLERY_BG_COLOR ) ); @@ -110,8 +97,6 @@ void GalleryPreview::InitSettings() SetControlForeground( GALLERY_FG_COLOR ); } -// ----------------------------------------------------------------------- - void GalleryPreview::DataChanged( const DataChangedEvent& rDCEvt ) { if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) @@ -120,8 +105,6 @@ void GalleryPreview::DataChanged( const DataChangedEvent& rDCEvt ) Window::DataChanged( rDCEvt ); } -// ------------------------------------------------------------------------ - sal_Bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const { const Size aWinSize( GetOutputSizePixel() ); @@ -155,8 +138,6 @@ sal_Bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rect return bRet; } -// ------------------------------------------------------------------------ - void GalleryPreview::Paint( const Rectangle& rRect ) { Window::Paint( rRect ); @@ -173,16 +154,12 @@ void GalleryPreview::Paint( const Rectangle& rRect ) } } -// ------------------------------------------------------------------------ - void GalleryPreview::MouseButtonDown( const MouseEvent& rMEvt ) { if( mpTheme && ( rMEvt.GetClicks() == 2 ) ) ( (GalleryBrowser2*) GetParent() )->TogglePreview( this ); } -// ------------------------------------------------------------------------ - void GalleryPreview::Command(const CommandEvent& rCEvt ) { Window::Command( rCEvt ); @@ -192,8 +169,6 @@ void GalleryPreview::Command(const CommandEvent& rCEvt ) ( rCEvt.IsMouseEvent() ? &rCEvt.GetMousePosPixel() : NULL ) ); } -// ------------------------------------------------------------------------ - void GalleryPreview::KeyInput( const KeyEvent& rKEvt ) { if( mpTheme ) @@ -236,8 +211,6 @@ void GalleryPreview::KeyInput( const KeyEvent& rKEvt ) Window::KeyInput( rKEvt ); } -// ------------------------------------------------------------------------ - sal_Int8 GalleryPreview::AcceptDrop( const AcceptDropEvent& rEvt ) { sal_Int8 nRet; @@ -250,8 +223,6 @@ sal_Int8 GalleryPreview::AcceptDrop( const AcceptDropEvent& rEvt ) return nRet; } -// ------------------------------------------------------------------------ - sal_Int8 GalleryPreview::ExecuteDrop( const ExecuteDropEvent& rEvt ) { sal_Int8 nRet; @@ -264,16 +235,12 @@ sal_Int8 GalleryPreview::ExecuteDrop( const ExecuteDropEvent& rEvt ) return nRet; } -// ------------------------------------------------------------------------ - void GalleryPreview::StartDrag( sal_Int8, const Point& ) { if( mpTheme ) ( (GalleryBrowser2*) GetParent() )->StartDrag( this ); } -// ------------------------------------------------------------------------ - void GalleryPreview::PreviewMedia( const INetURLObject& rURL ) { if( rURL.GetProtocol() != INET_PROT_NOT_VALID ) @@ -291,11 +258,6 @@ void GalleryPreview::PreviewMedia( const INetURLObject& rURL ) } } -// ------------------------------------------------------------------------ - -// ------------------- -// - GalleryIconView - -// ------------------- DBG_NAME(GalleryIconView) GalleryIconView::GalleryIconView( GalleryBrowser2* pParent, GalleryTheme* pTheme ) : @@ -315,15 +277,11 @@ GalleryIconView::GalleryIconView( GalleryBrowser2* pParent, GalleryTheme* pTheme SetItemHeight( S_THUMB + 6 ); } -// ------------------------------------------------------------------------ - GalleryIconView::~GalleryIconView() { DBG_DTOR(GalleryIconView,NULL); } -// ------------------------------------------------------------------------ - void GalleryIconView::InitSettings() { SetBackground( Wallpaper( GALLERY_BG_COLOR ) ); @@ -332,8 +290,6 @@ void GalleryIconView::InitSettings() SetColor( GALLERY_BG_COLOR ); } -// ----------------------------------------------------------------------- - void GalleryIconView::DataChanged( const DataChangedEvent& rDCEvt ) { if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) @@ -342,8 +298,6 @@ void GalleryIconView::DataChanged( const DataChangedEvent& rDCEvt ) ValueSet::DataChanged( rDCEvt ); } -// ------------------------------------------------------------------------ - void GalleryIconView::UserDraw( const UserDrawEvent& rUDEvt ) { const sal_uInt16 nId = rUDEvt.GetItemId(); @@ -407,8 +361,6 @@ void GalleryIconView::UserDraw( const UserDrawEvent& rUDEvt ) } } -// ------------------------------------------------------------------------ - void GalleryIconView::MouseButtonDown( const MouseEvent& rMEvt ) { ValueSet::MouseButtonDown( rMEvt ); @@ -417,8 +369,6 @@ void GalleryIconView::MouseButtonDown( const MouseEvent& rMEvt ) ( (GalleryBrowser2*) GetParent() )->TogglePreview( this, &rMEvt.GetPosPixel() ); } -// ------------------------------------------------------------------------ - void GalleryIconView::Command( const CommandEvent& rCEvt ) { ValueSet::Command( rCEvt ); @@ -430,30 +380,22 @@ void GalleryIconView::Command( const CommandEvent& rCEvt ) } } -// ------------------------------------------------------------------------ - void GalleryIconView::KeyInput( const KeyEvent& rKEvt ) { if( !mpTheme || !static_cast< GalleryBrowser2* >( GetParent() )->KeyInput( rKEvt, this ) ) ValueSet::KeyInput( rKEvt ); } -// ------------------------------------------------------------------------ - sal_Int8 GalleryIconView::AcceptDrop( const AcceptDropEvent& rEvt ) { return( static_cast< GalleryBrowser2* >( GetParent() )->AcceptDrop( *this, rEvt ) ); } -// ------------------------------------------------------------------------ - sal_Int8 GalleryIconView::ExecuteDrop( const ExecuteDropEvent& rEvt ) { return( static_cast< GalleryBrowser2* >( GetParent() )->ExecuteDrop( *this, rEvt ) ); } -// ------------------------------------------------------------------------ - void GalleryIconView::StartDrag( sal_Int8, const Point& ) { const CommandEvent aEvt( GetPointerPosPixel(), COMMAND_STARTDRAG, sal_True ); @@ -464,9 +406,6 @@ void GalleryIconView::StartDrag( sal_Int8, const Point& ) static_cast< GalleryBrowser2* >( GetParent() )->StartDrag( this ); } -// ------------------- -// - GalleryListView - -// ------------------- DBG_NAME(GalleryListView) GalleryListView::GalleryListView( GalleryBrowser2* pParent, GalleryTheme* pTheme ) : @@ -486,15 +425,11 @@ GalleryListView::GalleryListView( GalleryBrowser2* pParent, GalleryTheme* pTheme InsertDataColumn( GALLERY_BRWBOX_PATH, GAL_RESSTR(RID_SVXSTR_GALLERY_PATH), 256 ); } -// ------------------------------------------------------------------------ - GalleryListView::~GalleryListView() { DBG_DTOR(GalleryListView,NULL); } -// ------------------------------------------------------------------------ - void GalleryListView::InitSettings() { SetBackground( Wallpaper( GALLERY_BG_COLOR ) ); @@ -502,8 +437,6 @@ void GalleryListView::InitSettings() SetControlForeground( GALLERY_FG_COLOR ); } -// ----------------------------------------------------------------------- - void GalleryListView::DataChanged( const DataChangedEvent& rDCEvt ) { if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) ) @@ -512,16 +445,12 @@ void GalleryListView::DataChanged( const DataChangedEvent& rDCEvt ) BrowseBox::DataChanged( rDCEvt ); } -// ------------------------------------------------------------------------ - sal_Bool GalleryListView::SeekRow( long nRow ) { mnCurRow = nRow; return sal_True; } -// ----------------------------------------------------------------------------- - String GalleryListView::GetCellText(long _nRow, sal_uInt16 nColumnId) const { String sRet; @@ -541,8 +470,6 @@ String GalleryListView::GetCellText(long _nRow, sal_uInt16 nColumnId) const return sRet; } -// ----------------------------------------------------------------------------- - Rectangle GalleryListView::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) { DBG_ASSERT(_nColumnPos >= 0 && _nColumnPos <= USHRT_MAX, "GalleryListView::GetFieldCharacterBounds: _nColumnId overflow"); @@ -560,8 +487,6 @@ Rectangle GalleryListView::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nC return aRect; } -// ----------------------------------------------------------------------------- - sal_Int32 GalleryListView::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint) { DBG_ASSERT(_nColumnPos >= 0 && _nColumnPos <= USHRT_MAX, "GalleryListView::GetFieldIndexAtPoint: _nColumnId overflow"); @@ -575,8 +500,6 @@ sal_Int32 GalleryListView::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColu return nRet; } -// ------------------------------------------------------------------------ - void GalleryListView::PaintField( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const { rDev.Push( PUSH_CLIPREGION ); @@ -645,8 +568,6 @@ void GalleryListView::PaintField( OutputDevice& rDev, const Rectangle& rRect, sa rDev.Pop(); } -// ------------------------------------------------------------------------ - void GalleryListView::Command( const CommandEvent& rCEvt ) { BrowseBox::Command( rCEvt ); @@ -662,16 +583,12 @@ void GalleryListView::Command( const CommandEvent& rCEvt ) } } -// ------------------------------------------------------------------------ - void GalleryListView::KeyInput( const KeyEvent& rKEvt ) { if( !mpTheme || !static_cast< GalleryBrowser2* >( GetParent() )->KeyInput( rKEvt, this ) ) BrowseBox::KeyInput( rKEvt ); } -// ------------------------------------------------------------------------ - void GalleryListView::DoubleClick( const BrowserMouseEvent& rEvt ) { BrowseBox::DoubleClick( rEvt ); @@ -680,16 +597,12 @@ void GalleryListView::DoubleClick( const BrowserMouseEvent& rEvt ) ( (GalleryBrowser2*) GetParent() )->TogglePreview( this, &rEvt.GetPosPixel() ); } -// ------------------------------------------------------------------------ - void GalleryListView::Select() { if( maSelectHdl.IsSet() ) maSelectHdl.Call( this ); } -// ------------------------------------------------------------------------ - sal_Int8 GalleryListView::AcceptDrop( const BrowserAcceptDropEvent& ) { sal_Int8 nRet = DND_ACTION_NONE; @@ -700,8 +613,6 @@ sal_Int8 GalleryListView::AcceptDrop( const BrowserAcceptDropEvent& ) return nRet; } -// ------------------------------------------------------------------------ - sal_Int8 GalleryListView::ExecuteDrop( const BrowserExecuteDropEvent& rEvt ) { ExecuteDropEvent aEvt( rEvt ); @@ -711,8 +622,6 @@ sal_Int8 GalleryListView::ExecuteDrop( const BrowserExecuteDropEvent& rEvt ) return( ( (GalleryBrowser2*) GetParent() )->ExecuteDrop( *this, aEvt ) ); } -// ------------------------------------------------------------------------ - void GalleryListView::StartDrag( sal_Int8, const Point& rPosPixel ) { ( (GalleryBrowser2*) GetParent() )->StartDrag( this, &rPosPixel ); diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index c9622d1ca5e2..a32cad756868 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -65,18 +65,8 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::io; -// ----------- -// - Defines - -// ----------- - #define SWAPGRAPHIC_TIMEOUT 5000 - -// ------------------ -// - SdrGraphicLink - -// ------------------ - - const Graphic ImpLoadLinkedGraphic( const String aFileName, const String aFilterName ) { Graphic aGraphic; @@ -194,8 +184,6 @@ void SAL_CALL SdrGraphicUpdater::run(void) } } -// ----------------------------------------------------------------------------- - SdrGraphicLink::SdrGraphicLink(SdrGrafObj* pObj) : ::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SOT_FORMATSTR_ID_SVXB ) , pGrafObj( pObj ) @@ -204,30 +192,22 @@ SdrGraphicLink::SdrGraphicLink(SdrGrafObj* pObj) SetSynchron( false ); } -// ----------------------------------------------------------------------------- - SdrGraphicLink::~SdrGraphicLink() { if ( pGraphicUpdater ) pGraphicUpdater->Terminate(); } -// ----------------------------------------------------------------------------- - void SdrGraphicLink::DataChanged( const Graphic& rGraphic ) { pGrafObj->ImpSetLinkedGraphic( rGraphic ); } -// ----------------------------------------------------------------------------- - void SdrGraphicLink::RemoveGraphicUpdater() { pGraphicUpdater = NULL; } -// ----------------------------------------------------------------------------- - ::sfx2::SvBaseLink::UpdateResult SdrGraphicLink::DataChanged( const String& rMimeType, const ::com::sun::star::uno::Any & rValue ) { @@ -253,8 +233,6 @@ void SdrGraphicLink::RemoveGraphicUpdater() return SUCCESS; } -// ----------------------------------------------------------------------------- - void SdrGraphicLink::Closed() { // close connection; set pLink of the object to NULL, as link instance is just about getting destructed. @@ -264,8 +242,6 @@ void SdrGraphicLink::Closed() SvBaseLink::Closed(); } -// ----------------------------------------------------------------------------- - void SdrGraphicLink::UpdateAsynchron() { if( GetObj() ) @@ -283,13 +259,6 @@ void SdrGraphicLink::UpdateAsynchron() } } -// -------------- -// - SdrGrafObj - -// -------------- - -////////////////////////////////////////////////////////////////////////////// -// BaseProperties section - sdr::properties::BaseProperties* SdrGrafObj::CreateObjectSpecificProperties() { return new sdr::properties::GraphicProperties(*this); @@ -355,12 +324,8 @@ void SdrGrafObj::onGraphicChanged() } } -////////////////////////////////////////////////////////////////////////////// - TYPEINIT1(SdrGrafObj,SdrRectObj); -// ----------------------------------------------------------------------------- - SdrGrafObj::SdrGrafObj() : SdrRectObj(), pGraphicLink ( NULL ), @@ -385,8 +350,6 @@ SdrGrafObj::SdrGrafObj() mbSupportTextIndentingOnLineWidthChange = false; } -// ----------------------------------------------------------------------------- - SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect) : SdrRectObj ( rRect ), pGraphicLink ( NULL ), @@ -411,8 +374,6 @@ SdrGrafObj::SdrGrafObj(const Graphic& rGrf, const Rectangle& rRect) mbSupportTextIndentingOnLineWidthChange = false; } -// ----------------------------------------------------------------------------- - SdrGrafObj::SdrGrafObj( const Graphic& rGrf ) : SdrRectObj(), pGraphicLink ( NULL ), @@ -437,8 +398,6 @@ SdrGrafObj::SdrGrafObj( const Graphic& rGrf ) mbSupportTextIndentingOnLineWidthChange = false; } -// ----------------------------------------------------------------------------- - SdrGrafObj::~SdrGrafObj() { delete pGraphic; @@ -446,8 +405,6 @@ SdrGrafObj::~SdrGrafObj() ImpLinkAbmeldung(); } -// ----------------------------------------------------------------------------- - void SdrGrafObj::SetGraphicObject( const GraphicObject& rGrfObj ) { *pGraphic = rGrfObj; @@ -461,8 +418,6 @@ void SdrGrafObj::SetGraphicObject( const GraphicObject& rGrfObj ) onGraphicChanged(); } -// ----------------------------------------------------------------------------- - const GraphicObject& SdrGrafObj::GetGraphicObject(bool bForceSwapIn) const { if(bForceSwapIn) @@ -488,8 +443,6 @@ const GraphicObject* SdrGrafObj::GetReplacementGraphicObject() const return mpReplacementGraphic; } -// ----------------------------------------------------------------------------- - void SdrGrafObj::NbcSetGraphic( const Graphic& rGrf ) { pGraphic->SetGraphic( rGrf ); @@ -507,16 +460,12 @@ void SdrGrafObj::SetGraphic( const Graphic& rGrf ) BroadcastObjectChange(); } -// ----------------------------------------------------------------------------- - const Graphic& SdrGrafObj::GetGraphic() const { ForceSwapIn(); return pGraphic->GetGraphic(); } -// ----------------------------------------------------------------------------- - Graphic SdrGrafObj::GetTransformedGraphic( sal_uIntPtr nTransformFlags ) const { // Refactored most of the code to GraphicObject, where @@ -557,8 +506,6 @@ Graphic SdrGrafObj::GetTransformedGraphic( sal_uIntPtr nTransformFlags ) const return GetGraphicObject().GetTransformedGraphic( aDestSize, aDestMap, aActAttr ); } -// ----------------------------------------------------------------------------- - GraphicType SdrGrafObj::GetGraphicType() const { return pGraphic->GetType(); @@ -589,8 +536,6 @@ const Size& SdrGrafObj::GetGrafPrefSize() const return pGraphic->GetPrefSize(); } -// ----------------------------------------------------------------------------- - void SdrGrafObj::SetGrafStreamURL( const String& rGraphicStreamURL ) { mbIsPreview = false; @@ -608,15 +553,11 @@ void SdrGrafObj::SetGrafStreamURL( const String& rGraphicStreamURL ) } } -// ----------------------------------------------------------------------------- - String SdrGrafObj::GetGrafStreamURL() const { return pGraphic->GetUserData(); } -// ----------------------------------------------------------------------------- - void SdrGrafObj::ForceSwapIn() const { if( mbIsPreview ) @@ -646,15 +587,11 @@ void SdrGrafObj::ForceSwapIn() const } } -// ----------------------------------------------------------------------------- - void SdrGrafObj::ForceSwapOut() const { pGraphic->FireSwapOutRequest(); } -// ----------------------------------------------------------------------------- - void SdrGrafObj::ImpLinkAnmeldung() { sfx2::LinkManager* pLinkManager = pModel != NULL ? pModel->GetLinkManager() : NULL; @@ -671,8 +608,6 @@ void SdrGrafObj::ImpLinkAnmeldung() } } -// ----------------------------------------------------------------------------- - void SdrGrafObj::ImpLinkAbmeldung() { sfx2::LinkManager* pLinkManager = pModel != NULL ? pModel->GetLinkManager() : NULL; @@ -685,8 +620,6 @@ void SdrGrafObj::ImpLinkAbmeldung() } } -// ----------------------------------------------------------------------------- - void SdrGrafObj::SetGraphicLink(const rtl::OUString& rFileName, const String& rFilterName) { ImpLinkAbmeldung(); @@ -699,8 +632,6 @@ void SdrGrafObj::SetGraphicLink(const rtl::OUString& rFileName, const String& rF pGraphic->SetSwapState(); } -// ----------------------------------------------------------------------------- - void SdrGrafObj::ReleaseGraphicLink() { ImpLinkAbmeldung(); @@ -723,8 +654,6 @@ const rtl::OUString& SdrGrafObj::GetFilterName() const return aFilterName; } -// ----------------------------------------------------------------------------- - void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const { bool bAnim = pGraphic->IsAnimated(); @@ -754,15 +683,11 @@ void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary()); } -// ----------------------------------------------------------------------------- - sal_uInt16 SdrGrafObj::GetObjIdentifier() const { return sal_uInt16( OBJ_GRAF ); } -// ----------------------------------------------------------------------------- - /* The graphic of the GraphicLink will be loaded. If it is called with bAsynchron = true then the graphic will be set later via DataChanged */ @@ -780,8 +705,6 @@ bool SdrGrafObj::ImpUpdateGraphicLink( bool bAsynchron ) const return bRet; } -// ----------------------------------------------------------------------------- - void SdrGrafObj::ImpSetLinkedGraphic( const Graphic& rGraphic ) { const sal_Bool bIsChanged = GetModel()->IsChanged(); @@ -791,8 +714,6 @@ void SdrGrafObj::ImpSetLinkedGraphic( const Graphic& rGraphic ) GetModel()->SetChanged( bIsChanged ); } -// ----------------------------------------------------------------------------- - void SdrGrafObj::TakeObjNameSingul(XubString& rName) const { if(pGraphic) @@ -842,8 +763,6 @@ void SdrGrafObj::TakeObjNameSingul(XubString& rName) const } } -// ----------------------------------------------------------------------------- - void SdrGrafObj::TakeObjNamePlural( XubString& rName ) const { if(pGraphic) @@ -893,8 +812,6 @@ void SdrGrafObj::TakeObjNamePlural( XubString& rName ) const } } -// ----------------------------------------------------------------------------- - SdrObject* SdrGrafObj::getFullDragClone() const { // call parent @@ -937,9 +854,6 @@ SdrGrafObj& SdrGrafObj::operator=( const SdrGrafObj& rObj ) return *this; } -// ----------------------------------------------------------------------------- -// #i25616# - basegfx::B2DPolyPolygon SdrGrafObj::TakeXorPoly() const { if(mbInsidePaint) @@ -966,22 +880,16 @@ basegfx::B2DPolyPolygon SdrGrafObj::TakeXorPoly() const } } -// ----------------------------------------------------------------------------- - sal_uInt32 SdrGrafObj::GetHdlCount() const { return 8L; } -// ----------------------------------------------------------------------------- - SdrHdl* SdrGrafObj::GetHdl(sal_uInt32 nHdlNum) const { return SdrRectObj::GetHdl( nHdlNum + 1L ); } -// ----------------------------------------------------------------------------- - void SdrGrafObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { SdrRectObj::NbcResize( rRef, xFact, yFact ); @@ -993,52 +901,38 @@ void SdrGrafObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract bMirrored = !bMirrored; } -// ----------------------------------------------------------------------------- - void SdrGrafObj::NbcRotate(const Point& rRef, long nWink, double sn, double cs) { SdrRectObj::NbcRotate(rRef,nWink,sn,cs); } -// ----------------------------------------------------------------------------- - void SdrGrafObj::NbcMirror(const Point& rRef1, const Point& rRef2) { SdrRectObj::NbcMirror(rRef1,rRef2); bMirrored = !bMirrored; } -// ----------------------------------------------------------------------------- - void SdrGrafObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVShear) { // #i118485# Call Shear now, old version redirected to rotate SdrRectObj::NbcShear(rRef, nWink, tn, bVShear); } -// ----------------------------------------------------------------------------- - void SdrGrafObj::NbcSetSnapRect(const Rectangle& rRect) { SdrRectObj::NbcSetSnapRect(rRect); } -// ----------------------------------------------------------------------------- - void SdrGrafObj::NbcSetLogicRect( const Rectangle& rRect) { SdrRectObj::NbcSetLogicRect(rRect); } -// ----------------------------------------------------------------------------- - SdrObjGeoData* SdrGrafObj::NewGeoData() const { return new SdrGrafObjGeoData; } -// ----------------------------------------------------------------------------- - void SdrGrafObj::SaveGeoData(SdrObjGeoData& rGeo) const { SdrRectObj::SaveGeoData(rGeo); @@ -1046,8 +940,6 @@ void SdrGrafObj::SaveGeoData(SdrObjGeoData& rGeo) const rGGeo.bMirrored=bMirrored; } -// ----------------------------------------------------------------------------- - void SdrGrafObj::RestGeoData(const SdrObjGeoData& rGeo) { SdrRectObj::RestGeoData(rGeo); @@ -1055,8 +947,6 @@ void SdrGrafObj::RestGeoData(const SdrObjGeoData& rGeo) bMirrored=rGGeo.bMirrored; } -// ----------------------------------------------------------------------------- - void SdrGrafObj::SetPage( SdrPage* pNewPage ) { bool bRemove = pNewPage == NULL && pPage != NULL; @@ -1078,8 +968,6 @@ void SdrGrafObj::SetPage( SdrPage* pNewPage ) ImpLinkAnmeldung(); } -// ----------------------------------------------------------------------------- - void SdrGrafObj::SetModel( SdrModel* pNewModel ) { bool bChg = pNewModel != pModel; @@ -1103,22 +991,16 @@ void SdrGrafObj::SetModel( SdrModel* pNewModel ) ImpLinkAnmeldung(); } -// ----------------------------------------------------------------------------- - void SdrGrafObj::StartAnimation( OutputDevice* /*pOutDev*/, const Point& /*rPoint*/, const Size& /*rSize*/, long /*nExtraData*/) { SetGrafAnimationAllowed(true); } -// ----------------------------------------------------------------------------- - bool SdrGrafObj::HasGDIMetaFile() const { return( pGraphic->GetType() == GRAPHIC_GDIMETAFILE ); } -// ----------------------------------------------------------------------------- - bool SdrGrafObj::isEmbeddedSvg() const { return GRAPHIC_BITMAP == GetGraphicType() && GetGraphic().getSvgData().get(); @@ -1289,8 +1171,6 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(sal_Bool bBezier, bool bAddText ) cons return pRetval; } -// ----------------------------------------------------------------------------- - void SdrGrafObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { SetXPolyDirty(); @@ -1329,8 +1209,6 @@ void SdrGrafObj::ImpSetAttrToGrafInfo() SetRectsDirty(); } -// ----------------------------------------------------------------------------- - void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly ) { Size aSize; @@ -1381,8 +1259,6 @@ void SdrGrafObj::AdjustToMaxRect( const Rectangle& rMaxRect, bool bShrinkOnly ) } } -// ----------------------------------------------------------------------------- - IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO ) { SvStream* pRet = GRFMGR_AUTOSWAPSTREAM_NONE; @@ -1490,8 +1366,6 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO ) return (long)(void*) pRet; } -// ----------------------------------------------------------------------------- - void SdrGrafObj::SetGrafAnimationAllowed(bool bNew) { if(mbGrafAnimationAllowed != bNew) diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 8e23dc80ed34..86e5c5e17942 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -52,7 +52,6 @@ #include "svx/grafctrl.hxx" #include "svx/tbxcolor.hxx" -// namespaces using ::rtl::OUString; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; @@ -61,45 +60,29 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; #include <svx/svxdlg.hxx> -// ----------- -// - Defines - -// ----------- #define SYMBOL_TO_FIELD_OFFSET 4 #define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue() #define TOOLBOX_NAME ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "colorbar" ) ) -// ---------------- -// - TbxImageItem - -// ---------------- - TYPEINIT1_AUTOFACTORY( TbxImageItem, SfxUInt16Item ); -//--------------------------------------------------------- - TbxImageItem::TbxImageItem( sal_uInt16 _nWhich, sal_uInt16 nImage ) : SfxUInt16Item( _nWhich, nImage ) { } -//--------------------------------------------------------- SfxPoolItem* TbxImageItem::Clone( SfxItemPool* ) const { return new TbxImageItem( *this ); } -//--------------------------------------------------------- - int TbxImageItem::operator==( const SfxPoolItem& rItem ) const { return( ( (TbxImageItem&) rItem ).GetValue() == GetValue() ); } -// ----------------------- -// - ImplGrafMetricField - -// ----------------------- - class ImplGrafMetricField : public MetricField { using Window::Update; @@ -124,8 +107,6 @@ public: const OUString& GetCommand() const { return maCommand; } }; -// ----------------------------------------------------------------------------- - ImplGrafMetricField::ImplGrafMetricField( Window* pParent, const rtl::OUString& rCmd, const Reference< XFrame >& rFrame ) : MetricField( pParent, WB_BORDER | WB_SPIN | WB_REPEAT | WB_3DLOOK ), maCommand( rCmd ), @@ -165,21 +146,15 @@ ImplGrafMetricField::ImplGrafMetricField( Window* pParent, const rtl::OUString& maTimer.SetTimeoutHdl( LINK( this, ImplGrafMetricField, ImplModifyHdl ) ); } -// ----------------------------------------------------------------------------- - ImplGrafMetricField::~ImplGrafMetricField() { } -// ----------------------------------------------------------------------------- - void ImplGrafMetricField::Modify() { maTimer.Start(); } -// ----------------------------------------------------------------------------- - IMPL_LINK_NOARG(ImplGrafMetricField, ImplModifyHdl) { const sal_Int64 nVal = GetValue(); @@ -212,8 +187,6 @@ IMPL_LINK_NOARG(ImplGrafMetricField, ImplModifyHdl) return 0L; } -// ----------------------------------------------------------------------------- - void ImplGrafMetricField::Update( const SfxPoolItem* pItem ) { if( pItem ) @@ -233,10 +206,6 @@ void ImplGrafMetricField::Update( const SfxPoolItem* pItem ) SetText( OUString() ); } -// -------------------- -// - ImplGrafControl - -// -------------------- - struct CommandToRID { const char* pCommand; @@ -273,8 +242,6 @@ static sal_uInt16 ImplGetRID( const OUString& aCommand ) return nRID; } -// ----------------------------------------------------------------------------- - class ImplGrafControl : public Control { using Window::Update; @@ -295,8 +262,6 @@ public: void SetText( const OUString& rStr ) { maField.SetText( rStr ); } }; -// ----------------------------------------------------------------------------- - ImplGrafControl::ImplGrafControl( Window* pParent, const rtl::OUString& rCmd, @@ -337,23 +302,15 @@ ImplGrafControl::ImplGrafControl( maField.Show(); } -// ----------------------------------------------------------------------------- - ImplGrafControl::~ImplGrafControl() { } -// ----------------------------------------------------------------------------- - void ImplGrafControl::GetFocus() { maField.GrabFocus(); } -// ----------------------- -// - ImplGrafModeControl - -// ----------------------- - class ImplGrafModeControl : public ListBox { using Window::Update; @@ -374,8 +331,6 @@ public: void Update( const SfxPoolItem* pItem ); }; -// ----------------------------------------------------------------------------- - ImplGrafModeControl::ImplGrafModeControl( Window* pParent, const Reference< XFrame >& rFrame ) : ListBox( pParent, WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL ), mnCurPos( 0 ), @@ -391,14 +346,10 @@ ImplGrafModeControl::ImplGrafModeControl( Window* pParent, const Reference< XFra Show(); } -// ----------------------------------------------------------------------- - ImplGrafModeControl::~ImplGrafModeControl() { } -// ----------------------------------------------------------------------- - void ImplGrafModeControl::Select() { if ( !IsTravelSelect() ) @@ -419,8 +370,6 @@ void ImplGrafModeControl::Select() } } -// ----------------------------------------------------------------------- - long ImplGrafModeControl::PreNotify( NotifyEvent& rNEvt ) { sal_uInt16 nType = rNEvt.GetType(); @@ -431,8 +380,6 @@ long ImplGrafModeControl::PreNotify( NotifyEvent& rNEvt ) return ListBox::PreNotify( rNEvt ); } -// ----------------------------------------------------------------------- - long ImplGrafModeControl::Notify( NotifyEvent& rNEvt ) { long nHandled = ListBox::Notify( rNEvt ); @@ -463,8 +410,6 @@ long ImplGrafModeControl::Notify( NotifyEvent& rNEvt ) return nHandled; } -// ----------------------------------------------------------------------- - void ImplGrafModeControl::ImplReleaseFocus() { if( SfxViewShell::Current() ) @@ -476,8 +421,6 @@ void ImplGrafModeControl::ImplReleaseFocus() } } -// ----------------------------------------------------------------------- - void ImplGrafModeControl::Update( const SfxPoolItem* pItem ) { if( pItem ) @@ -486,14 +429,8 @@ void ImplGrafModeControl::Update( const SfxPoolItem* pItem ) SetNoSelection(); } -// ------------------------------- -// - SvxGrafFilterToolBoxControl - -// ------------------------------- - SFX_IMPL_TOOLBOX_CONTROL( SvxGrafFilterToolBoxControl, TbxImageItem ); -// ----------------------------------------------------------------------------- - SvxGrafFilterToolBoxControl::SvxGrafFilterToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { @@ -501,28 +438,20 @@ SvxGrafFilterToolBoxControl::SvxGrafFilterToolBoxControl( sal_uInt16 nSlotId, sa rTbx.Invalidate(); } -// ----------------------------------------------------------------------------- - SvxGrafFilterToolBoxControl::~SvxGrafFilterToolBoxControl() { } -// ----------------------------------------------------------------------------- - void SvxGrafFilterToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* ) { GetToolBox().EnableItem( GetId(), ( eState != SFX_ITEM_DISABLED ) ); } -// ----------------------------------------------------------------------------- - SfxPopupWindowType SvxGrafFilterToolBoxControl::GetPopupWindowType() const { return SFX_POPUPWINDOW_ONCLICK; } -// ----------------------------------------------------------------------------- - SfxPopupWindow* SvxGrafFilterToolBoxControl::CreatePopupWindow() { rtl::OUString aSubTbxResName( @@ -532,12 +461,6 @@ SfxPopupWindow* SvxGrafFilterToolBoxControl::CreatePopupWindow() return NULL; } -// ------------------------- -// - SvxGrafToolBoxControl - -// ------------------------- - -// ----------------------------------------------------------------------------- - SvxGrafToolBoxControl::SvxGrafToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx) : SfxToolBoxControl( nSlotId, nId, rTbx ) { @@ -545,14 +468,10 @@ SvxGrafToolBoxControl::SvxGrafToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId rTbx.Invalidate(); } -// ----------------------------------------------------------------------------- - SvxGrafToolBoxControl::~SvxGrafToolBoxControl() { } -// ----------------------------------------------------------------------------- - void SvxGrafToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { @@ -575,125 +494,71 @@ void SvxGrafToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const } } -// ----------------------------------------------------------------------------- - Window* SvxGrafToolBoxControl::CreateItemWindow( Window *pParent ) { return( new ImplGrafControl( pParent, m_aCommandURL, m_xFrame ) ); } -// ---------------------------- -// - SvxGrafRedToolBoxControl - -// ---------------------------- - SFX_IMPL_TOOLBOX_CONTROL( SvxGrafRedToolBoxControl, SfxInt16Item ); -// ----------------------------------------------------------------------------- - SvxGrafRedToolBoxControl::SvxGrafRedToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxGrafToolBoxControl( nSlotId, nId, rTbx ) { } -// ------------------------------ -// - SvxGrafGreenToolBoxControl - -// ------------------------------ - SFX_IMPL_TOOLBOX_CONTROL( SvxGrafGreenToolBoxControl, SfxInt16Item ); -// ----------------------------------------------------------------------------- - SvxGrafGreenToolBoxControl::SvxGrafGreenToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxGrafToolBoxControl( nSlotId, nId, rTbx ) { } -// ----------------------------- -// - SvxGrafBlueToolBoxControl - -// ----------------------------- - SFX_IMPL_TOOLBOX_CONTROL( SvxGrafBlueToolBoxControl, SfxInt16Item ); -// ----------------------------------------------------------------------------- - SvxGrafBlueToolBoxControl::SvxGrafBlueToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxGrafToolBoxControl( nSlotId, nId, rTbx ) { } -// ---------------------------------- -// - SvxGrafLuminanceToolBoxControl - -// ---------------------------------- - SFX_IMPL_TOOLBOX_CONTROL( SvxGrafLuminanceToolBoxControl, SfxInt16Item ); -// ----------------------------------------------------------------------------- - SvxGrafLuminanceToolBoxControl::SvxGrafLuminanceToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxGrafToolBoxControl( nSlotId, nId, rTbx ) { } -// ---------------------------------- -// - SvxGrafContrastToolBoxControl - -// ---------------------------------- - SFX_IMPL_TOOLBOX_CONTROL( SvxGrafContrastToolBoxControl, SfxInt16Item ); -// ----------------------------------------------------------------------------- - SvxGrafContrastToolBoxControl::SvxGrafContrastToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxGrafToolBoxControl( nSlotId, nId, rTbx ) { } -// ------------------------------ -// - SvxGrafGammaToolBoxControl - -// ------------------------------ - SFX_IMPL_TOOLBOX_CONTROL( SvxGrafGammaToolBoxControl, SfxUInt32Item ); -// ----------------------------------------------------------------------------- - SvxGrafGammaToolBoxControl::SvxGrafGammaToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxGrafToolBoxControl( nSlotId, nId, rTbx ) { } -// ------------------------------------- -// - SvxGrafTransparenceToolBoxControl - -// ------------------------------------- - SFX_IMPL_TOOLBOX_CONTROL( SvxGrafTransparenceToolBoxControl, SfxUInt16Item ); -// ----------------------------------------------------------------------------- - SvxGrafTransparenceToolBoxControl::SvxGrafTransparenceToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SvxGrafToolBoxControl( nSlotId, nId, rTbx ) { } -// ----------------------------- -// - SvxGrafModeToolBoxControl - -// ----------------------------- - SFX_IMPL_TOOLBOX_CONTROL( SvxGrafModeToolBoxControl, SfxUInt16Item ); -// ----------------------------------------------------------------------------- - SvxGrafModeToolBoxControl::SvxGrafModeToolBoxControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) : SfxToolBoxControl( nSlotId, nId, rTbx ) { } -// ----------------------------------------------------------------------------- - SvxGrafModeToolBoxControl::~SvxGrafModeToolBoxControl() { } -// ----------------------------------------------------------------------------- - void SvxGrafModeToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const SfxPoolItem* pState ) { @@ -716,17 +581,11 @@ void SvxGrafModeToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, c } } -// ----------------------------------------------------------------------------- - Window* SvxGrafModeToolBoxControl::CreateItemWindow( Window *pParent ) { return( new ImplGrafModeControl( pParent, m_xFrame ) ); } -// --------------------- -// - SvxGrafAttrHelper - -// --------------------- - void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) { SfxItemPool& rPool = rView.GetModel()->GetItemPool(); @@ -1005,8 +864,6 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView ) } } -// ----------------------------------------------------------------------------- - void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView ) { SfxItemPool& rPool = rView.GetModel()->GetItemPool(); diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx index c144ec118c88..af61eab983fe 100644 --- a/svx/source/xml/xmleohlp.cxx +++ b/svx/source/xml/xmleohlp.cxx @@ -44,10 +44,6 @@ #include <map> #include "svx/xmleohlp.hxx" -// ----------- -// - Defines - -// ----------- - using namespace ::osl; using namespace ::cppu; using namespace ::utl; @@ -65,8 +61,6 @@ using namespace ::com::sun::star::lang; // ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- - class OutputStorageWrapper_Impl : public ::cppu::WeakImplHelper1<XOutputStream> { ::osl::Mutex maMutex; @@ -130,8 +124,6 @@ void SAL_CALL OutputStorageWrapper_Impl::closeOutput() bStreamClosed = sal_True; } -// ----------------------------------------------------------------------------- - struct OUStringLess { bool operator() ( const ::rtl::OUString& r1, const ::rtl::OUString& r2 ) const @@ -140,11 +132,6 @@ struct OUStringLess } }; -// ----------------------------------------------------------------------------- - -// ----------------------------- -// - SvXMLEmbeddedObjectHelper - -// ----------------------------- DBG_NAME(SvXMLEmbeddedObjectHelper) SvXMLEmbeddedObjectHelper::SvXMLEmbeddedObjectHelper() : WeakComponentImplHelper2< XEmbeddedObjectResolver, XNameAccess >( maMutex ), @@ -169,9 +156,6 @@ SvXMLEmbeddedObjectHelper::SvXMLEmbeddedObjectHelper( ::comphelper::IEmbeddedHel Init( 0, rDocPersist, eCreateMode ); } - -// ----------------------------------------------------------------------------- - SvXMLEmbeddedObjectHelper::~SvXMLEmbeddedObjectHelper() { DBG_DTOR(SvXMLEmbeddedObjectHelper,NULL); @@ -191,8 +175,6 @@ SvXMLEmbeddedObjectHelper::~SvXMLEmbeddedObjectHelper() } } -// ----------------------------------------------------------------------------- - void SAL_CALL SvXMLEmbeddedObjectHelper::disposing() { Flush(); @@ -240,8 +222,6 @@ void SvXMLEmbeddedObjectHelper::splitObjectURL(::rtl::OUString aURLNoPar, } } -// ----------------------------------------------------------------------------- - sal_Bool SvXMLEmbeddedObjectHelper::ImplGetStorageNames( const ::rtl::OUString& rURLStr, ::rtl::OUString& rContainerStorageName, @@ -354,9 +334,6 @@ sal_Bool SvXMLEmbeddedObjectHelper::ImplGetStorageNames( return sal_True; } - -// ----------------------------------------------------------------------------- - uno::Reference < embed::XStorage > SvXMLEmbeddedObjectHelper::ImplGetContainerStorage( const ::rtl::OUString& rStorageName ) { @@ -393,8 +370,6 @@ uno::Reference < embed::XStorage > SvXMLEmbeddedObjectHelper::ImplGetContainerSt return mxContainerStorage; } -// ----------------------------------------------------------------------------- - sal_Bool SvXMLEmbeddedObjectHelper::ImplReadObject( const ::rtl::OUString& rContainerStorageName, ::rtl::OUString& rObjName, @@ -478,8 +453,6 @@ sal_Bool SvXMLEmbeddedObjectHelper::ImplReadObject( return sal_True; } -// ----------------------------------------------------------------------------- - ::rtl::OUString SvXMLEmbeddedObjectHelper::ImplInsertEmbeddedObjectURL( const ::rtl::OUString& rURLStr ) { @@ -536,8 +509,6 @@ sal_Bool SvXMLEmbeddedObjectHelper::ImplReadObject( return sRetURL; } -// ----------------------------------------------------------------------------- - uno::Reference< io::XInputStream > SvXMLEmbeddedObjectHelper::ImplGetReplacementImage( const uno::Reference< embed::XEmbeddedObject >& xObj ) { @@ -582,8 +553,6 @@ uno::Reference< io::XInputStream > SvXMLEmbeddedObjectHelper::ImplGetReplacement return xStream; } -// ----------------------------------------------------------------------------- - void SvXMLEmbeddedObjectHelper::Init( const uno::Reference < embed::XStorage >& rRootStorage, ::comphelper::IEmbeddedHelper& rPersist, @@ -594,8 +563,6 @@ void SvXMLEmbeddedObjectHelper::Init( meCreateMode = eCreateMode; } -// ----------------------------------------------------------------------------- - SvXMLEmbeddedObjectHelper* SvXMLEmbeddedObjectHelper::Create( const uno::Reference < embed::XStorage >& rRootStorage, ::comphelper::IEmbeddedHelper& rDocPersist, @@ -624,8 +591,6 @@ SvXMLEmbeddedObjectHelper* SvXMLEmbeddedObjectHelper::Create( return pThis; } -// ----------------------------------------------------------------------------- - void SvXMLEmbeddedObjectHelper::Destroy( SvXMLEmbeddedObjectHelper* pSvXMLEmbeddedObjectHelper ) { @@ -636,8 +601,6 @@ void SvXMLEmbeddedObjectHelper::Destroy( } } -// ----------------------------------------------------------------------------- - void SvXMLEmbeddedObjectHelper::Flush() { if( mxTempStorage.is() ) diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 4fb5058a0b23..3b7ced224a39 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -44,10 +44,6 @@ #include <algorithm> -// ----------- -// - Defines - -// ----------- - using namespace com::sun::star; using namespace com::sun::star::uno; using namespace com::sun::star::io; @@ -57,10 +53,6 @@ using ::com::sun::star::lang::XMultiServiceFactory; #define XML_GRAPHICSTORAGE_NAME "Pictures" #define XML_GRAPHICOBJECT_URL_BASE "vnd.sun.star.GraphicObject:" -// --------------------------- -// - SvXMLGraphicInputStream - -// --------------------------- - const MetaCommentAction* ImplCheckForEPS( GDIMetaFile& rMtf ) { const MetaCommentAction* pComment = NULL; @@ -102,8 +94,6 @@ public: sal_Bool Exists() const { return mxStmWrapper.is(); } }; -// ----------------------------------------------------------------------------- - SvXMLGraphicInputStream::SvXMLGraphicInputStream( const ::rtl::OUString& rGraphicId ) { GraphicObject aGrfObject( rtl::OUStringToOString(rGraphicId, RTL_TEXTENCODING_ASCII_US) ); @@ -159,14 +149,10 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const ::rtl::OUString& rGraphi } } -// ----------------------------------------------------------------------------- - SvXMLGraphicInputStream::~SvXMLGraphicInputStream() { } -// ----------------------------------------------------------------------------- - sal_Int32 SAL_CALL SvXMLGraphicInputStream::readBytes( Sequence< sal_Int8 >& rData, sal_Int32 nBytesToRead ) throw( NotConnectedException, BufferSizeExceededException, RuntimeException ) { @@ -176,8 +162,6 @@ sal_Int32 SAL_CALL SvXMLGraphicInputStream::readBytes( Sequence< sal_Int8 >& rDa return mxStmWrapper->readBytes( rData, nBytesToRead ); } -// ----------------------------------------------------------------------------- - sal_Int32 SAL_CALL SvXMLGraphicInputStream::readSomeBytes( Sequence< sal_Int8 >& rData, sal_Int32 nMaxBytesToRead ) throw( NotConnectedException, BufferSizeExceededException, RuntimeException ) { @@ -187,8 +171,6 @@ sal_Int32 SAL_CALL SvXMLGraphicInputStream::readSomeBytes( Sequence< sal_Int8 >& return mxStmWrapper->readSomeBytes( rData, nMaxBytesToRead ); } -// ----------------------------------------------------------------------------- - void SAL_CALL SvXMLGraphicInputStream::skipBytes( sal_Int32 nBytesToSkip ) throw( NotConnectedException, BufferSizeExceededException, RuntimeException ) { @@ -198,8 +180,6 @@ void SAL_CALL SvXMLGraphicInputStream::skipBytes( sal_Int32 nBytesToSkip ) mxStmWrapper->skipBytes( nBytesToSkip ); } -// ----------------------------------------------------------------------------- - sal_Int32 SAL_CALL SvXMLGraphicInputStream::available() throw( NotConnectedException, RuntimeException ) { if( !mxStmWrapper.is() ) @@ -208,8 +188,6 @@ sal_Int32 SAL_CALL SvXMLGraphicInputStream::available() throw( NotConnectedExcep return mxStmWrapper->available(); } -// ----------------------------------------------------------------------------- - void SAL_CALL SvXMLGraphicInputStream::closeInput() throw( NotConnectedException, RuntimeException ) { if( !mxStmWrapper.is() ) @@ -218,10 +196,6 @@ void SAL_CALL SvXMLGraphicInputStream::closeInput() throw( NotConnectedException mxStmWrapper->closeInput(); } -// ---------------------------- -// - SvXMLGraphicOutputStream - -// ---------------------------- - class SvXMLGraphicOutputStream : public::cppu::WeakImplHelper1< XOutputStream > { private: @@ -252,8 +226,6 @@ public: const GraphicObject& GetGraphicObject(); }; -// ----------------------------------------------------------------------------- - SvXMLGraphicOutputStream::SvXMLGraphicOutputStream() : mpTmp( new ::utl::TempFile ), mbClosed( sal_False ) @@ -266,16 +238,12 @@ SvXMLGraphicOutputStream::SvXMLGraphicOutputStream() : mxStmWrapper = new ::utl::OOutputStreamWrapper( *mpOStm ); } -// ----------------------------------------------------------------------------- - SvXMLGraphicOutputStream::~SvXMLGraphicOutputStream() { delete mpTmp; delete mpOStm; } -// ----------------------------------------------------------------------------- - void SAL_CALL SvXMLGraphicOutputStream::writeBytes( const Sequence< sal_Int8 >& rData ) throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException ) { @@ -285,8 +253,6 @@ void SAL_CALL SvXMLGraphicOutputStream::writeBytes( const Sequence< sal_Int8 >& mxStmWrapper->writeBytes( rData ); } -// ----------------------------------------------------------------------------- - void SAL_CALL SvXMLGraphicOutputStream::flush() throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException ) { @@ -296,8 +262,6 @@ void SAL_CALL SvXMLGraphicOutputStream::flush() mxStmWrapper->flush(); } -// ----------------------------------------------------------------------------- - void SAL_CALL SvXMLGraphicOutputStream::closeOutput() throw( NotConnectedException, BufferSizeExceededException, IOException, RuntimeException ) { @@ -310,8 +274,6 @@ void SAL_CALL SvXMLGraphicOutputStream::closeOutput() mbClosed = sal_True; } -// ------------------------------------------------------------------------------ - const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject() { if( mbClosed && ( maGrfObj.GetType() == GRAPHIC_NONE ) && mpOStm ) @@ -383,10 +345,6 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject() return maGrfObj; } -// ---------------------- -// - SvXMLGraphicHelper - -// ---------------------- - SvXMLGraphicHelper::SvXMLGraphicHelper( SvXMLGraphicHelperMode eCreateMode ) : ::cppu::WeakComponentImplHelper2< ::com::sun::star::document::XGraphicObjectResolver, ::com::sun::star::document::XBinaryStreamResolver >( maMutex ) @@ -400,20 +358,14 @@ SvXMLGraphicHelper::SvXMLGraphicHelper() : { } -// ----------------------------------------------------------------------------- - SvXMLGraphicHelper::~SvXMLGraphicHelper() { } -// ----------------------------------------------------------------------------- - void SAL_CALL SvXMLGraphicHelper::disposing() { } -// ----------------------------------------------------------------------------- - sal_Bool SvXMLGraphicHelper::ImplGetStreamNames( const ::rtl::OUString& rURLStr, ::rtl::OUString& rPictureStorageName, ::rtl::OUString& rPictureStreamName ) @@ -442,8 +394,6 @@ sal_Bool SvXMLGraphicHelper::ImplGetStreamNames( const ::rtl::OUString& rURLStr, return bRet; } -// ----------------------------------------------------------------------------- - uno::Reference < embed::XStorage > SvXMLGraphicHelper::ImplGetGraphicStorage( const ::rtl::OUString& rStorageName ) { uno::Reference < embed::XStorage > xRetStorage; @@ -476,8 +426,6 @@ uno::Reference < embed::XStorage > SvXMLGraphicHelper::ImplGetGraphicStorage( co return xRetStorage; } -// ----------------------------------------------------------------------------- - SvxGraphicHelperStream_Impl SvXMLGraphicHelper::ImplGetGraphicStream( const ::rtl::OUString& rPictureStorageName, const ::rtl::OUString& rPictureStreamName, sal_Bool bTruncate ) @@ -507,8 +455,6 @@ SvxGraphicHelperStream_Impl SvXMLGraphicHelper::ImplGetGraphicStream( const ::rt return aRet; } -// ----------------------------------------------------------------------------- - String SvXMLGraphicHelper::ImplGetGraphicMimeType( const String& rFileName ) const { struct XMLGraphicMimeTypeMapper @@ -541,8 +487,6 @@ String SvXMLGraphicHelper::ImplGetGraphicMimeType( const String& rFileName ) con return aMimeType; } -// ----------------------------------------------------------------------------- - Graphic SvXMLGraphicHelper::ImplReadGraphic( const ::rtl::OUString& rPictureStorageName, const ::rtl::OUString& rPictureStreamName ) { @@ -558,8 +502,6 @@ Graphic SvXMLGraphicHelper::ImplReadGraphic( const ::rtl::OUString& rPictureStor return aGraphic; } -// ----------------------------------------------------------------------------- - sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureStorageName, const ::rtl::OUString& rPictureStreamName, const ::rtl::OUString& rGraphicId, @@ -646,8 +588,6 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt return bRet; } -// ----------------------------------------------------------------------------- - void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, sal_uInt32 nInsertPos, rtl::OUString& rRequestedFileName ) { rtl::OUString aURLString( rURLStr ); @@ -795,8 +735,6 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s } } -// ----------------------------------------------------------------------------- - void SvXMLGraphicHelper::Init( const uno::Reference < embed::XStorage >& rXMLStorage, SvXMLGraphicHelperMode eCreateMode, sal_Bool bDirect ) @@ -806,8 +744,6 @@ void SvXMLGraphicHelper::Init( const uno::Reference < embed::XStorage >& rXMLSto mbDirect = ( ( GRAPHICHELPER_MODE_READ == meCreateMode ) ? bDirect : sal_True ); } -// ----------------------------------------------------------------------------- - SvXMLGraphicHelper* SvXMLGraphicHelper::Create( const uno::Reference < embed::XStorage >& rXMLStorage, SvXMLGraphicHelperMode eCreateMode, sal_Bool bDirect ) @@ -820,8 +756,6 @@ SvXMLGraphicHelper* SvXMLGraphicHelper::Create( const uno::Reference < embed::XS return pThis; } -// ----------------------------------------------------------------------------- - SvXMLGraphicHelper* SvXMLGraphicHelper::Create( SvXMLGraphicHelperMode eCreateMode ) { SvXMLGraphicHelper* pThis = new SvXMLGraphicHelper; @@ -832,8 +766,6 @@ SvXMLGraphicHelper* SvXMLGraphicHelper::Create( SvXMLGraphicHelperMode eCreateMo return pThis; } -// ----------------------------------------------------------------------------- - void SvXMLGraphicHelper::Destroy( SvXMLGraphicHelper* pSvXMLGraphicHelper ) { if( pSvXMLGraphicHelper ) @@ -843,8 +775,6 @@ void SvXMLGraphicHelper::Destroy( SvXMLGraphicHelper* pSvXMLGraphicHelper ) } } -// ----------------------------------------------------------------------------- - // XGraphicObjectResolver ::rtl::OUString SAL_CALL SvXMLGraphicHelper::resolveGraphicObjectURL( const ::rtl::OUString& rURL ) throw(uno::RuntimeException) @@ -889,8 +819,6 @@ void SvXMLGraphicHelper::Destroy( SvXMLGraphicHelper* pSvXMLGraphicHelper ) return maGrfURLs[ nIndex ].second; } -// ----------------------------------------------------------------------------- - // XBinaryStreamResolver Reference< XInputStream > SAL_CALL SvXMLGraphicHelper::getInputStream( const ::rtl::OUString& rURL ) throw( RuntimeException ) @@ -913,8 +841,6 @@ Reference< XInputStream > SAL_CALL SvXMLGraphicHelper::getInputStream( const ::r return xRet; } -// ----------------------------------------------------------------------------- - Reference< XOutputStream > SAL_CALL SvXMLGraphicHelper::createOutputStream() throw( RuntimeException ) { @@ -933,8 +859,6 @@ Reference< XOutputStream > SAL_CALL SvXMLGraphicHelper::createOutputStream() return xRet; } -// ----------------------------------------------------------------------------- - ::rtl::OUString SAL_CALL SvXMLGraphicHelper::resolveOutputStream( const Reference< XOutputStream >& rxBinaryStream ) throw( RuntimeException ) { @@ -964,9 +888,6 @@ Reference< XOutputStream > SAL_CALL SvXMLGraphicHelper::createOutputStream() return aRet; } - -// -------------------------------------------------------------------------------- - // for instantiation via service manager namespace svx { diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index 2018dbea42ad..bd2b56f2a9c0 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -30,23 +30,13 @@ #include <vcl/FilterConfigItem.hxx> #include <vcl/graphicfilter.hxx> -// ----------- -// - Defines - -// ----------- - #define FORMAT_BMP String(RTL_CONSTASCII_USTRINGPARAM("bmp")) #define FORMAT_GIF String(RTL_CONSTASCII_USTRINGPARAM("gif")) #define FORMAT_JPG String(RTL_CONSTASCII_USTRINGPARAM("jpg")) #define FORMAT_PNG String(RTL_CONSTASCII_USTRINGPARAM("png")) -// -------------- -// - XOutBitmap - -// -------------- - GraphicFilter* XOutBitmap::pGrfFilter = NULL; -// ------------------------------------------------------------------------ - Animation XOutBitmap::MirrorAnimation( const Animation& rAnimation, sal_Bool bHMirr, sal_Bool bVMirr ) { Animation aNewAnim( rAnimation ); @@ -86,8 +76,6 @@ Animation XOutBitmap::MirrorAnimation( const Animation& rAnimation, sal_Bool bHM return aNewAnim; } -// ------------------------------------------------------------------------ - Graphic XOutBitmap::MirrorGraphic( const Graphic& rGraphic, const sal_uIntPtr nMirrorFlags ) { Graphic aRetGraphic; @@ -124,8 +112,6 @@ Graphic XOutBitmap::MirrorGraphic( const Graphic& rGraphic, const sal_uIntPtr nM return aRetGraphic; } -// ------------------------------------------------------------------------ - sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, String& rFileName, const String& rFilterName, const sal_uIntPtr nFlags, const Size* pMtfSize_100TH_MM ) @@ -297,8 +283,6 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, String& rFileName, } } -// ------------------------------------------------------------------------ - sal_uInt16 XOutBitmap::ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL, GraphicFilter& rFilter, const sal_uInt16 nFormat, const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData ) @@ -325,8 +309,6 @@ sal_uInt16 XOutBitmap::ExportGraphic( const Graphic& rGraphic, const INetURLObje return nRet; } -// ------------------------------------------------------------------------ - Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold ) { const Size aSize( rBmp.GetSizePixel() ); @@ -412,8 +394,6 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold ) return aRetBmp; }; -// ------------------------------------------------------------------------ - Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const sal_uIntPtr nFlags, const sal_uInt8 cEdgeDetectThreshold, const Rectangle* pWorkRectPixel ) { @@ -553,10 +533,6 @@ Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const sal_uIntPtr nFlags, return aRetPoly; }; -// ---------------- -// - DitherBitmap - -// ---------------- - sal_Bool DitherBitmap( Bitmap& rBitmap ) { sal_Bool bRet = sal_False; |