cui/source/options/optchart.cxx | 2 - cui/uiconfig/ui/dbregisterpage.ui | 11 +++++-- include/sfx2/basedlgs.hxx | 3 + include/vcl/floatwin.hxx | 3 + include/vcl/syswin.hxx | 2 - sc/uiconfig/scalc/ui/optsortlists.ui | 5 ++- sfx2/UIConfig_sfx.mk | 1 sfx2/source/dialog/basedlgs.cxx | 4 +- sfx2/source/dialog/recfloat.cxx | 23 ++++++--------- sfx2/source/dialog/recfloat.src | 24 --------------- sfx2/source/inc/recfloat.hxx | 2 - sfx2/uiconfig/ui/floatingrecord.ui | 53 +++++++++++++++++++++++++++++++++++ svx/source/unodraw/unoshap4.cxx | 12 +++++++ vcl/source/uipreviewer/previewer.cxx | 2 - vcl/source/window/floatwin.cxx | 4 +- vcl/source/window/syswin.cxx | 5 +-- vcl/source/window/tabpage.cxx | 3 + 17 files changed, 106 insertions(+), 53 deletions(-)
New commits: commit dc5e8921530e811d0154af39504e4c149a6eae13 Author: Caolán McNamara <[email protected]> Date: Tue Sep 2 12:02:54 2014 +0100 convert SID_RECORDING_FLOATWINDOW to .ui Change-Id: Iae3f0269e5e7f830465580dc4a520ba01ef87a79 diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx index 2e4c14a..cef733f 100644 --- a/include/sfx2/basedlgs.hxx +++ b/include/sfx2/basedlgs.hxx @@ -141,7 +141,8 @@ protected: SfxFloatingWindow( SfxBindings *pBindings, SfxChildWindow *pCW, Window* pParent, - const OString& rID, const OUString& rUIXMLDescription); + const OString& rID, const OUString& rUIXMLDescription, + const css::uno::Reference<css::frame::XFrame> &rFrame = css::uno::Reference<css::frame::XFrame>()); virtual ~SfxFloatingWindow(); virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE; diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx index 02ae4ca..c768760 100644 --- a/include/vcl/floatwin.hxx +++ b/include/vcl/floatwin.hxx @@ -121,7 +121,8 @@ public: public: explicit FloatingWindow(Window* pParent, WinBits nStyle = WB_STDFLOATWIN); - explicit FloatingWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription); + explicit FloatingWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, + const css::uno::Reference<css::frame::XFrame> &rFrame = css::uno::Reference<css::frame::XFrame>()); explicit FloatingWindow( Window* pParent, const ResId& ); virtual ~FloatingWindow(); diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index d901ccd..93c5926 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -170,7 +170,7 @@ private: protected: // Single argument ctors shall be explicit. explicit SystemWindow(WindowType nType); - void loadUI(Window* pParent, const OString& rID, const OUString& rUIXMLDescription); + void loadUI(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame = css::uno::Reference<css::frame::XFrame>()); void SetWindowStateData( const WindowStateData& rData ); diff --git a/sfx2/UIConfig_sfx.mk b/sfx2/UIConfig_sfx.mk index 5142f92..9a555b9 100644 --- a/sfx2/UIConfig_sfx.mk +++ b/sfx2/UIConfig_sfx.mk @@ -22,6 +22,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\ sfx2/uiconfig/ui/documentpropertiesdialog \ sfx2/uiconfig/ui/editdurationdialog \ sfx2/uiconfig/ui/errorfindemaildialog \ + sfx2/uiconfig/ui/floatingrecord \ sfx2/uiconfig/ui/helpbookmarkpage \ sfx2/uiconfig/ui/helpcontrol \ sfx2/uiconfig/ui/helpcontentpage \ diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index e17c77f..a15dd99 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -483,8 +483,8 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx, SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW, Window* pParent, - const OString& rID, const OUString& rUIXMLDescription) : - FloatingWindow(pParent, rID, rUIXMLDescription), + const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame) : + FloatingWindow(pParent, rID, rUIXMLDescription, rFrame), pBindings(pBindinx), pImp( new SfxFloatingWindow_Impl ) { diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index 9b8faba..2b0b429 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -167,25 +167,22 @@ SfxRecordingFloat_Impl::SfxRecordingFloat_Impl( : SfxFloatingWindow( pBind, pChildWin, pParent, - SfxResId( SID_RECORDING_FLOATWINDOW ) ) - , aTbx( this, SfxResId(SID_RECORDING_FLOATWINDOW) ) + "FloatingRecord", "sfx/ui/floatingrecord.ui", pBind->GetActiveFrame() ) { + get(m_pTbx, "toolbar"); + // Retrieve label from helper function - uno::Reference< frame::XFrame > xFrame = GetBindings().GetActiveFrame(); + uno::Reference< frame::XFrame > xFrame = getFrame(); OUString aCommandStr( ".uno:StopRecording" ); - aTbx.SetItemText( SID_STOP_RECORDING, GetLabelFromCommandURL( aCommandStr, xFrame )); - - // Determine size of toolbar - Size aTbxSize = aTbx.CalcWindowSizePixel(); - aTbx.SetPosSizePixel( Point(), aTbxSize ); - SetOutputSizePixel( aTbxSize ); + sal_uInt16 nItemId = m_pTbx->GetItemId(aCommandStr); + m_pTbx->SetItemText( nItemId, GetLabelFromCommandURL( aCommandStr, xFrame )); // create a generic toolbox controller for our internal toolbox svt::GenericToolboxController* pController = new svt::GenericToolboxController( ::comphelper::getProcessComponentContext(), xFrame, - &aTbx, - SID_STOP_RECORDING, + m_pTbx, + nItemId, aCommandStr ); xStopRecTbxCtrl = uno::Reference< frame::XToolbarController >( static_cast< cppu::OWeakObject* >( pController ), @@ -194,7 +191,7 @@ SfxRecordingFloat_Impl::SfxRecordingFloat_Impl( if ( xUpdate.is() ) xUpdate->update(); - aTbx.SetSelectHdl( LINK( this, SfxRecordingFloat_Impl, Select ) ); + m_pTbx->SetSelectHdl( LINK( this, SfxRecordingFloat_Impl, Select ) ); // start recording SfxBoolItem aItem( SID_RECORDMACRO, true ); @@ -248,7 +245,7 @@ void SfxRecordingFloat_Impl::StateChanged( StateChangedType nStateChange ) IMPL_LINK( SfxRecordingFloat_Impl, Select, ToolBox*, pToolBar ) { (void)pToolBar; - sal_Int16 nKeyModifier( (sal_Int16)aTbx.GetModifier() ); + sal_Int16 nKeyModifier( (sal_Int16)m_pTbx->GetModifier() ); if ( xStopRecTbxCtrl.is() ) xStopRecTbxCtrl->execute( nKeyModifier ); diff --git a/sfx2/source/dialog/recfloat.src b/sfx2/source/dialog/recfloat.src index 119374b..8a5c484 100644 --- a/sfx2/source/dialog/recfloat.src +++ b/sfx2/source/dialog/recfloat.src @@ -22,30 +22,6 @@ #define STD_MASKCOLOR Color { Red = 0xC000; Green = 0xC000; Blue = 0xC000; } -FloatingWindow SID_RECORDING_FLOATWINDOW -{ - HelpID = "sfx2:FloatingWindow:SID_RECORDING_FLOATWINDOW"; - Moveable = TRUE ; - Closeable = TRUE ; - Hide = TRUE ; - SVLook = TRUE ; - Text [ en-US ] = "Record Macro"; -}; - -ToolBox SID_RECORDING_FLOATWINDOW -{ - SVLook = TRUE ; - ButtonType = BUTTON_TEXT; - ItemList = - { - ToolBoxItem - { - Identifier = SID_STOP_RECORDING; - Command = ".uno:StopRecording"; - }; - }; -}; - String STR_MACRO_LOSS { Text [ en-US ] = "Do you really want to cancel the recording? Any steps recorded up to this point will be lost."; diff --git a/sfx2/source/inc/recfloat.hxx b/sfx2/source/inc/recfloat.hxx index 5369b16..23c9b36 100644 --- a/sfx2/source/inc/recfloat.hxx +++ b/sfx2/source/inc/recfloat.hxx @@ -39,7 +39,7 @@ public: class SfxRecordingFloat_Impl : public SfxFloatingWindow { - ToolBox aTbx; + ToolBox* m_pTbx; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XToolbarController > xStopRecTbxCtrl; public: SfxRecordingFloat_Impl( SfxBindings* pBindings , diff --git a/sfx2/uiconfig/ui/floatingrecord.ui b/sfx2/uiconfig/ui/floatingrecord.ui new file mode 100644 index 0000000..653867a --- /dev/null +++ b/sfx2/uiconfig/ui/floatingrecord.ui @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <object class="GtkWindow" id="FloatingRecord"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="no_show_all">True</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Record Macro</property> + <property name="type_hint">utility</property> + <property name="deletable">False</property> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkToolbar" id="toolbar"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="toolbar_style">text</property> + <property name="show_arrow">False</property> + <child> + <object class="GtkToolButton" id="stop"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="action_name">.uno:StopRecording</property> + <property name="label" translatable="yes">Stop Recording</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="homogeneous">True</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + </object> +</interface> diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 37e7a22..caedcbc 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -164,10 +164,10 @@ FloatingWindow::FloatingWindow( Window* pParent, const ResId& rResId ) : Show(); } -FloatingWindow::FloatingWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription) +FloatingWindow::FloatingWindow(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame) : SystemWindow(WINDOW_FLOATINGWINDOW) { - loadUI(pParent, rID, rUIXMLDescription); + loadUI(pParent, rID, rUIXMLDescription, rFrame); } //Find the real parent stashed in mpDialogParent. diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 1cf207c..1277093 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -95,11 +95,12 @@ SystemWindow::SystemWindow(WindowType nType) Init(); } -void SystemWindow::loadUI(Window* pParent, const OString& rID, const OUString& rUIXMLDescription) +void SystemWindow::loadUI(Window* pParent, const OString& rID, const OUString& rUIXMLDescription, + const css::uno::Reference<css::frame::XFrame> &rFrame) { mbIsDefferedInit = true; mpDialogParent = pParent; //should be unset in doDeferredInit - m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID); + m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID, rFrame); } SystemWindow::~SystemWindow() commit b6cc10ecf28d2e0ae25383f2dc82b66e67971b08 Author: Caolán McNamara <[email protected]> Date: Tue Sep 2 14:35:35 2014 +0100 make sort list options page fill vertically and horizontally Change-Id: I495ab15fa9b658e54f039aede69a7a79b6296635 diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx index d2494df..f7d0d9f 100644 --- a/cui/source/options/optchart.cxx +++ b/cui/source/options/optchart.cxx @@ -58,7 +58,7 @@ SvxDefaultColorOptPage::SvxDefaultColorOptPage(Window* pParent, const SfxItemSet m_pValSetColorBox->SetStyle( m_pValSetColorBox->GetStyle() | WB_ITEMBORDER | WB_NAMEFIELD ); m_pValSetColorBox->SetColCount( 8 ); - m_pValSetColorBox->SetLineCount( 13 ); + m_pValSetColorBox->SetLineCount( 14 ); m_pValSetColorBox->SetExtraSpacing( 0 ); m_pValSetColorBox->Show(); diff --git a/cui/uiconfig/ui/dbregisterpage.ui b/cui/uiconfig/ui/dbregisterpage.ui index 42baf1a..fad2f62 100644 --- a/cui/uiconfig/ui/dbregisterpage.ui +++ b/cui/uiconfig/ui/dbregisterpage.ui @@ -1,11 +1,13 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.16.0 on Fri Jan 10 20:45:20 2014 --> +<!-- Generated with glade 3.16.1 --> <interface> - <!-- interface-requires gtk+ 3.0 --> + <requires lib="gtk+" version="3.0"/> <!-- interface-requires LibreOffice 1.0 --> <object class="GtkGrid" id="DbRegisterPage"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> <property name="border_width">6</property> <property name="row_spacing">12</property> <child> @@ -13,6 +15,7 @@ <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> @@ -21,18 +24,22 @@ <property name="can_focus">False</property> <property name="margin_top">6</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="GtkBox" id="box1"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> <property name="orientation">vertical</property> <property name="spacing">12</property> <child> <object class="svtlo-SvSimpleTableContainer" id="pathctrl"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> <property name="vexpand">True</property> <child internal-child="selection"> <object class="GtkTreeSelection" id="Simple Table Container-selection1"/> diff --git a/sc/uiconfig/scalc/ui/optsortlists.ui b/sc/uiconfig/scalc/ui/optsortlists.ui index 25e4fb9..3f47ed9 100644 --- a/sc/uiconfig/scalc/ui/optsortlists.ui +++ b/sc/uiconfig/scalc/ui/optsortlists.ui @@ -1,9 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> <interface> - <!-- interface-requires gtk+ 3.0 --> + <requires lib="gtk+" version="3.0"/> <object class="GtkBox" id="OptSortLists"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> <property name="border_width">6</property> <property name="orientation">vertical</property> <child> diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index b643831..655c334 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -80,6 +80,9 @@ TabPage::TabPage(Window *pParent, const OString& rID, const OUString& rUIXMLDesc { ImplInit(pParent, 0); m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID); + set_hexpand(true); + set_vexpand(true); + set_expand(true); } void TabPage::StateChanged( StateChangedType nType ) commit 7d993c46f031995ee83e59a6c7221b3e3536c5cf Author: Caolán McNamara <[email protected]> Date: Tue Sep 2 13:31:01 2014 +0100 make previewer default to resizeable Change-Id: I54d3773c8a11b6b1a2515127233e824380a4de15 diff --git a/vcl/source/uipreviewer/previewer.cxx b/vcl/source/uipreviewer/previewer.cxx index 8040059..5bd2d3d 100644 --- a/vcl/source/uipreviewer/previewer.cxx +++ b/vcl/source/uipreviewer/previewer.cxx @@ -66,7 +66,7 @@ int UIPreviewApp::Main() try { - Dialog *pDialog = new Dialog(DIALOG_NO_PARENT, WB_STDDIALOG); + Dialog *pDialog = new Dialog(DIALOG_NO_PARENT, WB_STDDIALOG | WB_SIZEABLE); { VclBuilder aBuilder(pDialog, OUString(), uifiles[0]); commit ecc58cf3a78891d44f109b1647252a475cea7ad5 Author: Caolán McNamara <[email protected]> Date: Tue Sep 2 13:16:49 2014 +0100 coverity#707263 Uncaught exception Change-Id: I7c43c91cad4045a3439182925ca195fc898f593f diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index a05f61e..4d7f298 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -940,7 +940,17 @@ bool SvxMediaShape::getPropertyValueImpl( const OUString& rName, const SfxItemPr break; case OWN_ATTR_MEDIA_STREAM: - rValue <<= pMedia->GetInputStream(); + try + { + rValue <<= pMedia->GetInputStream(); + } + catch (const css::ucb::ContentCreationException& e) + { + throw css::lang::WrappedTargetException( + "Error Getting InputStream!", + static_cast < OWeakObject * > ( this ), + makeAny( e ) ); + } break; case OWN_ATTR_MEDIA_TEMPFILEURL:
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
