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

convert crop page to .ui

Change-Id: I01946f979fc043c5b1ca2777f0af1769e2c8a362
üst a56bfe73
...@@ -65,7 +65,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ ...@@ -65,7 +65,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/tabpages/border.src \ cui/source/tabpages/border.src \
cui/source/tabpages/dstribut.src \ cui/source/tabpages/dstribut.src \
cui/source/tabpages/frmdirlbox.src \ cui/source/tabpages/frmdirlbox.src \
cui/source/tabpages/grfpage.src \
cui/source/tabpages/labdlg.src \ cui/source/tabpages/labdlg.src \
cui/source/tabpages/macroass.src \ cui/source/tabpages/macroass.src \
cui/source/tabpages/page.src \ cui/source/tabpages/page.src \
......
...@@ -31,6 +31,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ ...@@ -31,6 +31,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/colorpage \ cui/uiconfig/ui/colorpage \
cui/uiconfig/ui/comment \ cui/uiconfig/ui/comment \
cui/uiconfig/ui/connectortabpage \ cui/uiconfig/ui/connectortabpage \
cui/uiconfig/ui/croppage \
cui/uiconfig/ui/cuiimapdlg \ cui/uiconfig/ui/cuiimapdlg \
cui/uiconfig/ui/dimensionlinestabpage \ cui/uiconfig/ui/dimensionlinestabpage \
cui/uiconfig/ui/editdictionarydialog \ cui/uiconfig/ui/editdictionarydialog \
......
...@@ -44,6 +44,12 @@ String RID_SVXSTR_ROW ...@@ -44,6 +44,12 @@ String RID_SVXSTR_ROW
Text [ en-US ] = "Insert Rows" ; Text [ en-US ] = "Insert Rows" ;
}; };
String RID_SVXSTR_PPI
{
Text [ x-comment ] = "PPI is pixel per inch, %1 is a number" ;
Text [ en-US ] = "(%1 PPI)" ;
};
String RID_SVXSTR_COL String RID_SVXSTR_COL
{ {
Text [ en-US ] = "Insert Columns" ; Text [ en-US ] = "Insert Columns" ;
......
...@@ -452,6 +452,8 @@ ...@@ -452,6 +452,8 @@
#define RID_SVXSTR_CHG_SMARTART (RID_SVX_START + 1251) #define RID_SVXSTR_CHG_SMARTART (RID_SVX_START + 1251)
#define RID_SVXSTR_PPI (RID_SVX_START + 1252)
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -26,23 +26,17 @@ ...@@ -26,23 +26,17 @@
#include <vcl/graph.hxx> #include <vcl/graph.hxx>
#include <sfx2/tabdlg.hxx> #include <sfx2/tabdlg.hxx>
class SvxCropExample : public Window
class SvxGrfCropPage : public SfxTabPage
{ {
using Window::CalcZoom;
using TabPage::ActivatePage;
using TabPage::DeactivatePage;
class SvxCropExample : public Window
{
Size aFrameSize; Size aFrameSize;
Point aTopLeft, aBottomRight; Point aTopLeft, aBottomRight;
Graphic aGrf; Graphic aGrf;
public: public:
SvxCropExample( Window* pPar, const ResId& rResId ); SvxCropExample( Window* pPar, WinBits nStyle );
virtual void Paint( const Rectangle& rRect ); virtual void Paint( const Rectangle& rRect );
virtual Size GetOptimalSize() const;
void SetTopLeft( const Point& rNew ) { aTopLeft = rNew; } void SetTopLeft( const Point& rNew ) { aTopLeft = rNew; }
void SetTop( long nVal ) { aTopLeft.X() = nVal; } void SetTop( long nVal ) { aTopLeft.X() = nVal; }
...@@ -53,36 +47,36 @@ class SvxGrfCropPage : public SfxTabPage ...@@ -53,36 +47,36 @@ class SvxGrfCropPage : public SfxTabPage
void SetFrameSize( const Size& rSz ); void SetFrameSize( const Size& rSz );
void SetGraphic( const Graphic& rGrf ) { aGrf = rGrf; } void SetGraphic( const Graphic& rGrf ) { aGrf = rGrf; }
const Graphic& GetGraphic() const { return aGrf; } const Graphic& GetGraphic() const { return aGrf; }
}; };
FixedLine aCropFL; class SvxGrfCropPage : public SfxTabPage
RadioButton aZoomConstRB; {
RadioButton aSizeConstRB; using Window::CalcZoom;
FixedText aLeftFT; using TabPage::ActivatePage;
MetricField aLeftMF; using TabPage::DeactivatePage;
FixedText aRightFT;
MetricField aRightMF; VclContainer* m_pCropFrame;
FixedText aTopFT; RadioButton* m_pZoomConstRB;
MetricField aTopMF; RadioButton* m_pSizeConstRB;
FixedText aBottomFT; MetricField* m_pLeftMF;
MetricField aBottomMF; MetricField* m_pRightMF;
MetricField* m_pTopMF;
FixedLine aZoomFL; MetricField* m_pBottomMF;
FixedText aWidthZoomFT;
MetricField aWidthZoomMF; VclContainer* m_pScaleFrame;
FixedText aHeightZoomFT; MetricField* m_pWidthZoomMF;
MetricField aHeightZoomMF; MetricField* m_pHeightZoomMF;
FixedLine aSizeFL; VclContainer* m_pSizeFrame;
FixedText aWidthFT; MetricField* m_pWidthMF;
MetricField aWidthMF; MetricField* m_pHeightMF;
FixedText aHeightFT;
MetricField aHeightMF; VclContainer* m_pOrigSizeGrid;
FixedText aOrigSizeFT; FixedText* m_pOrigSizeFT;
PushButton aOrigSizePB; PushButton* m_pOrigSizePB;
// Example // Example
SvxCropExample aExampleWN; SvxCropExample* m_pExampleWN;
Timer aTimer; Timer aTimer;
......
...@@ -211,7 +211,6 @@ ...@@ -211,7 +211,6 @@
#define HID_OFAPAGE_AUTOCOMPLETE_OPTIONS "CUI_HID_OFAPAGE_AUTOCOMPLETE_OPTIONS" #define HID_OFAPAGE_AUTOCOMPLETE_OPTIONS "CUI_HID_OFAPAGE_AUTOCOMPLETE_OPTIONS"
#define HID_PAGE_DISTRIBUTE "CUI_HID_PAGE_DISTRIBUTE" #define HID_PAGE_DISTRIBUTE "CUI_HID_PAGE_DISTRIBUTE"
#define HID_SVXPAGE_GRFCROP "CUI_HID_SVXPAGE_GRFCROP"
#define HID_CAPTION "CUI_HID_CAPTION" #define HID_CAPTION "CUI_HID_CAPTION"
#define HID_CAPTION_CTL_TYPE "CUI_HID_CAPTION_CTL_TYPE" #define HID_CAPTION_CTL_TYPE "CUI_HID_CAPTION_CTL_TYPE"
......
This diff is collapsed.
/* -*- 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 .
*/
#define FT_BOTTOM 1
#define FT_HEIGHT 2
#define FT_HEIGHTZOOM 3
#define FT_LEFT 4
#define FT_ORIG_SIZE 5
#define FT_RIGHT 6
#define FT_TOP 7
#define FT_WIDTH 8
#define FT_WIDTHZOOM 9
#define FL_CROP 10
#define FL_SIZE 12
#define FL_ZOOM 13
#define MF_BOTTOM 14
#define MF_HEIGHT 15
#define MF_HEIGHTZOOM 16
#define MF_LEFT 17
#define MF_RIGHT 18
#define MF_TOP 19
#define MF_WIDTH 20
#define MF_WIDTHZOOM 21
#define PB_ORGSIZE 22
#define RB_SIZECONST 23
#define RB_ZOOMCONST 24
#define WN_BSP 25
#define STR_PPI 2600
/* 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 <cuires.hrc>
#include "helpid.hrc"
#include "grfpage.hrc"
#include <svx/dialogs.hrc>
/************************************************************/
/* */
/* */
/* Crop-Page */
/* */
/* */
/************************************************************/
TabPage RID_SVXPAGE_GRFCROP
{
Hide = TRUE ;
HelpID = HID_SVXPAGE_GRFCROP;
SVLook = TRUE ;
Pos = MAP_APPFONT ( 0 , 0 ) ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
FixedLine FL_CROP
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 164 , 8 ) ;
Text [ en-US ] = "Crop" ;
};
FixedText FT_LEFT
{
Pos = MAP_APPFONT ( 12 , 44 ) ;
Size = MAP_APPFONT ( 28 , 8 ) ;
Text [ en-US ] = "~Left" ;
};
MetricField MF_LEFT
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_LEFT";
Border = TRUE ;
Pos = MAP_APPFONT ( 42 , 42 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Text = "12,99" ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = -9999 ;
Maximum = 9999 ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
First = 0 ;
Last = 9999 ;
SpinSize = 10 ;
};
FixedText FT_RIGHT
{
Pos = MAP_APPFONT ( 12 , 60 ) ;
Size = MAP_APPFONT ( 28 , 8 ) ;
Left = TRUE ;
Text [ en-US ] = "~Right" ;
};
MetricField MF_RIGHT
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_RIGHT";
Border = TRUE ;
Pos = MAP_APPFONT ( 42 , 58 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = -9999 ;
Maximum = 9999 ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
First = 0 ;
Last = 9999 ;
SpinSize = 10 ;
};
FixedText FT_TOP
{
Pos = MAP_APPFONT ( 94 , 44 ) ;
Size = MAP_APPFONT ( 28 , 8 ) ;
Text [ en-US ] = "~Top" ;
};
MetricField MF_TOP
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_TOP";
Border = TRUE ;
Pos = MAP_APPFONT ( 124 , 42 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Text = "12,99" ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = -9999 ;
Maximum = 9999 ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
First = 0 ;
Last = 9999 ;
SpinSize = 10 ;
};
FixedText FT_BOTTOM
{
Pos = MAP_APPFONT ( 94 , 60 ) ;
Size = MAP_APPFONT ( 28 , 8 ) ;
Left = TRUE ;
Text [ en-US ] = "~Bottom" ;
};
MetricField MF_BOTTOM
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_BOTTOM";
Border = TRUE ;
Pos = MAP_APPFONT ( 124 , 58 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = -9999 ;
Maximum = 9999 ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
First = 0 ;
Last = 9999 ;
SpinSize = 10 ;
};
RadioButton RB_SIZECONST
{
HelpID = "cui:RadioButton:RID_SVXPAGE_GRFCROP:RB_SIZECONST";
Pos = MAP_APPFONT ( 12 , 28 ) ;
Size = MAP_APPFONT ( 152 , 10 ) ;
Text [ en-US ] = "Keep image si~ze" ;
};
RadioButton RB_ZOOMCONST
{
HelpID = "cui:RadioButton:RID_SVXPAGE_GRFCROP:RB_ZOOMCONST";
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 152 , 10 ) ;
Check = TRUE ;
Text [ en-US ] = "Keep ~scale" ;
};
Window WN_BSP
{
Pos = MAP_APPFONT ( 176 , 6 ) ;
Size = MAP_APPFONT ( 78 , 78 ) ;
Border = TRUE ;
};
FixedLine FL_ZOOM
{
Pos = MAP_APPFONT ( 6, 76 ) ;
Size = MAP_APPFONT ( 164 , 8 ) ;
Text [ en-US ] = "Scale" ;
};
FixedText FT_WIDTHZOOM
{
Left = TRUE ;
Pos = MAP_APPFONT ( 12 , 89 ) ;
Size = MAP_APPFONT ( 28 , 8 ) ;
Text [ en-US ] = "~Width" ;
};
MetricField MF_WIDTHZOOM
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_WIDTHZOOM";
Border = TRUE ;
Pos = MAP_APPFONT ( 42 , 87 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Text = "12,99" ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 1 ;
Maximum = 9999 ;
First = 5 ;
Last = 1000 ;
Maximum = 9999 ;
Value = 100 ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
SpinSize = 10 ;
};
FixedText FT_HEIGHTZOOM
{
Pos = MAP_APPFONT ( 12 , 105 ) ;
Size = MAP_APPFONT ( 28 , 8 ) ;
Text [ en-US ] = "H~eight" ;
Left = TRUE ;
};
MetricField MF_HEIGHTZOOM
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_HEIGHTZOOM";
Border = TRUE ;
Pos = MAP_APPFONT ( 42 , 103 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 1 ;
Maximum = 9999 ;
First = 5 ;
Last = 1000 ;
Maximum = 9999 ;
Value = 100 ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
SpinSize = 10 ;
};
FixedLine FL_SIZE
{
Pos = MAP_APPFONT ( 6 , 121 ) ;
Size = MAP_APPFONT ( 164 , 8 ) ;
Text [ en-US ] = "Image size" ;
};
FixedText FT_WIDTH
{
Pos = MAP_APPFONT ( 12 , 134 ) ;
Size = MAP_APPFONT ( 28 , 8 ) ;
Left = TRUE ;
Text [ en-US ] = "~Width" ;
};
MetricField MF_WIDTH
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_WIDTH";
Border = TRUE ;
Pos = MAP_APPFONT ( 42 , 132 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
Text = "12,99" ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 5 ;
Maximum = 20000 ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
First = 5 ;
Last = 20000 ;
SpinSize = 10 ;
};
FixedText FT_HEIGHT
{
Pos = MAP_APPFONT ( 12 , 150 ) ;
Size = MAP_APPFONT ( 28 , 8 ) ;
Left = TRUE ;
Text [ en-US ] = "H~eight" ;
};
MetricField MF_HEIGHT
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRFCROP:MF_HEIGHT";
Border = TRUE ;
Pos = MAP_APPFONT ( 42 , 148 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
Left = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Minimum = 5 ;
Maximum = 20000 ;
DecimalDigits = 2 ;
Unit = FUNIT_CM ;
First = 5 ;
Last = 20000 ;
SpinSize = 10 ;
};
FixedText FT_ORIG_SIZE
{
Pos = MAP_APPFONT ( 176 , 132 ) ;
Size = MAP_APPFONT ( 74 , 8 ) ;
};
PushButton PB_ORGSIZE
{
HelpID = "cui:PushButton:RID_SVXPAGE_GRFCROP:PB_ORGSIZE";
Pos = MAP_APPFONT ( 176 , 143 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Original Size" ;
};
};
String STR_PPI
{
Text [ x-comment ] = "PPI is pixel per inch, %1 is a number" ;
Text [ en-US ] = "(%1 PPI)" ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This diff is collapsed.
...@@ -543,6 +543,10 @@ ...@@ -543,6 +543,10 @@
generic-name="ClientBox" parent="GtkDrawingArea" generic-name="ClientBox" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/> icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="CropExample" name="cuilo-SvxCropExample"
generic-name="CropExample" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Recent Documents View" name="sfxlo-RecentDocsView" <glade-widget-class title="Recent Documents View" name="sfxlo-RecentDocsView"
generic-name="Icon View" parent="GtkIconView" generic-name="Icon View" parent="GtkIconView"
icon-name="widget-gtk-iconview"/> icon-name="widget-gtk-iconview"/>
......
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