diff options
-rw-r--r-- | sd/source/ui/toolpanel/LayoutMenu.cxx | 2 | ||||
-rw-r--r-- | svtools/inc/svtools/valueset.hxx | 2 | ||||
-rw-r--r-- | svx/inc/svx/numvset.hxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/svxbmpnumvalueset.cxx | 8 | ||||
-rw-r--r-- | sw/inc/helpid.h | 1 | ||||
-rw-r--r-- | sw/source/ui/inc/insrule.hxx | 17 | ||||
-rw-r--r-- | sw/source/ui/inc/swvset.hxx | 5 | ||||
-rw-r--r-- | sw/source/ui/misc/insrule.cxx | 46 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/inserttable.ui | 7 |
9 files changed, 41 insertions, 51 deletions
diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx index 62d2c5060175..f8756858974e 100644 --- a/sd/source/ui/toolpanel/LayoutMenu.cxx +++ b/sd/source/ui/toolpanel/LayoutMenu.cxx @@ -174,7 +174,7 @@ static snewfoil_value_info standard[] = }; LayoutMenu::LayoutMenu( TreeNode* pParent, ToolPanelViewShell& i_rPanelViewShell ) - : ValueSet (pParent->GetWindow()), + : ValueSet(pParent->GetWindow(), WB_ITEMBORDER), TreeNode(pParent), DragSourceHelper(this), DropTargetHelper(this), diff --git a/svtools/inc/svtools/valueset.hxx b/svtools/inc/svtools/valueset.hxx index 24fa35ef7be0..3f3fa9fed2ef 100644 --- a/svtools/inc/svtools/valueset.hxx +++ b/svtools/inc/svtools/valueset.hxx @@ -296,7 +296,7 @@ protected: virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); public: - ValueSet( Window* pParent, WinBits nWinStyle = WB_ITEMBORDER, bool bDisableTransientChildren = false ); + ValueSet( Window* pParent, WinBits nWinStyle, bool bDisableTransientChildren = false ); ValueSet( Window* pParent, const ResId& rResId, bool bDisableTransientChildren = false ); ~ValueSet(); diff --git a/svx/inc/svx/numvset.hxx b/svx/inc/svx/numvset.hxx index 442addc79cc6..030f0231b47f 100644 --- a/svx/inc/svx/numvset.hxx +++ b/svx/inc/svx/numvset.hxx @@ -69,7 +69,7 @@ class SVX_DLLPUBLIC SvxNumValueSet : public ValueSet public: SvxNumValueSet( Window* pParent, const ResId& rResId, sal_uInt16 nType ); - SvxNumValueSet( Window* pParent, sal_uInt16 nType ); + SvxNumValueSet( Window* pParent, WinBits nWinStyle, sal_uInt16 nType ); ~SvxNumValueSet(); virtual void UserDraw( const UserDrawEvent& rUDEvt ); @@ -108,7 +108,7 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet public: SvxBmpNumValueSet(Window* pParent, const ResId& rResId); - SvxBmpNumValueSet(Window* pParent); + SvxBmpNumValueSet(Window* pParent, WinBits nWinStyle); ~SvxBmpNumValueSet(); virtual void UserDraw( const UserDrawEvent& rUDEvt ); diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index 741caf9c9c23..72063f93dd5d 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -408,8 +408,8 @@ SvxNumValueSet::SvxNumValueSet( Window* pParent, const ResId& rResId, sal_uInt16 init(nType); } -SvxNumValueSet::SvxNumValueSet( Window* pParent, sal_uInt16 nType ) - : ValueSet( pParent ) +SvxNumValueSet::SvxNumValueSet( Window* pParent, WinBits nWinStyle, sal_uInt16 nType ) + : ValueSet( pParent, nWinStyle ) { init(nType); } @@ -481,8 +481,8 @@ SvxBmpNumValueSet::SvxBmpNumValueSet( Window* pParent, const ResId& rResId ) init(); } -SvxBmpNumValueSet::SvxBmpNumValueSet( Window* pParent ) - : SvxNumValueSet( pParent, NUM_PAGETYPE_BMP ) +SvxBmpNumValueSet::SvxBmpNumValueSet( Window* pParent, WinBits nWinStyle ) + : SvxNumValueSet( pParent, nWinStyle, NUM_PAGETYPE_BMP ) { init(); } diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h index bf781733b65d..ca524fc0a292 100644 --- a/sw/inc/helpid.h +++ b/sw/inc/helpid.h @@ -68,7 +68,6 @@ #define HID_VS_NUM "SW_HID_VS_NUM" #define HID_VS_BULLET "SW_HID_VS_BULLET" #define HID_VS_NUMBMP "SW_HID_VS_NUMBMP" -#define HID_VS_RULER "SW_HID_VS_RULER" #define HID_INSERT_ABSTRACT "SW_HID_INSERT_ABSTRACT" #define HID_NAVI_TBX1 "SW_HID_NAVI_TBX1" #define HID_NAVI_TBX2 "SW_HID_NAVI_TBX2" diff --git a/sw/source/ui/inc/insrule.hxx b/sw/source/ui/inc/insrule.hxx index 78d331909355..5d9f37e9eef3 100644 --- a/sw/source/ui/inc/insrule.hxx +++ b/sw/source/ui/inc/insrule.hxx @@ -31,26 +31,21 @@ class SwInsertGrfRulerDlg : public SfxModalDialog OKButton* m_pOkPB; SwRulerValueSet* m_pExampleVS; - std::vector<String> aGrfNames; - String sSimple; - String sRulers; - sal_uInt16 nSelPos; + std::vector<OUString> m_aGrfNames; + OUString m_sSimple; protected: - DECL_LINK(SelectHdl, ValueSet*); DECL_LINK(DoubleClickHdl, void *); public: - SwInsertGrfRulerDlg( Window* pParent ); + SwInsertGrfRulerDlg(Window* pParent); ~SwInsertGrfRulerDlg(); - String GetGraphicName(); - sal_Bool IsSimpleLine() {return nSelPos == 1;} - sal_Bool HasImages() const {return !aGrfNames.empty();} + OUString GetGraphicName() const; + bool IsSimpleLine() const; + bool HasImages() const {return !m_aGrfNames.empty();} }; #endif - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/inc/swvset.hxx b/sw/source/ui/inc/swvset.hxx index a4c59fcb9dfb..7bc919d7fe83 100644 --- a/sw/source/ui/inc/swvset.hxx +++ b/sw/source/ui/inc/swvset.hxx @@ -23,9 +23,8 @@ class SwRulerValueSet : public SvxBmpNumValueSet { public: - SwRulerValueSet( Window* pParent, - const ResId& rResId ); - SwRulerValueSet( Window* pParent ); + SwRulerValueSet(Window* pParent, const ResId& rResId); + SwRulerValueSet(Window* pParent, WinBits nWinStyle); ~SwRulerValueSet(); virtual void UserDraw( const UserDrawEvent& rUDEvt ); }; diff --git a/sw/source/ui/misc/insrule.cxx b/sw/source/ui/misc/insrule.cxx index cfa03016681d..7b1b9490b11e 100644 --- a/sw/source/ui/misc/insrule.cxx +++ b/sw/source/ui/misc/insrule.cxx @@ -43,33 +43,29 @@ SwInsertGrfRulerDlg::SwInsertGrfRulerDlg( Window* pParent ) : SfxModalDialog(pParent, "HorizontalRuleDialog", "modules/swriter/ui/horizontalrule.ui") - , sSimple(SW_RESSTR(STR_SIMPLE)) - , nSelPos(USHRT_MAX) + , m_sSimple(SW_RESSTR(STR_SIMPLE)) { get(m_pOkPB, "ok"); get(m_pExampleVS, "rulers"); m_pExampleVS->SetLineCount(6); m_pExampleVS->SetColCount(1); - m_pExampleVS->SetSelectHdl(LINK(this, SwInsertGrfRulerDlg, SelectHdl)); m_pExampleVS->SetDoubleClickHdl(LINK(this, SwInsertGrfRulerDlg, DoubleClickHdl)); // determine graphic name GalleryExplorer::BeginLocking(GALLERY_THEME_RULERS); - GalleryExplorer::FillObjList( GALLERY_THEME_RULERS, aGrfNames ); - m_pExampleVS->SetHelpId(HID_VS_RULER); + GalleryExplorer::FillObjList(GALLERY_THEME_RULERS, m_aGrfNames); Color aColor(COL_WHITE); - m_pExampleVS->InsertItem( 1, 1); - m_pExampleVS->SetItemText( 1, sSimple); + m_pExampleVS->InsertItem(1, 1); + m_pExampleVS->SetItemText(1, m_sSimple); - for(sal_uInt16 i = 1; i <= aGrfNames.size(); i++) + for(sal_uInt16 i = 1; i <= m_aGrfNames.size(); ++i) { m_pExampleVS->InsertItem( i + 1, i); - m_pExampleVS->SetItemText( i + 1, aGrfNames[i-1]); + m_pExampleVS->SetItemText( i + 1, m_aGrfNames[i-1]); } m_pExampleVS->SelectItem(1); - m_pExampleVS->GrabFocus(); } SwInsertGrfRulerDlg::~SwInsertGrfRulerDlg() @@ -77,22 +73,22 @@ SwInsertGrfRulerDlg::~SwInsertGrfRulerDlg() GalleryExplorer::EndLocking(GALLERY_THEME_RULERS); } -String SwInsertGrfRulerDlg::GetGraphicName() +bool SwInsertGrfRulerDlg::IsSimpleLine() const { - String sRet; - sal_uInt16 nSel = nSelPos - 2; //align selection position with ValueSet index - if(nSel < aGrfNames.size()) - sRet = URIHelper::SmartRel2Abs( - INetURLObject(), aGrfNames[nSel], - URIHelper::GetMaybeFileHdl()); - return sRet; + return m_pExampleVS->GetSelectItemId() == 1; } -IMPL_LINK(SwInsertGrfRulerDlg, SelectHdl, ValueSet*, pVS) +OUString SwInsertGrfRulerDlg::GetGraphicName() const { - nSelPos = pVS->GetSelectItemId(); - m_pOkPB->Enable(); - return 0; + sal_uInt16 nSelPos = m_pExampleVS->GetSelectItemId(); + + sal_uInt16 nSel = nSelPos - 2; //align selection position with ValueSet index + if(nSel < m_aGrfNames.size()) + { + return URIHelper::SmartRel2Abs(INetURLObject(), m_aGrfNames[nSel], + URIHelper::GetMaybeFileHdl()); + } + return OUString(); } SwRulerValueSet::SwRulerValueSet( Window* pParent, const ResId& rResId ) @@ -101,15 +97,15 @@ SwRulerValueSet::SwRulerValueSet( Window* pParent, const ResId& rResId ) SetStyle(GetStyle() & ~WB_ITEMBORDER); } -SwRulerValueSet::SwRulerValueSet(Window* pParent) - : SvxBmpNumValueSet(pParent) +SwRulerValueSet::SwRulerValueSet(Window* pParent, WinBits nWinStyle) + : SvxBmpNumValueSet(pParent, nWinStyle) { SetStyle(GetStyle() & ~WB_ITEMBORDER); } extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSwRulerValueSet(Window *pParent, VclBuilder::stringmap &) { - return new SwRulerValueSet(pParent); + return new SwRulerValueSet(pParent, WB_ITEMBORDER | WB_TABSTOP); } SwRulerValueSet::~SwRulerValueSet() diff --git a/sw/uiconfig/swriter/ui/inserttable.ui b/sw/uiconfig/swriter/ui/inserttable.ui index 80a3eeeeb3f5..21fdda99af77 100644 --- a/sw/uiconfig/swriter/ui/inserttable.ui +++ b/sw/uiconfig/swriter/ui/inserttable.ui @@ -115,7 +115,8 @@ <object class="GtkLabel" id="label1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Name</property> + <property name="label" translatable="yes"><b>Name</b></property> + <property name="use_markup">True</property> </object> </child> </object> @@ -220,7 +221,7 @@ <object class="GtkLabel" id="label2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Size</property> + <property name="label" translatable="yes"><b>Size</b></property> <property name="use_markup">True</property> </object> </child> @@ -389,7 +390,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="xalign">0.47999998927116394</property> - <property name="label" translatable="yes">Options</property> + <property name="label" translatable="yes"><b>Options</b></property> <property name="use_markup">True</property> </object> </child> |