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

adapt code to Asian Phonetic Guide .ui conversion

Change-Id: Ie7bf21269e11fd1b3982999fa16597ba9caba674
üst b350eb3c
......@@ -63,7 +63,6 @@ $(eval $(call gb_SrsTarget_add_files,svx/res,\
svx/source/dialog/optgrid.src \
svx/source/dialog/passwd.src \
svx/source/dialog/prtqry.src \
svx/source/dialog/rubydialog.src \
svx/source/dialog/ruler.src \
svx/source/dialog/sdstring.src \
svx/source/dialog/srchdlg.src \
......
......@@ -10,6 +10,7 @@
$(eval $(call gb_UI_UI,svx))
$(eval $(call gb_UI_add_uifiles,svx,\
svx/uiconfig/ui/asianphoneticguidedialog \
svx/uiconfig/ui/compressgraphicdialog \
))
......
......@@ -181,7 +181,6 @@
#define HID_REDLINING_VIEW_PB_REJECT "SVX_HID_REDLINING_VIEW_PB_REJECT"
#define HID_REDLINING_VIEW_PB_REJECTALL "SVX_HID_REDLINING_VIEW_PB_REJECTALL"
#define HID_REDLINING_VIEW_PB_UNDO "SVX_HID_REDLINING_VIEW_PB_UNDO"
#define HID_RUBY_DIALOG "SVX_HID_RUBY_DIALOG"
#define HID_STYLE_LISTBOX "SVX_HID_STYLE_LISTBOX"
#define HID_SVXTBX_UNDO_REDO_CTRL "SVX_HID_SVXTBX_UNDO_REDO_CTRL"
#define HID_SVX_CHINESE_DICTIONARY_CB_REVERSE "SVX_HID_SVX_CHINESE_DICTIONARY_CB_REVERSE"
......
......@@ -250,8 +250,6 @@
#define RID_SVXIMG_NOTCHECKED (RID_SVX_START + 243)
#define RID_SVXIMG_CHECKED (RID_SVX_START + 244)
#define RID_SVXDLG_RUBY (RID_SVX_START + 247)
#define RID_SVXDLG_TEXTCONTROL_CHARATTR (RID_SVX_START + 286)
#define RID_SVXDLG_TEXTCONTROL_PARAATTR (RID_SVX_START + 287)
......
......@@ -23,6 +23,7 @@
#include <sfx2/childwin.hxx>
#include <sfx2/basedlgs.hxx>
#include <vcl/layout.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/fixed.hxx>
#include <vcl/button.hxx>
......@@ -43,10 +44,16 @@ class RubyPreview : public Window
{
protected:
virtual void Paint( const Rectangle& rRect );
SvxRubyDialog& rParentDlg;
SvxRubyDialog* m_pParentDlg;
public:
RubyPreview(SvxRubyDialog& rParent, const ResId& rResId);
RubyPreview(Window *pParent);
void setRubyDialog(SvxRubyDialog* pParentDlg)
{
m_pParentDlg = pParentDlg;
}
virtual Size GetOptimalSize(WindowSizeType eType) const;
};
class SVX_DLLPUBLIC SvxRubyChildWindow : public SfxChildWindow
......@@ -66,8 +73,14 @@ class RubyEdit : public Edit
virtual void GetFocus();
virtual long PreNotify( NotifyEvent& rNEvt );
public:
RubyEdit(Window* pParent, const ResId& rResId) :
Edit(pParent, rResId){}
RubyEdit(Window* pParent, const ResId& rResId)
: Edit(pParent, rResId)
{
}
RubyEdit(Window* pParent)
: Edit(pParent, WB_BORDER)
{
}
void SetScrollHdl(Link& rLink) {aScrollHdl = rLink;}
void SetJumpHdl(Link& rLink) {aJumpHdl = rLink;}
};
......@@ -80,36 +93,33 @@ class SvxRubyDialog : public SfxModelessDialog
friend class RubyPreview;
FixedText aLeftFT;
RubyEdit aLeft1ED;
FixedText aRightFT;
RubyEdit aRight1ED;
RubyEdit aLeft2ED;
RubyEdit aRight2ED;
RubyEdit aLeft3ED;
RubyEdit aRight3ED;
RubyEdit aLeft4ED;
RubyEdit aRight4ED;
FixedText* m_pLeftFT;
FixedText* m_pRightFT;
RubyEdit* m_pLeft1ED;
RubyEdit* m_pRight1ED;
RubyEdit* m_pLeft2ED;
RubyEdit* m_pRight2ED;
RubyEdit* m_pLeft3ED;
RubyEdit* m_pRight3ED;
RubyEdit* m_pLeft4ED;
RubyEdit* m_pRight4ED;
RubyEdit* aEditArr[8];
ScrollBar aScrollSB;
RubyEdit* aEditArr[8];
VclScrolledWindow* m_pScrolledWindow;
ScrollBar* m_pScrollSB;
FixedText aAdjustFT;
ListBox aAdjustLB;
ListBox* m_pAdjustLB;
FixedText aPositionFT;
ListBox aPositionLB;
ListBox* m_pPositionLB;
FixedText aCharStyleFT;
ListBox aCharStyleLB;
PushButton aStylistPB;
FixedText* m_pCharStyleFT;
ListBox* m_pCharStyleLB;
PushButton* m_pStylistPB;
FixedText aPreviewFT;
RubyPreview aPreviewWin;
RubyPreview* m_pPreviewWin;
OKButton aApplyPB;
PushButton aClosePB;
HelpButton aHelpPB;
PushButton* m_pApplyPB;
PushButton* m_pClosePB;
long nLastPos;
long nCurrentEdit;
......@@ -145,28 +155,7 @@ class SvxRubyDialog : public SfxModelessDialog
sal_Bool IsModified() const {return bModified;}
void SetModified(sal_Bool bSet) {bModified = bSet;}
void EnableControls(sal_Bool bEnable)
{
aLeftFT.Enable(bEnable);
aRightFT.Enable(bEnable);
aLeft1ED.Enable(bEnable);
aRight1ED.Enable(bEnable);
aLeft2ED.Enable(bEnable);
aRight2ED.Enable(bEnable);
aLeft3ED.Enable(bEnable);
aRight3ED.Enable(bEnable);
aLeft4ED.Enable(bEnable);
aRight4ED.Enable(bEnable);
aScrollSB.Enable(bEnable);
aAdjustFT.Enable(bEnable);
aAdjustLB.Enable(bEnable);
aCharStyleFT.Enable(bEnable);
aCharStyleLB.Enable(bEnable);
aStylistPB.Enable(bEnable);
aPreviewFT.Enable(bEnable);
aPreviewWin.Enable(bEnable);
aApplyPB.Enable(bEnable);
}
void EnableControls(bool bEnable);
void GetCurrentText(String& rBase, String& rRuby);
......@@ -175,8 +164,8 @@ protected:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
public:
SvxRubyDialog( SfxBindings *pBindings, SfxChildWindow *pCW,
Window* pParent, const ResId& rResId );
SvxRubyDialog(SfxBindings *pBindings, SfxChildWindow *pCW,
Window* pParent);
virtual ~SvxRubyDialog();
virtual void Activate();
......
/*
* 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_CHAR_STYLE 2
#define LB_CHAR_STYLE 3
#define PB_STYLIST 4
#define FT_PREVIEW 5
#define WIN_PREVIEW 6
#define PB_APPLY 7
#define PB_CLOSE 8
#define PB_HELP 9
#define ED_LEFT_1 10
#define ED_LEFT_2 11
#define ED_LEFT_3 12
#define ED_LEFT_4 13
#define ED_RIGHT_1 14
#define ED_RIGHT_2 15
#define ED_RIGHT_3 16
#define ED_RIGHT_4 17
#define HB_HEADER 18
#define SB_SCROLL 19
#define FT_LEFT 20
#define FT_RIGHT 21
#define FT_ADJUST 22
#define LB_ADJUST 23
#define FT_POSITION 24
#define LB_POSITION 25
/*
* 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 <rubydialog.hrc>
#include "helpid.hrc"
#include <svx/dialogs.hrc>
ModelessDialog RID_SVXDLG_RUBY
{
OutputSize = TRUE ;
Hide = TRUE ;
SVLook = TRUE ;
HelpId = HID_RUBY_DIALOG;
Pos = MAP_APPFONT ( 0 , 0 ) ;
Size = MAP_APPFONT ( 227 , 195 ) ;
Text [ en-US ] = "Asian Phonetic Guide" ;
Moveable = TRUE ;
Closeable = TRUE ;
FixedText FT_LEFT
{
Pos = MAP_APPFONT ( 6 , 17 ) ;
Size = MAP_APPFONT ( 80 , 8 ) ;
Text [ en-US ] = "Base text";
};
FixedText FT_RIGHT
{
Pos = MAP_APPFONT ( 109 , 17 ) ;
Size = MAP_APPFONT ( 80 , 8 ) ;
Text [ en-US ] = "Ruby text";
};
Edit ED_LEFT_1
{
HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_LEFT_1";
Pos = MAP_APPFONT ( 6 , 30 ) ;
Size = MAP_APPFONT ( 102 , 12 ) ;
Hide = False;
Border = TRUE;
};
Edit ED_RIGHT_1
{
HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_RIGHT_1";
Pos = MAP_APPFONT ( 109 , 30 ) ;
Size = MAP_APPFONT ( 102 , 12 ) ;
Border = TRUE;
};
Edit ED_LEFT_2
{
HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_LEFT_2";
Pos = MAP_APPFONT ( 6 , 42) ;
Size = MAP_APPFONT ( 102 , 12 ) ;
Border = TRUE;
};
Edit ED_RIGHT_2
{
HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_RIGHT_2";
Pos = MAP_APPFONT ( 109 , 42 ) ;
Size = MAP_APPFONT ( 102 , 12 ) ;
Border = TRUE;
};
Edit ED_LEFT_3
{
HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_LEFT_3";
Pos = MAP_APPFONT ( 6 , 54 ) ;
Size = MAP_APPFONT ( 102 , 12 ) ;
Border = TRUE;
};
Edit ED_RIGHT_3
{
HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_RIGHT_3";
Pos = MAP_APPFONT ( 109 , 54 ) ;
Size = MAP_APPFONT ( 102 , 12 ) ;
Border = TRUE;
};
Edit ED_LEFT_4
{
HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_LEFT_4";
Pos = MAP_APPFONT ( 6 , 66 ) ;
Size = MAP_APPFONT ( 102 , 12 ) ;
Border = TRUE;
};
Edit ED_RIGHT_4
{
HelpID = "svx:Edit:RID_SVXDLG_RUBY:ED_RIGHT_4";
Pos = MAP_APPFONT ( 109 , 66 ) ;
Size = MAP_APPFONT ( 102 , 12 ) ;
Border = TRUE;
};
ScrollBar SB_SCROLL
{
Pos = MAP_APPFONT ( 213 , 30 ) ;
Size = MAP_APPFONT ( 8 , 48 ) ;
VScroll = TRUE ;
Drag = TRUE ;
};
FixedText FT_ADJUST
{
Pos = MAP_APPFONT ( 6 , 82 ) ;
Size = MAP_APPFONT ( 35 , 8 ) ;
Text [ en-US ] = "Alignment";
};
ListBox LB_ADJUST
{
HelpID = "svx:ListBox:RID_SVXDLG_RUBY:LB_ADJUST";
Pos = MAP_APPFONT ( 6 , 93) ;
Size = MAP_APPFONT ( 35 , 60 ) ;
DropDown = TRUE;
Border = TRUE;
StringList [ en-US ] =
{
"Left" ;
"Center" ;
"Right" ;
"0 1 0" ;
"1 2 1" ;
};
};
FixedText FT_POSITION
{
Pos = MAP_APPFONT ( 43 , 82 ) ;
Size = MAP_APPFONT ( 35 , 8 ) ;
Text [ en-US ] = "Position";
};
ListBox LB_POSITION
{
HelpID = "svx:ListBox:RID_SVXDLG_RUBY:LB_POSITION";
Pos = MAP_APPFONT ( 43 , 93) ;
Size = MAP_APPFONT ( 35 , 60 ) ;
DropDown = TRUE;
Border = TRUE;
StringList [ en-US ] =
{
"Top" ;
"Bottom" ;
};
};
FixedText FT_CHAR_STYLE
{
Pos = MAP_APPFONT ( 80 , 82 ) ;
Size = MAP_APPFONT ( 141 , 8 ) ;
Text [ en-US ] = "Character Style for ruby text";
};
ListBox LB_CHAR_STYLE
{
HelpID = "svx:ListBox:RID_SVXDLG_RUBY:LB_CHAR_STYLE";
Pos = MAP_APPFONT ( 80 , 93) ;
Size = MAP_APPFONT ( 89 , 60 ) ;
DropDown = TRUE;
Border = TRUE;
Sort = TRUE;
};
PushButton PB_STYLIST
{
HelpID = "svx:PushButton:RID_SVXDLG_RUBY:PB_STYLIST";
Pos = MAP_APPFONT ( 171 , 92 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "Styles";
};
FixedText FT_PREVIEW
{
Pos = MAP_APPFONT ( 6, 110 ) ;
Size = MAP_APPFONT ( 195 , 8 ) ;
Text [ en-US ] = "Preview:";
};
Window WIN_PREVIEW
{
Pos = MAP_APPFONT ( 6 , 121 ) ;
Size = MAP_APPFONT ( 215 , 50 ) ;
Border = TRUE ;
};
OKButton PB_APPLY
{
DefButton = TRUE;
Pos = MAP_APPFONT ( 65 , 175 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Apply";
};
PushButton PB_CLOSE
{
HelpID = "svx:PushButton:RID_SVXDLG_RUBY:PB_CLOSE";
Pos = MAP_APPFONT ( 118, 175 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Close";
};
HelpButton PB_HELP
{
Pos = MAP_APPFONT ( 171 , 175 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
};
......@@ -12,7 +12,6 @@ $(eval $(call gb_UI_UI,modules/swriter))
$(eval $(call gb_UI_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/autoformattable \
sw/uiconfig/swriter/ui/autotext \
sw/uiconfig/swriter/ui/asianphoneticguide \
sw/uiconfig/swriter/ui/bibliographyentry \
sw/uiconfig/swriter/ui/bulletsandnumbering \
sw/uiconfig/swriter/ui/captionoptions \
......
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