Kaydet (Commit) 44f85f38 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert emboss dialog to .ui

Change-Id: I16883023ba7386437ff1cc9cd7d3393db8fb4654
üst b26f6cdb
......@@ -32,7 +32,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/dialogs/cuires.src \
cui/source/dialogs/fmsearch.src \
cui/source/dialogs/gallery.src \
cui/source/dialogs/grfflt.src \
cui/source/dialogs/hangulhanjadlg.src \
cui/source/dialogs/hlmarkwn.src \
cui/source/dialogs/hyperdlg.src \
......
......@@ -39,6 +39,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/cuiimapdlg \
cui/uiconfig/ui/dimensionlinestabpage \
cui/uiconfig/ui/editdictionarydialog \
cui/uiconfig/ui/embossdialog \
cui/uiconfig/ui/eventassigndialog \
cui/uiconfig/ui/eventassignpage \
cui/uiconfig/ui/formatnumberdialog \
......
......@@ -26,124 +26,9 @@
#include <sfx2/request.hxx>
#include <dialmgr.hxx>
#include "cuigrfflt.hxx"
#include "grfflt.hrc"
#include <cuires.hrc>
#include <svx/dialogs.hrc>
oldGraphicFilterDialog::PreviewWindow::PreviewWindow( Window* pParent, const ResId& rResId ) :
Control( pParent, rResId )
{
}
// -----------------------------------------------------------------------------
void oldGraphicFilterDialog::PreviewWindow::Paint( const Rectangle& rRect )
{
Control::Paint( rRect );
const Size aOutputSize( GetOutputSizePixel() );
if( maGraphic.IsAnimated() )
{
const Size aGraphicSize( LogicToPixel( maGraphic.GetPrefSize(), maGraphic.GetPrefMapMode() ) );
const Point aGraphicPosition( ( aOutputSize.Width() - aGraphicSize.Width() ) >> 1,
( aOutputSize.Height() - aGraphicSize.Height() ) >> 1 );
maGraphic.StartAnimation( this, aGraphicPosition, aGraphicSize );
}
else
{
const Size aGraphicSize( maGraphic.GetSizePixel() );
const Point aGraphicPosition( ( aOutputSize.Width() - aGraphicSize.Width() ) >> 1,
( aOutputSize.Height() - aGraphicSize.Height() ) >> 1 );
maGraphic.Draw( this, aGraphicPosition, aGraphicSize );
}
}
// -----------------------------------------------------------------------------
void oldGraphicFilterDialog::PreviewWindow::SetGraphic( const Graphic& rGraphic )
{
maGraphic = rGraphic;
if( maGraphic.IsAnimated() || maGraphic.IsTransparent() )
Invalidate();
else
Paint( Rectangle( Point(), GetOutputSizePixel() ) );
}
oldGraphicFilterDialog::oldGraphicFilterDialog( Window* pParent, const ResId& rResId, const Graphic& rGraphic ) :
ModalDialog ( pParent, rResId ),
maModifyHdl ( LINK( this, oldGraphicFilterDialog, ImplModifyHdl ) ),
mfScaleX ( 0.0 ),
mfScaleY ( 0.0 ),
maSizePixel ( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) ),
maPreview ( this, CUI_RES( CTL_PREVIEW ) ),
maBtnOK ( this, CUI_RES( BTN_OK ) ),
maBtnCancel ( this, CUI_RES( BTN_CANCEL ) ),
maBtnHelp ( this, CUI_RES( BTN_HELP ) ),
maFlParameter ( this, CUI_RES( FL_PARAMETER ) )
{
const Size aPreviewSize( maPreview.GetOutputSizePixel() );
Size aGrfSize( maSizePixel );
if( rGraphic.GetType() == GRAPHIC_BITMAP &&
aPreviewSize.Width() && aPreviewSize.Height() &&
aGrfSize.Width() && aGrfSize.Height() )
{
const double fGrfWH = (double) aGrfSize.Width() / aGrfSize.Height();
const double fPreWH = (double) aPreviewSize.Width() / aPreviewSize.Height();
if( fGrfWH < fPreWH )
{
aGrfSize.Width() = (long) ( aPreviewSize.Height() * fGrfWH );
aGrfSize.Height() = aPreviewSize.Height();
}
else
{
aGrfSize.Width() = aPreviewSize.Width();
aGrfSize.Height() = (long) ( aPreviewSize.Width() / fGrfWH );
}
mfScaleX = (double) aGrfSize.Width() / maSizePixel.Width();
mfScaleY = (double) aGrfSize.Height() / maSizePixel.Height();
if( !rGraphic.IsAnimated() )
{
BitmapEx aBmpEx( rGraphic.GetBitmapEx() );
if( aBmpEx.Scale( aGrfSize, BMP_SCALE_DEFAULT ) )
maGraphic = aBmpEx;
}
}
maTimer.SetTimeoutHdl( LINK( this, oldGraphicFilterDialog, ImplPreviewTimeoutHdl ) );
maTimer.SetTimeout( 100 );
ImplModifyHdl( NULL );
}
// -----------------------------------------------------------------------------
IMPL_LINK_NOARG(oldGraphicFilterDialog, ImplPreviewTimeoutHdl)
{
maTimer.Stop();
maPreview.SetGraphic( GetFilteredGraphic( maGraphic, mfScaleX, mfScaleY ) );
return 0;
}
// -----------------------------------------------------------------------------
IMPL_LINK_NOARG(oldGraphicFilterDialog, ImplModifyHdl)
{
if( maGraphic.GetType() == GRAPHIC_BITMAP )
{
maTimer.Stop();
maTimer.Start();
}
return 0;
}
GraphicPreviewWindow::GraphicPreviewWindow(Window* pParent,
const WinBits nStyle)
: Control(pParent, nStyle)
......@@ -545,7 +430,7 @@ Graphic GraphicFilterPoster::GetFilteredGraphic( const Graphic& rGraphic,
// - GraphicFilterEmboss -
// -----------------------
void GraphicFilterEmboss::EmbossControl::MouseButtonDown( const MouseEvent& rEvt )
void EmbossControl::MouseButtonDown( const MouseEvent& rEvt )
{
const RECT_POINT eOldRP = GetActualRP();
......@@ -555,24 +440,27 @@ void GraphicFilterEmboss::EmbossControl::MouseButtonDown( const MouseEvent& rEvt
maModifyHdl.Call( this );
}
// -----------------------------------------------------------------------------
GraphicFilterEmboss::GraphicFilterEmboss( Window* pParent, const Graphic& rGraphic,
RECT_POINT eLightSource ) :
oldGraphicFilterDialog ( pParent, CUI_RES( RID_SVX_GRFFILTER_DLG_EMBOSS ), rGraphic ),
maFtLight ( this, CUI_RES( DLG_FILTEREMBOSS_FT_LIGHT ) ),
maCtlLight ( this, CUI_RES( DLG_FILTEREMBOSS_CTL_LIGHT ), eLightSource )
Size EmbossControl::GetOptimalSize() const
{
FreeResource();
return LogicToPixel(Size(77, 60), MAP_APPFONT);
}
maCtlLight.SetModifyHdl( GetModifyHdl() );
maCtlLight.GrabFocus();
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeEmbossControl(Window *pParent, VclBuilder::stringmap &)
{
return new EmbossControl(pParent);
}
// -----------------------------------------------------------------------------
GraphicFilterEmboss::~GraphicFilterEmboss()
GraphicFilterEmboss::GraphicFilterEmboss(Window* pParent,
const Graphic& rGraphic, RECT_POINT eLightSource)
: GraphicFilterDialog (pParent, "EmbossDialog",
"cui/ui/embossdialog.ui", rGraphic)
{
get(mpCtlLight, "lightsource");
mpCtlLight->SetActualRP(eLightSource);
mpCtlLight->SetModifyHdl( GetModifyHdl() );
mpCtlLight->GrabFocus();
}
// -----------------------------------------------------------------------------
......@@ -583,7 +471,7 @@ Graphic GraphicFilterEmboss::GetFilteredGraphic( const Graphic& rGraphic,
Graphic aRet;
sal_uInt16 nAzim, nElev;
switch( maCtlLight.GetActualRP() )
switch( mpCtlLight->GetActualRP() )
{
default: OSL_FAIL("svx::GraphicFilterEmboss::GetFilteredGraphic(), unknown Reference Point!" );
/* Fall through */
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef _SVX_DLGFLT_HRC
#define _SVX_DLGFLT_HRC
// ----------
// - Common -
// ----------
#define BTN_OK 101
#define BTN_CANCEL 102
#define BTN_HELP 103
#define CTL_PREVIEW 105
#define FL_PARAMETER 106
// --------------------
// - DLG_FILTEREMBOSS -
// --------------------
#define DLG_FILTEREMBOSS_FT_LIGHT 1
#define DLG_FILTEREMBOSS_CTL_LIGHT 2
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <svtools/controldims.hrc>
#include <cuires.hrc>
#include "helpid.hrc"
#include "grfflt.hrc"
#include <svx/dialogs.hrc>
// --------------------
// - DLG_FILTEREMBOSS -
// --------------------
ModalDialog RID_SVX_GRFFILTER_DLG_EMBOSS
{
HelpID = CMD_SID_GRFFILTER_EMBOSS;
OutputSize = TRUE ;
Moveable = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 250, 100 ) ;
Text [ en-US ] = "Relief" ;
FixedLine FL_PARAMETER
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 182, RSC_CD_FIXEDLINE_HEIGHT ) ;
Text [ en-US ] = "Parameters";
};
Control CTL_PREVIEW
{
Pos = MAP_APPFONT ( 104 , 3 + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP ) ;
Size = MAP_APPFONT ( 81, 73 ) ;
};
#define MA_Y12 3 + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_INNERBORDER_TOP
FixedText DLG_FILTEREMBOSS_FT_LIGHT
{
Pos = MAP_APPFONT ( 12 , MA_Y12 ) ;
Size = MAP_APPFONT ( 77 , 10 ) ;
Text [ en-US ] = "Light source" ;
};
#define MA_Y13 MA_Y12 + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y
Control DLG_FILTEREMBOSS_CTL_LIGHT
{
HelpID = HID_GRFFILTER_EMBOSS_LIGHT ;
Border = TRUE ;
Pos = MAP_APPFONT ( 12 , MA_Y13 ) ;
Size = MAP_APPFONT ( 77 , 60 ) ;
TabStop = TRUE ;
};
OKButton BTN_OK
{
Pos = MAP_APPFONT ( 194, 6 ) ;
Size = MAP_APPFONT ( 50, 14 ) ;
TabStop = TRUE ;
DefButton = TRUE ;
};
CancelButton BTN_CANCEL
{
Pos = MAP_APPFONT ( 194, 23 ) ;
Size = MAP_APPFONT ( 50, 14 ) ;
TabStop = TRUE ;
};
HelpButton BTN_HELP
{
Pos = MAP_APPFONT ( 194, 43 ) ;
Size = MAP_APPFONT ( 50, 14 ) ;
TabStop = TRUE ;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -140,7 +140,6 @@ IMPL_ABSTDLG_BASE(AbstractSvxMultiFileDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSvxHpLinkDlg_Impl);
IMPL_ABSTDLG_BASE(AbstractFmSearchDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractGraphicFilterDialog_Impl);
IMPL_ABSTDLG_BASE(oldAbstractGraphicFilterDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractSvxAreaTabDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractPasteDialog_Impl);
IMPL_ABSTDLG_BASE(AbstractInsertObjectDialog_Impl);
......@@ -878,11 +877,6 @@ Graphic AbstractGraphicFilterDialog_Impl::GetFilteredGraphic( const Graphic& rGr
return pDlg->GetFilteredGraphic( rGraphic, fScaleX, fScaleY );
}
Graphic oldAbstractGraphicFilterDialog_Impl::GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY )
{
return pDlg->GetFilteredGraphic( rGraphic, fScaleX, fScaleY );
}
// AbstractSvxAreaTabDialog implementations just forwards everything to the dialog
void AbstractSvxAreaTabDialog_Impl::SetCurPageId( sal_uInt16 nId )
{
......@@ -1505,11 +1499,10 @@ AbstractFmSearchDialog* AbstractDialogFactory_Impl::CreateFmSearchDialog(Window
AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterEmboss (Window* pParent,
const Graphic& rGraphic,
RECT_POINT eLightSource,
sal_uInt32)
RECT_POINT eLightSource)
{
oldGraphicFilterDialog* pDlg = new GraphicFilterEmboss( pParent, rGraphic, eLightSource );
return new oldAbstractGraphicFilterDialog_Impl( pDlg );
GraphicFilterDialog* pDlg = new GraphicFilterEmboss( pParent, rGraphic, eLightSource );
return new AbstractGraphicFilterDialog_Impl( pDlg );
}
AbstractGraphicFilterDialog * AbstractDialogFactory_Impl::CreateGraphicFilterPoster(Window* pParent,
......
......@@ -46,7 +46,6 @@ class SvxMultiFileDialog;
class SvxHpLinkDlg;
class FmSearchDialog;
class Graphic;
class oldGraphicFilterDialog;
class GraphicFilterDialog;
class SvxAreaTabDialog;
class InsertObjectDialog_Impl;
......@@ -443,12 +442,6 @@ class AbstractGraphicFilterDialog_Impl :public AbstractGraphicFilterDialog
virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY );
};
class oldAbstractGraphicFilterDialog_Impl :public AbstractGraphicFilterDialog
{
DECL_ABSTDLG_BASE(oldAbstractGraphicFilterDialog_Impl,oldGraphicFilterDialog)
virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY );
};
class SvxAreaTabDialog;
class AbstractSvxAreaTabDialog_Impl :public AbstractSvxAreaTabDialog
{
......@@ -660,9 +653,8 @@ public:
const ::std::vector< OUString >& _rContexts,
sal_Int16 nInitialContext,
const Link& lnkContextSupplier);
virtual AbstractGraphicFilterDialog * CreateGraphicFilterEmboss (Window* pParent,
const Graphic& rGraphic, RECT_POINT eLightSource,
sal_uInt32 nResId);
virtual AbstractGraphicFilterDialog * CreateGraphicFilterEmboss(Window* pParent,
const Graphic& rGraphic, RECT_POINT eLightSource);
virtual AbstractGraphicFilterDialog * CreateGraphicFilterPoster(Window* pParent,
const Graphic& rGraphic, sal_uInt16 nCount);
virtual AbstractGraphicFilterDialog * CreateGraphicFilterSepia (Window* pParent,
......
......@@ -32,54 +32,6 @@
#include <svx/dlgctrl.hxx>
#include <svx/rectenum.hxx>
class oldGraphicFilterDialog : public ModalDialog
{
private:
class PreviewWindow : public Control
{
private:
Graphic maGraphic;
virtual void Paint( const Rectangle& rRect );
public:
PreviewWindow( Window* pParent, const ResId& rResId );
void SetGraphic( const Graphic& rGraphic );
};
private:
Timer maTimer;
Link maModifyHdl;
Graphic maGraphic;
double mfScaleX;
double mfScaleY;
Size maSizePixel;
DECL_LINK(ImplPreviewTimeoutHdl, void *);
DECL_LINK( ImplModifyHdl, void* p );
protected:
PreviewWindow maPreview;
OKButton maBtnOK;
CancelButton maBtnCancel;
HelpButton maBtnHelp;
FixedLine maFlParameter;
const Link& GetModifyHdl() const { return maModifyHdl; }
const Size& GetGraphicSizePixel() const { return maSizePixel; }
public:
oldGraphicFilterDialog( Window* pParent, const ResId& rResId, const Graphic& rGraphic );
virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY ) = 0;
};
class GraphicPreviewWindow : public Control
{
private:
......@@ -235,39 +187,29 @@ public:
// - GraphicFilterEmboss -
// -----------------------
class GraphicFilterEmboss : public oldGraphicFilterDialog
class EmbossControl : public SvxRectCtl
{
private:
Link maModifyHdl;
virtual void MouseButtonDown( const MouseEvent& rEvt );
virtual Size GetOptimalSize() const;
public:
EmbossControl(Window* pParent)
: SvxRectCtl(pParent) {}
class EmbossControl : public SvxRectCtl
{
private:
Link maModifyHdl;
virtual void MouseButtonDown( const MouseEvent& rEvt );
public:
EmbossControl( Window* pParent, const ResId& rResId, RECT_POINT eRectPoint ) :
SvxRectCtl( pParent, rResId ) { SetActualRP( eRectPoint ); }
void SetModifyHdl( const Link& rHdl ) { maModifyHdl = rHdl; }
};
void SetModifyHdl( const Link& rHdl ) { maModifyHdl = rHdl; }
};
class GraphicFilterEmboss : public GraphicFilterDialog
{
private:
FixedText maFtLight;
EmbossControl maCtlLight;
EmbossControl* mpCtlLight;
public:
GraphicFilterEmboss( Window* pParent, const Graphic& rGraphic,
RECT_POINT eLightSource );
~GraphicFilterEmboss();
GraphicFilterEmboss( Window* pParent, const Graphic& rGraphic,
RECT_POINT eLightSource );
virtual Graphic GetFilteredGraphic( const Graphic& rGraphic, double fScaleX, double fScaleY );
RECT_POINT GetLightSource() const { return maCtlLight.GetActualRP(); }
RECT_POINT GetLightSource() const { return mpCtlLight->GetActualRP(); }
};
#endif
......
......@@ -224,7 +224,6 @@
#define HID_HYPERLINK_MARKWND_APPLY "CUI_HID_HYPERLINK_MARKWND_APPLY"
#define HID_HYPERLINK_MARKWND_CLOSE "CUI_HID_HYPERLINK_MARKWND_CLOSE"
#define HID_HYPERLINK_MARKWND_TREE "CUI_HID_HYPERLINK_MARKWND_TREE"
#define HID_GRFFILTER_EMBOSS_LIGHT "CUI_HID_GRFFILTER_EMBOSS_LIGHT"
#define HID_LINKDLG_TABLB "CUI_HID_LINKDLG_TABLB"
#define HID_MACRO_HEADERTABLISTBOX "CUI_HID_MACRO_HEADERTABLISTBOX"
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkDialog" id="EmbossDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Emboss</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="column_spacing">24</property>
<child>
<object class="cuilo-GraphicPreviewWindow" id="preview">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Light source</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">lightsource</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="cuilo-EmbossControl" id="lightsource">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Parameters</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">ok</action-widget>
<action-widget response="0">cancel</action-widget>
<action-widget response="0">help</action-widget>
</action-widgets>
</object>
</interface>
......@@ -376,6 +376,9 @@
<glade-widget-class title="Rectangle Control" name="svxlo-SvxRectCtl"
generic-name="Rectangle Control" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Emboss Control" name="cuilo-EmbossControl"
generic-name="Emboss Control" parent="svxlo-SvxRectCtl"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Graph Control" name="svxlo-GraphCtrl"
generic-name="Graph Control" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
......
......@@ -98,7 +98,6 @@
#define RID_SVXPAGE_GRID (RID_SVX_START + 152)
// factory IDs of dialogs implemented in CUI
#define RID_SVX_GRFFILTER_DLG_EMBOSS (RID_SVX_START + 336)
#define RID_SVXDLG_CHARMAP ( RID_SVX_START + 10 )
// IDs of options pages of applications
......
......@@ -412,9 +412,9 @@ public:
const ::std::vector< OUString >& _rContexts,
sal_Int16 nInitialContext,
const Link& lnkContextSupplier)=0;
virtual AbstractGraphicFilterDialog * CreateGraphicFilterEmboss (Window* pParent,
virtual AbstractGraphicFilterDialog * CreateGraphicFilterEmboss(Window* pParent,
const Graphic& rGraphic,
RECT_POINT eLightSource, sal_uInt32 nResId )=0;
RECT_POINT eLightSource)=0;
virtual AbstractGraphicFilterDialog * CreateGraphicFilterPoster(Window* pParent,
const Graphic& rGraphic,
sal_uInt16 nCount)=0;
......
......@@ -180,7 +180,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
AbstractGraphicFilterDialog* aDlg = pFact->CreateGraphicFilterEmboss( pWindow, rGraphic, RP_MM, RID_SVX_GRFFILTER_DLG_EMBOSS );
AbstractGraphicFilterDialog* aDlg = pFact->CreateGraphicFilterEmboss(pWindow, rGraphic, RP_MM);
DBG_ASSERT(aDlg, "Dialogdiet fail!");
if( aDlg->Execute() == RET_OK )
aGraphic = aDlg->GetFilteredGraphic( rGraphic, 1.0, 1.0 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment