extras/source/glade/libreoffice-catalog.xml.in | 4 + sd/AllLangResTarget_sd.mk | 2 sd/UIConfig_sdraw.mk | 1 sd/UIConfig_simpress.mk | 1 sd/inc/glob.hrc | 1 sd/source/core/glob.src | 5 + sd/source/ui/dlg/RemoteDialog.cxx | 30 +++------ sd/source/ui/dlg/RemoteDialog.hxx | 8 -- sd/source/ui/dlg/RemoteDialog.src | 56 ----------------- sd/source/ui/dlg/RemoteDialogClientBox.cxx | 73 +++++++++++++---------- sd/source/ui/dlg/RemoteDialogClientBox.hxx | 6 - sd/source/ui/dlg/dlgolbul.cxx | 58 ++++++++---------- sd/source/ui/dlg/dlgolbul.src | 63 -------------------- sd/source/ui/inc/OutlineBulletDlg.hxx | 10 +-- sd/source/ui/inc/RemoteDialog.hrc | 18 ----- sd/source/ui/inc/dlgolbul.hrc | 21 ------ sd/source/ui/table/TableDesignPane.cxx | 16 +---- sd/uiconfig/simpress/ui/remotedialog.ui | 78 +++++++++++++++++++++++++ vcl/inc/svids.hrc | 1 vcl/source/src/btntext.src | 5 + vcl/source/window/builder.cxx | 2 21 files changed, 194 insertions(+), 265 deletions(-)
New commits: commit 2d1782250088280425833c060513245bf3defed7 Author: Caolán McNamara <[email protected]> Date: Fri Nov 15 11:21:30 2013 +0000 convert bullets and numbering dialog to .ui Change-Id: I303684cd0d4e2f3092cc776cd0b77725d6741bc6 diff --git a/sd/AllLangResTarget_sd.mk b/sd/AllLangResTarget_sd.mk index 895bdbb..45d874e 100644 --- a/sd/AllLangResTarget_sd.mk +++ b/sd/AllLangResTarget_sd.mk @@ -44,7 +44,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\ sd/source/ui/dlg/animobjs.src \ sd/source/ui/dlg/dlgass.src \ sd/source/ui/dlg/dlgfield.src \ - sd/source/ui/dlg/dlgolbul.src \ sd/source/ui/dlg/LayerDialog.src \ sd/source/ui/dlg/navigatr.src \ sd/source/ui/dlg/PaneDockingWindow.src \ diff --git a/sd/UIConfig_sdraw.mk b/sd/UIConfig_sdraw.mk index 90c2448..228a4d7 100644 --- a/sd/UIConfig_sdraw.mk +++ b/sd/UIConfig_sdraw.mk @@ -67,6 +67,7 @@ $(eval $(call gb_UIConfig_add_toolbarfiles,modules/sdraw,\ $(eval $(call gb_UIConfig_add_uifiles,modules/sdraw,\ sd/uiconfig/sdraw/ui/breakdialog \ + sd/uiconfig/sdraw/ui/bulletsandnumbering \ sd/uiconfig/sdraw/ui/crossfadedialog \ sd/uiconfig/sdraw/ui/dlgsnap \ sd/uiconfig/sdraw/ui/copydlg \ diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx index a09b92e..a03ae76 100644 --- a/sd/source/ui/dlg/dlgolbul.cxx +++ b/sd/source/ui/dlg/dlgolbul.cxx @@ -38,7 +38,6 @@ #include "sdresid.hxx" #include "glob.hrc" -#include "dlgolbul.hrc" #include "bulmaper.hxx" #include "DrawDocShell.hxx" #include <svl/aeitem.hxx> @@ -52,13 +51,12 @@ OutlineBulletDlg::OutlineBulletDlg( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ) - : SfxTabDialog ( pParent, SdResId(TAB_OUTLINEBULLET) ), - aInputSet ( *pAttr ), - bTitle ( sal_False ), - pSdView ( pView ) + : SfxTabDialog( pParent, "BulletsAndNumberingDialog", + "modules/sdraw/ui/bulletsandnumbering.ui") + , aInputSet( *pAttr ) + , bTitle(false) + , pSdView(pView) { - FreeResource(); - aInputSet.MergeRange( SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL ); aInputSet.Put( *pAttr ); @@ -128,15 +126,14 @@ OutlineBulletDlg::OutlineBulletDlg( SetInputSet( &aInputSet ); if(!bTitle) - AddTabPage(RID_SVXPAGE_PICK_SINGLE_NUM); + AddTabPage("singlenum", RID_SVXPAGE_PICK_SINGLE_NUM); else - RemoveTabPage( RID_SVXPAGE_PICK_SINGLE_NUM ); - - AddTabPage( RID_SVXPAGE_PICK_BULLET ); - AddTabPage( RID_SVXPAGE_PICK_BMP ); - AddTabPage(RID_SVXPAGE_NUM_OPTIONS ); - AddTabPage(RID_SVXPAGE_NUM_POSITION ); + RemoveTabPage("singlenum"); + AddTabPage("bullets", RID_SVXPAGE_PICK_BULLET); + AddTabPage("graphics", RID_SVXPAGE_PICK_BMP); + m_nOptionsId = AddTabPage("customize", RID_SVXPAGE_NUM_OPTIONS); + m_nPositionId = AddTabPage("position", RID_SVXPAGE_NUM_POSITION); } OutlineBulletDlg::~OutlineBulletDlg() @@ -146,30 +143,25 @@ OutlineBulletDlg::~OutlineBulletDlg() void OutlineBulletDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { - switch ( nId ) + if (nId == m_nOptionsId) { - case RID_SVXPAGE_NUM_OPTIONS: + if( pSdView ) { - if( pSdView ) - { - FieldUnit eMetric = pSdView->GetDoc().GetUIUnit(); - SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,(sal_uInt16)eMetric)); - rPage.PageCreated(aSet); - } + FieldUnit eMetric = pSdView->GetDoc().GetUIUnit(); + SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); + aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,(sal_uInt16)eMetric)); + rPage.PageCreated(aSet); } - break; - case RID_SVXPAGE_NUM_POSITION: + } + else if (nId == m_nPositionId) + { + if( pSdView ) { - if( pSdView ) - { - FieldUnit eMetric = pSdView->GetDoc().GetUIUnit(); - SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,(sal_uInt16)eMetric)); - rPage.PageCreated(aSet); - } + FieldUnit eMetric = pSdView->GetDoc().GetUIUnit(); + SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); + aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM,(sal_uInt16)eMetric)); + rPage.PageCreated(aSet); } - break; } } diff --git a/sd/source/ui/dlg/dlgolbul.src b/sd/source/ui/dlg/dlgolbul.src deleted file mode 100644 index c7b625a..0000000 --- a/sd/source/ui/dlg/dlgolbul.src +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- 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 <svx/dialogs.hrc> -#include "dlgolbul.hrc" - -TabDialog TAB_OUTLINEBULLET -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Text [ en-US ] = "Bullets and Numbering" ; - Moveable = TRUE ; - TabControl 1 - { - SVLook = TRUE ; - PageList = - { - PageItem - { - Identifier = RID_SVXPAGE_PICK_BULLET ; - Text [ en-US ] = "Bullets" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_PICK_SINGLE_NUM ; - Text [ en-US ] = "Numbering type" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_PICK_BMP ; - Text [ en-US ] = "Graphics" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_NUM_POSITION ; - Text [ en-US ] = "Position" ; - }; - PageItem - { - Identifier = RID_SVXPAGE_NUM_OPTIONS ; - Text [ en-US ] = "Customize" ; - }; - }; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/inc/OutlineBulletDlg.hxx b/sd/source/ui/inc/OutlineBulletDlg.hxx index 3efc998..9d145cc 100644 --- a/sd/source/ui/inc/OutlineBulletDlg.hxx +++ b/sd/source/ui/inc/OutlineBulletDlg.hxx @@ -22,8 +22,6 @@ #include <sfx2/tabdlg.hxx> -#include "dlgolbul.hrc" - namespace sd { class View; @@ -39,7 +37,7 @@ public: ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView ); - virtual ~OutlineBulletDlg (void); + virtual ~OutlineBulletDlg (); const SfxItemSet* GetOutputItemSet() const; @@ -51,8 +49,10 @@ private: SfxItemSet aInputSet; SfxItemSet *pOutputSet; - sal_Bool bTitle; - ::sd::View *pSdView; + sal_uInt16 m_nOptionsId; + sal_uInt16 m_nPositionId; + sal_Bool bTitle; + ::sd::View *pSdView; }; } // end of namespace sd diff --git a/sd/source/ui/inc/dlgolbul.hrc b/sd/source/ui/inc/dlgolbul.hrc deleted file mode 100644 index bf75408..0000000 --- a/sd/source/ui/inc/dlgolbul.hrc +++ /dev/null @@ -1,21 +0,0 @@ -/* -*- 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 TAB_OUTLINEBULLET 20601 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 6abfb890a2fad1931a79d53018f932205a668264 Author: Caolán McNamara <[email protected]> Date: Fri Nov 15 10:26:19 2013 +0000 convert impress remote dialog to .ui Change-Id: I4ed22a776720bd6de64d08767a03a746276acba4 diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in index d4b88a0..83946db 100644 --- a/extras/source/glade/libreoffice-catalog.xml.in +++ b/extras/source/glade/libreoffice-catalog.xml.in @@ -533,6 +533,10 @@ generic-name="BmpWindow" parent="GtkDrawingArea" icon-name="widget-gtk-drawingarea"/> + <glade-widget-class title="ClientBox" name="sduilo-ClientBox" + generic-name="ClientBox" parent="GtkDrawingArea" + icon-name="widget-gtk-drawingarea"/> + <glade-widget-class title="Recent Documents View" name="sfxlo-RecentDocsView" generic-name="Icon View" parent="GtkIconView" icon-name="widget-gtk-iconview"/> diff --git a/sd/AllLangResTarget_sd.mk b/sd/AllLangResTarget_sd.mk index 8cb5727..895bdbb 100644 --- a/sd/AllLangResTarget_sd.mk +++ b/sd/AllLangResTarget_sd.mk @@ -48,7 +48,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\ sd/source/ui/dlg/LayerDialog.src \ sd/source/ui/dlg/navigatr.src \ sd/source/ui/dlg/PaneDockingWindow.src \ - sd/source/ui/dlg/RemoteDialog.src \ sd/source/ui/dlg/sdpreslt.src \ sd/source/ui/dlg/tpaction.src \ sd/source/ui/dlg/vectdlg.src \ diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk index 2bea235..040db6b 100644 --- a/sd/UIConfig_simpress.mk +++ b/sd/UIConfig_simpress.mk @@ -89,6 +89,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\ sd/uiconfig/simpress/ui/presentationdialog \ sd/uiconfig/simpress/ui/printeroptions \ sd/uiconfig/simpress/ui/prntopts \ + sd/uiconfig/simpress/ui/remotedialog \ sd/uiconfig/simpress/ui/sdviewpage \ sd/uiconfig/simpress/ui/slidetransitionspanel \ sd/uiconfig/simpress/ui/tabledesignpanel \ diff --git a/sd/inc/glob.hrc b/sd/inc/glob.hrc index 622ce93..522ecb2 100644 --- a/sd/inc/glob.hrc +++ b/sd/inc/glob.hrc @@ -127,6 +127,7 @@ #define STR_SLIDE_NAME RID_GLOB_START+112 #define STR_LEFT_IMPRESS_PANE_SHELL RID_GLOB_START+113 #define STR_LEFT_DRAW_PANE_SHELL RID_GLOB_START+114 +#define STR_ENTER_PIN RID_GLOB_START+115 #define STR_TOOL_PANEL_SHELL RID_GLOB_START+116 #define STR_TASKPANEVIEWSHELL RID_GLOB_START+117 diff --git a/sd/source/core/glob.src b/sd/source/core/glob.src index 2ad0d58..0e6f235 100644 --- a/sd/source/core/glob.src +++ b/sd/source/core/glob.src @@ -449,4 +449,9 @@ String STR_POOLSHEET_LAST_COLUMN Text [ en-US ] = "Last column" ; }; +String STR_ENTER_PIN +{ + Text [ en-US ] = "Enter PIN:"; +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx index 5da2882..fd2fe81 100644 --- a/sd/source/ui/dlg/RemoteDialog.cxx +++ b/sd/source/ui/dlg/RemoteDialog.cxx @@ -12,19 +12,18 @@ #include "cusshow.hxx" #include "RemoteDialog.hxx" -#include "RemoteDialog.hrc" #include "RemoteServer.hxx" using namespace ::sd; using namespace ::std; -RemoteDialog::RemoteDialog( Window *pWindow ) : - ModalDialog( pWindow, SdResId( DLG_PAIR_REMOTE ) ), - mButtonConnect( this, SdResId( BTN_CONNECT ) ), - mButtonCancel( this, SdResId( BTN_CANCEL ) ), - mClientBox( this, SdResId( LB_SERVERS ) ) +RemoteDialog::RemoteDialog( Window *pWindow ) + : ModalDialog(pWindow, "RemoteDialog", + "modules/simpress/ui/remotedialog.ui") { - FreeResource(); + get(m_pButtonConnect, "connect"); + get(m_pButtonClose, "close"); + get(m_pClientBox, "tree"); #ifdef ENABLE_SDREMOTE RemoteServer::ensureDiscoverable(); @@ -36,30 +35,25 @@ RemoteDialog::RemoteDialog( Window *pWindow ) : for ( vector<ClientInfo*>::const_iterator aIt( aClients.begin() ); aIt != aEnd; ++aIt ) { - mClientBox.addEntry( *aIt ); + m_pClientBox->addEntry( *aIt ); } #endif - mButtonConnect.SetClickHdl( LINK( this, RemoteDialog, HandleConnectButton ) ); + m_pButtonConnect->SetClickHdl( LINK( this, RemoteDialog, HandleConnectButton ) ); SetCloseHdl( LINK( this, RemoteDialog, CloseHdl ) ); - mButtonCancel.SetClickHdl( LINK( this, RemoteDialog, CloseHdl ) ); + m_pButtonClose->SetClickHdl( LINK( this, RemoteDialog, CloseHdl ) ); } -RemoteDialog::~RemoteDialog() -{ -} - -// ----------------------------------------------------------------------- IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton) { // setBusy( true ); // Fixme: Try and connect #if defined(ENABLE_SDREMOTE) && defined(ENABLE_SDREMOTE_BLUETOOTH) - long aSelected = mClientBox.GetActiveEntryIndex(); + long aSelected = m_pClientBox->GetActiveEntryIndex(); if ( aSelected < 0 ) return 1; - TClientBoxEntry aEntry = mClientBox.GetEntryData(aSelected); - OUString aPin ( mClientBox.getPin() ); + TClientBoxEntry aEntry = m_pClientBox->GetEntryData(aSelected); + OUString aPin ( m_pClientBox->getPin() ); if ( RemoteServer::connectClient( aEntry->m_pClientInfo, aPin ) ) { return CloseHdl( 0 ); diff --git a/sd/source/ui/dlg/RemoteDialog.hxx b/sd/source/ui/dlg/RemoteDialog.hxx index 938192f..27adf2b 100644 --- a/sd/source/ui/dlg/RemoteDialog.hxx +++ b/sd/source/ui/dlg/RemoteDialog.hxx @@ -24,16 +24,14 @@ namespace sd class RemoteDialog : public ModalDialog { private: - OKButton mButtonConnect; - CancelButton mButtonCancel; - ClientBox mClientBox; + PushButton* m_pButtonConnect; + CloseButton* m_pButtonClose; + ClientBox* m_pClientBox; DECL_DLLPRIVATE_LINK( HandleConnectButton, void * ); DECL_LINK( CloseHdl, void * ); public: RemoteDialog( Window* pWindow ); - ~RemoteDialog(); - }; } diff --git a/sd/source/ui/dlg/RemoteDialog.src b/sd/source/ui/dlg/RemoteDialog.src deleted file mode 100644 index 609dbee..0000000 --- a/sd/source/ui/dlg/RemoteDialog.src +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- 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/. - */ -#include "helpids.h" -#include <svx/svxids.hrc> -#include "RemoteDialog.hrc" - -ModalDialog DLG_PAIR_REMOTE -{ - - HelpID = CMD_SID_REMOTE_DLG ; - OutputSize = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 200, 160 ) ; - Text [ en-US ] = "Impress Remote" ; - Moveable = TRUE ; - Closeable = TRUE ; - - Control LB_SERVERS - { -//; HelpId = HID_SD_SLIDETRANSITIONPANE_LB_SLIDE_TRANSITIONS; - Border = TRUE ; - TabStop = TRUE ; -//; AutoVScroll = TRUE ; -//; Pos = MAP_APPFONT ( 0, 0 ) ; - Size = MAP_APPFONT( 200, 140 ); - }; - - OKButton BTN_CONNECT - { - Pos = MAP_APPFONT ( 100, 146 ) ; - Size = MAP_APPFONT ( 50, 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Connect" ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 150, 146 ) ; - Size = MAP_APPFONT ( 50, 14 ) ; - Text [ en-US ] = "Close" ; - TabStop = TRUE ; - }; - - String STR_ENTER_PIN - { - Text [ en-US ] = "Enter PIN:"; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx index f1eef9d..a47f45a 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx @@ -20,7 +20,6 @@ #include "svtools/controldims.hrc" #include "RemoteDialogClientBox.hxx" -#include "RemoteDialog.hrc" #include "RemoteServer.hxx" #include "comphelper/processfactory.hxx" @@ -28,6 +27,8 @@ #include "com/sun/star/deployment/DependencyException.hpp" #include "com/sun/star/deployment/DeploymentException.hpp" +#include "glob.hrc" + using namespace ::com::sun::star; namespace sd { @@ -63,8 +64,8 @@ ClientRemovedListener::~ClientRemovedListener() //------------------------------------------------------------------------------ // ClientBox //------------------------------------------------------------------------------ -ClientBox::ClientBox( Dialog* pParent, const SdResId& aId ) : - Control( pParent, aId ), +ClientBox::ClientBox( Window* pParent, WinBits nStyle ) : + Control( pParent, nStyle ), m_bHasScrollBar( false ), m_bHasActive( false ), m_bNeedsRecalc( true ), @@ -75,15 +76,13 @@ ClientBox::ClientBox( Dialog* pParent, const SdResId& aId ) : m_nTopIndex( 0 ), m_nActiveHeight( 0 ), m_nExtraHeight( 2 ), - m_aPinBox( this, SdResId( INPUT_PIN ) ), - m_aPinDescription( this, SdResId( TEXT_PIN ) ), - m_pScrollBar( new ScrollBar( this, WB_VERT ) ) + m_aPinBox( this, 0 ), + m_aScrollBar( this, WB_VERT ) { - m_pScrollBar->SetScrollHdl( LINK( this, ClientBox, ScrollHdl ) ); - m_pScrollBar->EnableDrag(); + m_aScrollBar.SetScrollHdl( LINK( this, ClientBox, ScrollHdl ) ); + m_aScrollBar.EnableDrag(); m_aPinBox.SetUseThousandSep(false); -// m_aPinDescription.SetText( SD_RESSTR( STR_ENTER_PIN ) ); SetPaintTransparent( true ); SetPosPixel( Point( RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP ) ); @@ -112,6 +111,20 @@ ClientBox::ClientBox( Dialog* pParent, const SdResId& aId ) : Show(); } +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeClientBox(Window *pParent, VclBuilder::stringmap &rMap) +{ + WinBits nWinStyle = WB_TABSTOP; + OString sBorder = VclBuilder::extractCustomProperty(rMap); + if (!sBorder.isEmpty()) + nWinStyle |= WB_BORDER; + return new ClientBox(pParent, nWinStyle); +} + +Size ClientBox::GetOptimalSize() const +{ + return LogicToPixel(Size(200, 140), MAP_APPFONT); +} + //------------------------------------------------------------------------------ ClientBox::~ClientBox() { @@ -151,7 +164,7 @@ void ClientBox::CalcActiveHeight( const long nPos ) // Text entry height Size aSize = GetOutputSizePixel(); if ( m_bHasScrollBar ) - aSize.Width() -= m_pScrollBar->GetSizePixel().Width(); + aSize.Width() -= m_aScrollBar.GetSizePixel().Width(); aSize.Width() -= ICON_OFFSET; @@ -173,7 +186,7 @@ Rectangle ClientBox::GetEntryRect( const long nPos ) const Size aSize( GetOutputSizePixel() ); if ( m_bHasScrollBar ) - aSize.Width() -= m_pScrollBar->GetSizePixel().Width(); + aSize.Width() -= m_aScrollBar.GetSizePixel().Width(); if ( m_vEntries[ nPos ]->m_bActive ) aSize.Height() = m_nActiveHeight; @@ -334,11 +347,11 @@ void ClientBox::DrawRow( const Rectangle& rRect, const TClientBoxEntry pEntry ) Size aBtnSize( m_aPinBox.GetSizePixel() ); Point aBtnPos( aRect.Left(), aRect.Bottom() - TOP_OFFSET - aBtnSize.Height() ); -// m_aPinDescription.SetPosPixel( aBtnPos ); + OUString sPinText(SD_RESSTR(STR_ENTER_PIN)); DrawText( Rectangle( aBtnPos.X(), aBtnPos.Y(), rRect.Right(), rRect.Bottom() - TOP_OFFSET), - SD_RESSTR( STR_ENTER_PIN ), 0 ); + sPinText, 0 ); - aBtnPos = Point( aRect.Left() + GetTextWidth( SD_RESSTR( STR_ENTER_PIN ) ), + aBtnPos = Point( aRect.Left() + GetTextWidth( sPinText ), aRect.Bottom() - TOP_OFFSET - aBtnSize.Height() ); m_aPinBox.SetPosPixel( aBtnPos ); @@ -407,7 +420,7 @@ void ClientBox::RecalcAll() } if ( m_bHasScrollBar ) - m_pScrollBar->SetThumbPos( m_nTopIndex ); + m_aScrollBar.SetThumbPos( m_nTopIndex ); } } @@ -478,7 +491,7 @@ void ClientBox::Paint( const Rectangle &/*rPaintRect*/ ) Size aSize( GetOutputSizePixel() ); if ( m_bHasScrollBar ) - aSize.Width() -= m_pScrollBar->GetSizePixel().Width(); + aSize.Width() -= m_aScrollBar.GetSizePixel().Width(); const ::osl::MutexGuard aGuard( m_entriesMutex ); @@ -518,20 +531,20 @@ void ClientBox::SetupScrollBar() if ( m_nTopIndex + aSize.Height() > nTotalHeight ) m_nTopIndex = nTotalHeight - aSize.Height(); - m_pScrollBar->SetPosSizePixel( Point( aSize.Width() - nScrBarSize, 0 ), + m_aScrollBar.SetPosSizePixel( Point( aSize.Width() - nScrBarSize, 0 ), Size( nScrBarSize, aSize.Height() ) ); - m_pScrollBar->SetRangeMax( nTotalHeight ); - m_pScrollBar->SetVisibleSize( aSize.Height() ); - m_pScrollBar->SetPageSize( ( aSize.Height() * 4 ) / 5 ); - m_pScrollBar->SetLineSize( m_nStdHeight ); - m_pScrollBar->SetThumbPos( m_nTopIndex ); + m_aScrollBar.SetRangeMax( nTotalHeight ); + m_aScrollBar.SetVisibleSize( aSize.Height() ); + m_aScrollBar.SetPageSize( ( aSize.Height() * 4 ) / 5 ); + m_aScrollBar.SetLineSize( m_nStdHeight ); + m_aScrollBar.SetThumbPos( m_nTopIndex ); if ( !m_bHasScrollBar ) - m_pScrollBar->Show(); + m_aScrollBar.Show(); } else if ( m_bHasScrollBar ) { - m_pScrollBar->Hide(); + m_aScrollBar.Hide(); m_nTopIndex = 0; } @@ -607,11 +620,11 @@ long ClientBox::Notify( NotifyEvent& rNEvt ) const CommandWheelData* pData = rNEvt.GetCommandEvent()->GetWheelData(); if ( pData->GetMode() == COMMAND_WHEEL_SCROLL ) { - long nThumbPos = m_pScrollBar->GetThumbPos(); + long nThumbPos = m_aScrollBar.GetThumbPos(); if ( pData->GetDelta() < 0 ) - m_pScrollBar->DoScroll( nThumbPos + m_nStdHeight ); + m_aScrollBar.DoScroll( nThumbPos + m_nStdHeight ); else - m_pScrollBar->DoScroll( nThumbPos - m_nStdHeight ); + m_aScrollBar.DoScroll( nThumbPos - m_nStdHeight ); bHandled = true; } } @@ -690,13 +703,13 @@ long ClientBox::addEntry( ClientInfo* pClientInfo ) void ClientBox::DoScroll( long nDelta ) { m_nTopIndex += nDelta; - Point aNewSBPt( m_pScrollBar->GetPosPixel() ); + Point aNewSBPt( m_aScrollBar.GetPosPixel() ); Rectangle aScrRect( Point(), GetOutputSizePixel() ); - aScrRect.Right() -= m_pScrollBar->GetSizePixel().Width(); + aScrRect.Right() -= m_aScrollBar.GetSizePixel().Width(); Scroll( 0, -nDelta, aScrRect ); - m_pScrollBar->SetPosPixel( aNewSBPt ); + m_aScrollBar.SetPosPixel( aNewSBPt ); } // ----------------------------------------------------------------------- diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.hxx b/sd/source/ui/dlg/RemoteDialogClientBox.hxx index 522225a..d4f754f 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.hxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.hxx @@ -106,9 +106,8 @@ class ClientBox: Link m_aClickHdl; NumericBox m_aPinBox; - FixedText m_aPinDescription; - ScrollBar* m_pScrollBar; + ScrollBar m_aScrollBar; com::sun::star::uno::Reference< ClientRemovedListener > m_xRemoveListener; @@ -140,12 +139,13 @@ class ClientBox: public: - ClientBox( Dialog* pParent, const SdResId& aId ); + ClientBox( Window* pParent, WinBits nStyle ); ~ClientBox(); void MouseButtonDown( const MouseEvent& rMEvt ); void Paint( const Rectangle &rPaintRect ); void Resize(); + Size GetOptimalSize() const; long Notify( NotifyEvent& rNEvt ); const Size GetMinOutputSizePixel() const; diff --git a/sd/source/ui/inc/RemoteDialog.hrc b/sd/source/ui/inc/RemoteDialog.hrc deleted file mode 100644 index a896f71..0000000 --- a/sd/source/ui/inc/RemoteDialog.hrc +++ /dev/null @@ -1,18 +0,0 @@ -/* -*- 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/. - */ -#include <sfx2/sfx.hrc> - -#define DLG_PAIR_REMOTE RID_APP_START+700 - -#define BTN_CONNECT 1 -#define BTN_CANCEL 2 -#define LB_SERVERS 3 -#define INPUT_PIN 4 -#define TEXT_PIN 5 -#define STR_ENTER_PIN 6 diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index a14e852..eb52e4f 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -387,17 +387,11 @@ void TableValueSet::updateSettings() extern "C" SAL_DLLPUBLIC_EXPORT ::Window* SAL_CALL makeTableValueSet(::Window *pParent, VclBuilder::stringmap &rMap) { - WinBits nWinBits = WB_TABSTOP; - - VclBuilder::stringmap::iterator aFind = rMap.find(OString("border")); - if (aFind != rMap.end()) - { - if (toBool(aFind->second)) - nWinBits |= WB_BORDER; - rMap.erase(aFind); - } - - return new TableValueSet(pParent, nWinBits); + WinBits nWinStyle = WB_TABSTOP; + OString sBorder = VclBuilder::extractCustomProperty(rMap); + if (!sBorder.isEmpty()) + nWinStyle |= WB_BORDER; + return new TableValueSet(pParent, nWinStyle); } // -------------------------------------------------------------------- diff --git a/sd/uiconfig/simpress/ui/remotedialog.ui b/sd/uiconfig/simpress/ui/remotedialog.ui new file mode 100644 index 0000000..ad2049f --- /dev/null +++ b/sd/uiconfig/simpress/ui/remotedialog.ui @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires LibreOffice 1.0 --> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="RemoteDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Impress Remote</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="margin_top">5</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="connect"> + <property name="label">gtk-connect</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="close"> + <property name="label">gtk-close</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="sduilo-ClientBox" id="tree:border"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">connect</action-widget> + <action-widget response="0">close</action-widget> + </action-widgets> + </object> +</interface> commit 3b9baca81ca1391ae8268db6fe418abcf59f7393 Author: Caolán McNamara <[email protected]> Date: Fri Nov 15 10:20:46 2013 +0000 add a stock connect button string Change-Id: Ib90364afebea4ff1b926f3c8b9fd949b155fa81f diff --git a/vcl/inc/svids.hrc b/vcl/inc/svids.hrc index 44579f9..5d9b068 100644 --- a/vcl/inc/svids.hrc +++ b/vcl/inc/svids.hrc @@ -166,6 +166,7 @@ #define SV_BUTTONTEXT_PLAY 10128 #define SV_BUTTONTEXT_FIND 10129 #define SV_BUTTONTEXT_STOP 10130 +#define SV_BUTTONTEXT_CONNECT 10131 #define SV_STDTEXT_FIRST SV_STDTEXT_SERVICENOTAVAILABLE #define SV_STDTEXT_SERVICENOTAVAILABLE 10210 diff --git a/vcl/source/src/btntext.src b/vcl/source/src/btntext.src index 43abeb9..b3a6b6b 100644 --- a/vcl/source/src/btntext.src +++ b/vcl/source/src/btntext.src @@ -181,4 +181,9 @@ String SV_BUTTONTEXT_STOP Text [ en-US ] = "~Stop" ; }; +String SV_BUTTONTEXT_CONNECT +{ + Text [ en-US ] = "C~onnect" ; +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 85b4915..f581f59 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -644,6 +644,8 @@ namespace return (VclResId(SV_BUTTONTEXT_FIND).toString()); else if (rType == "gtk-stop") return (VclResId(SV_BUTTONTEXT_STOP).toString()); + else if (rType == "gtk-connect") + return (VclResId(SV_BUTTONTEXT_CONNECT).toString()); SAL_WARN("vcl.layout", "unknown stock type: " << rType.getStr()); return OUString(); }
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
