diff options
author | Jan Holesovsky <kendy@suse.cz> | 2013-07-16 08:18:59 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2013-07-16 09:49:20 +0200 |
commit | f4f99f5c11e451007e57134d639a70c536e1e742 (patch) | |
tree | 50a1a1c439fda97710a644129835387de1b684d2 /svx | |
parent | 6867a80c415211895919de2e2a40aa106dfa97fd (diff) |
sidebar: PosSizePropertyPanel follow-up fixes.
Change-Id: I80309119e7d0e217b3fd29535543987ac7140994
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 43 | ||||
-rw-r--r-- | svx/uiconfig/ui/sidebarpossize.ui | 4 |
2 files changed, 16 insertions, 31 deletions
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 898600626927..75a8d45e0f5b 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -36,7 +36,6 @@ #include <vcl/toolbox.hxx> #include <svl/aeitem.hxx> #include <svx/svdview.hxx> -//#include <svx/uiconfig/ui/sidebarpossize.ui> using namespace css; using namespace cssu; @@ -45,9 +44,7 @@ using ::sfx2::sidebar::Theme; const char UNO_FLIPHORIZONTAL[] = ".uno:FlipHorizontal"; const char UNO_FLIPVERTICAL[] = ".uno:FlipVertical"; -#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) -#define USERITEM_NAME rtl::OUString::createFromAscii("FitItem") - +const char USERITEM_NAME[] = "FitItem"; namespace svx { namespace sidebar { @@ -192,16 +189,6 @@ void PosSizePropertyPanel::Initialize() //flip: mpFlipTbx->SetSelectHdl( LINK( this, PosSizePropertyPanel, FlipHdl) ); - const sal_uInt16 nIdFlipHorizontal = mpFlipTbx->GetItemId(UNO_FLIPHORIZONTAL); - const sal_uInt16 nIdFlipVertical = mpFlipTbx->GetItemId(UNO_FLIPVERTICAL); - - mpFlipTbx->SetItemImage( - nIdFlipHorizontal, - GetImage(mxFrame, A2S(".uno:FlipHorizontal"), sal_False)); - mpFlipTbx->SetItemImage( - nIdFlipVertical, - GetImage(mxFrame, A2S(".uno:FlipVertical"), sal_False)); - mpMtrPosX->SetAccessibleRelationLabeledBy(mpFtPosX); mpMtrPosY->SetAccessibleRelationLabeledBy(mpFtPosY); mpMtrWidth->SetAccessibleRelationLabeledBy(mpFtWidth); @@ -265,11 +252,11 @@ PosSizePropertyPanel* PosSizePropertyPanel::Create ( const cssu::Reference<css::ui::XSidebar>& rxSidebar) { if (pParent == NULL) - throw lang::IllegalArgumentException(A2S("no parent Window given to PosSizePropertyPanel::Create"), NULL, 0); + throw lang::IllegalArgumentException("no parent Window given to PosSizePropertyPanel::Create", NULL, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException(A2S("no XFrame given to PosSizePropertyPanel::Create"), NULL, 1); + throw lang::IllegalArgumentException("no XFrame given to PosSizePropertyPanel::Create", NULL, 1); if (pBindings == NULL) - throw lang::IllegalArgumentException(A2S("no SfxBindings given to PosSizePropertyPanel::Create"), NULL, 2); + throw lang::IllegalArgumentException("no SfxBindings given to PosSizePropertyPanel::Create", NULL, 2); return new PosSizePropertyPanel( pParent, @@ -572,20 +559,20 @@ IMPL_LINK( PosSizePropertyPanel, RotationHdl, void *, EMPTYARG ) IMPL_LINK( PosSizePropertyPanel, FlipHdl, ToolBox*, pBox ) { const OUString aCommand(pBox->GetItemCommand(pBox->GetCurItemId())); + + if(aCommand == UNO_FLIPHORIZONTAL) { - if(aCommand == UNO_FLIPHORIZONTAL) - { - SfxVoidItem aHoriItem (SID_FLIP_HORIZONTAL); - GetBindings()->GetDispatcher()->Execute( + SfxVoidItem aHoriItem(SID_FLIP_HORIZONTAL); + GetBindings()->GetDispatcher()->Execute( SID_FLIP_HORIZONTAL, SFX_CALLMODE_RECORD, &aHoriItem, 0L ); - } - else if(aCommand == UNO_FLIPVERTICAL) - { - SfxVoidItem aVertItem (SID_FLIP_VERTICAL ); - GetBindings()->GetDispatcher()->Execute( + } + else if(aCommand == UNO_FLIPVERTICAL) + { + SfxVoidItem aVertItem(SID_FLIP_VERTICAL); + GetBindings()->GetDispatcher()->Execute( SID_FLIP_VERTICAL, SFX_CALLMODE_RECORD, &aVertItem, 0L ); - } } + return 0; } @@ -1186,5 +1173,3 @@ void PosSizePropertyPanel::DisableControls() } } // end of namespace svx::sidebar - -// eof diff --git a/svx/uiconfig/ui/sidebarpossize.ui b/svx/uiconfig/ui/sidebarpossize.ui index b48aed80928d..b45256fe9d85 100644 --- a/svx/uiconfig/ui/sidebarpossize.ui +++ b/svx/uiconfig/ui/sidebarpossize.ui @@ -176,7 +176,7 @@ <property name="can_focus">False</property> <property name="orientation">vertical</property> <child> - <object class="GtkComboBox" id="rotation: degrees"> + <object class="GtkComboBox" id="rotation:0degrees"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="tooltip_markup" translatable="yes">Select the angle for rotation.</property> @@ -218,7 +218,7 @@ <property name="can_focus">False</property> <property name="tooltip_markup" translatable="yes">Flip the selected object vertically.</property> <property name="tooltip_text" translatable="yes">Flip the selected object vertically.</property> - <property name="action_name">.uno:FlipVertical </property> + <property name="action_name">.uno:FlipVertical</property> <property name="use_underline">True</property> </object> <packing> |