summaryrefslogtreecommitdiff
path: root/cui/source/dialogs
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-12-25 21:15:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-12-26 09:59:39 +0000
commitc4792c86a7addb4a77301d78ac1fc11d5c2608b9 (patch)
tree33e8e2032a578c637de62a853ca7752795174df5 /cui/source/dialogs
parent0f19e2897ba8c3c60ae36f231badcf7969fb9dbe (diff)
convert grid control show columns dialog to .ui
Change-Id: I5518328c2f527b910b78cb20358f4e55acf07ead
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r--cui/source/dialogs/fmsearch.hrc1
-rw-r--r--cui/source/dialogs/showcols.cxx31
-rw-r--r--cui/source/dialogs/showcols.src68
3 files changed, 11 insertions, 89 deletions
diff --git a/cui/source/dialogs/fmsearch.hrc b/cui/source/dialogs/fmsearch.hrc
index 3b65fdb85225..5403f5fda8b6 100644
--- a/cui/source/dialogs/fmsearch.hrc
+++ b/cui/source/dialogs/fmsearch.hrc
@@ -21,7 +21,6 @@
#include "svl/solar.hrc"
-#define RID_SVX_DLG_SHOWGRIDCOLUMNS (RID_FORMS_START + 11)
#define RID_SVXDLG_SEARCHFORM (RID_FORMS_START + 7)
#define RID_STR_SEARCH_ANYWHERE (RID_FORMS_START + 85)
#define RID_STR_SEARCH_BEGINNING (RID_FORMS_START + 86)
diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx
index 7bce6ac6ef59..599cd1c1b8b6 100644
--- a/cui/source/dialogs/showcols.cxx
+++ b/cui/source/dialogs/showcols.cxx
@@ -36,23 +36,14 @@
DBG_NAME(FmShowColsDialog)
//--------------------------------------------------------------------------
FmShowColsDialog::FmShowColsDialog(Window* pParent)
- :ModalDialog(pParent, CUI_RES(RID_SVX_DLG_SHOWGRIDCOLUMNS))
- ,m_aList(this, CUI_RES(1))
- ,m_aLabel(this, CUI_RES(1))
- ,m_aOK(this, CUI_RES(1))
- ,m_aCancel(this, CUI_RES(1))
+ : ModalDialog(pParent, "ShowColDialog", "cui/ui/showcoldialog.ui")
{
- DBG_CTOR(FmShowColsDialog,NULL);
- m_aList.EnableMultiSelection(sal_True);
- m_aOK.SetClickHdl( LINK( this, FmShowColsDialog, OnClickedOk ) );
-
- FreeResource();
-}
-
-//--------------------------------------------------------------------------
-FmShowColsDialog::~FmShowColsDialog()
-{
- DBG_DTOR(FmShowColsDialog,NULL);
+ get(m_pOK, "ok");
+ get(m_pList, "treeview");
+ m_pList->set_height_request(m_pList->GetTextHeight() * 8);
+ m_pList->set_width_request(m_pList->approximate_char_width() * 56);
+ m_pList->EnableMultiSelection(true);
+ m_pOK->SetClickHdl( LINK( this, FmShowColsDialog, OnClickedOk ) );
}
//--------------------------------------------------------------------------
@@ -62,9 +53,9 @@ IMPL_LINK_NOARG(FmShowColsDialog, OnClickedOk)
if (m_xColumns.is())
{
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xCol;
- for (sal_uInt16 i=0; i<m_aList.GetSelectEntryCount(); ++i)
+ for (sal_uInt16 i=0; i < m_pList->GetSelectEntryCount(); ++i)
{
- m_xColumns->getByIndex(sal::static_int_cast<sal_Int32>(reinterpret_cast<sal_uIntPtr>(m_aList.GetEntryData(m_aList.GetSelectEntryPos(i))))) >>= xCol;
+ m_xColumns->getByIndex(sal::static_int_cast<sal_Int32>(reinterpret_cast<sal_uIntPtr>(m_pList->GetEntryData(m_pList->GetSelectEntryPos(i))))) >>= xCol;
if (xCol.is())
{
try
@@ -91,7 +82,7 @@ void FmShowColsDialog::SetColumns(const ::com::sun::star::uno::Reference< ::com:
return;
m_xColumns = xCols.get();
- m_aList.Clear();
+ m_pList->Clear();
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xCurCol;
OUString sCurName;
@@ -116,7 +107,7 @@ void FmShowColsDialog::SetColumns(const ::com::sun::star::uno::Reference< ::com:
// if the col is hidden, put it into the list
if (bIsHidden)
- m_aList.SetEntryData( m_aList.InsertEntry(sCurName), reinterpret_cast<void*>((sal_Int64)i) );
+ m_pList->SetEntryData( m_pList->InsertEntry(sCurName), reinterpret_cast<void*>((sal_Int64)i) );
}
}
diff --git a/cui/source/dialogs/showcols.src b/cui/source/dialogs/showcols.src
deleted file mode 100644
index f8bd455824d6..000000000000
--- a/cui/source/dialogs/showcols.src
+++ /dev/null
@@ -1,68 +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 "fmsearch.hrc"
-
-ModalDialog RID_SVX_DLG_SHOWGRIDCOLUMNS
-{
- HelpID = "cui:ModalDialog:RID_SVX_DLG_SHOWGRIDCOLUMNS";
- OutputSize = TRUE;
- SVLook = TRUE ;
- Size = MAP_APPFONT( 200, 117 );
- Moveable = TRUE;
- Closeable = TRUE;
-
- FixedText 1
- {
- Pos = MAP_APPFONT( 6, 6 );
- Size = MAP_APPFONT( 188, 30 );
- WordBreak = TRUE;
- Text [ en-US ] = "The following columns are currently hidden. Please mark the fields you want to show and choose OK.";
- };
-
- ListBox 1
- {
- HelpID = "cui:ListBox:RID_SVX_DLG_SHOWGRIDCOLUMNS:1";
- Border = TRUE;
- Pos = MAP_APPFONT( 6, 39 );
- Size = MAP_APPFONT( 188, 55 );
- TabStop = TRUE;
- DropDown = FALSE;
- AutoHScroll = TRUE;
- VScroll = TRUE;
- };
-
- OKButton 1
- {
- Pos = MAP_APPFONT( 6, 97 );
- Size = MAP_APPFONT( 50, 14 );
- TabStop = TRUE;
- DefButton = TRUE ;
- };
-
- CancelButton 1
- {
- Pos = MAP_APPFONT( 144, 97 );
- Size = MAP_APPFONT( 50, 14 );
- TabStop = TRUE;
- };
- Text [ en-US ] = "Show columns";
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */