connectivity/source/drivers/calc/CDatabaseMetaData.cxx | 6 - connectivity/source/drivers/dbase/DDatabaseMetaData.cxx | 2 connectivity/source/drivers/file/FDatabaseMetaData.cxx | 2 sc/AllLangResTarget_sc.mk | 1 sc/UIConfig_scalc.mk | 1 sc/inc/helpids.h | 1 sc/inc/sc.hrc | 1 sc/source/ui/inc/optsolver.hrc | 33 ----- sc/source/ui/inc/optsolver.hxx | 6 - sc/source/ui/miscdlgs/optsolver.cxx | 27 +--- sc/source/ui/src/optsolver.src | 59 ---------- sc/uiconfig/scalc/ui/solverprogressdialog.ui | 90 ++++++++++++++++ sc/uiconfig/scalc/ui/solversuccessdialog.ui | 2 13 files changed, 106 insertions(+), 125 deletions(-)
New commits: commit ecc62c9cd21bec2580d5a936c7784735bff89504 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Dec 29 23:24:38 2013 +0000 convert solver progress dialog to .ui Change-Id: I259f7d75591121be584e3a8cfe514232a404c0fa diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk index ae6faa2..9bf3000 100644 --- a/sc/AllLangResTarget_sc.mk +++ b/sc/AllLangResTarget_sc.mk @@ -36,7 +36,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\ sc/source/ui/src/popup.src \ sc/source/ui/src/autofmt.src \ sc/source/ui/src/globstr.src \ - sc/source/ui/src/optsolver.src \ sc/source/ui/src/toolbox.src \ sc/source/ui/src/scfuncs.src \ sc/source/ui/src/textdlgs.src \ diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index 41bcb7c..2473b25 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -137,6 +137,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/sidebarnumberformat \ sc/uiconfig/scalc/ui/sidebarcellappearance \ sc/uiconfig/scalc/ui/solverdlg \ + sc/uiconfig/scalc/ui/solverprogressdialog \ sc/uiconfig/scalc/ui/solversuccessdialog \ sc/uiconfig/scalc/ui/sortcriteriapage \ sc/uiconfig/scalc/ui/sortdialog \ diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h index 8d989dd..e13c082 100644 --- a/sc/inc/helpids.h +++ b/sc/inc/helpids.h @@ -162,7 +162,6 @@ #define HID_SC_SOLVEROPTIONS "SC_HID_SC_SOLVEROPTIONS" #define HID_SC_SOLVEROPTIONS_LB "SC_HID_SC_SOLVEROPTIONS_LB" -#define HID_SC_SOLVER_PROGRESS "SC_HID_SC_SOLVER_PROGRESS" #define HID_SCDLG_CONFLICTS "SC_HID_SCDLG_CONFLICTS" diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 0b0f398..7230fee 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -1094,7 +1094,6 @@ #define RID_SCDLG_DPSHOWDETAIL (SC_DIALOGS_START + 137) #define RID_SCDLG_SOLVEROPTIONS (SC_DIALOGS_START + 139) -#define RID_SCDLG_SOLVER_PROGRESS (SC_DIALOGS_START + 142) #define RID_SCDLG_CONFLICTS (SC_DIALOGS_START + 145) #define RID_SCDLG_SHAREDOCUMENT (SC_DIALOGS_START + 146) diff --git a/sc/source/ui/inc/optsolver.hrc b/sc/source/ui/inc/optsolver.hrc deleted file mode 100644 index bbb3bce..0000000 --- a/sc/source/ui/inc/optsolver.hrc +++ /dev/null @@ -1,33 +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 "sc.hrc" - -#define FT_PROGRESS 7 -#define FT_TIMELIMIT 8 - -#define FL_CONDITIONS 1 -#define FL_BUTTONS 2 - -#define BTN_HELP 2 -#define BTN_CLOSE 3 -#define BTN_OK 4 -#define BTN_CANCEL 5 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx index 1f850d7..f4af6ef 100644 --- a/sc/source/ui/inc/optsolver.hxx +++ b/sc/source/ui/inc/optsolver.hxx @@ -206,14 +206,10 @@ private: class ScSolverProgressDialog : public ModelessDialog { - FixedText maFtProgress; - FixedText maFtTime; - FixedLine maFlButtons; - OKButton maBtnOk; + FixedText* m_pFtTime; public: ScSolverProgressDialog( Window* pParent ); - ~ScSolverProgressDialog(); void HideTimeLimit(); void SetTimeLimit( sal_Int32 nSeconds ); diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 7648ac2..3a02d8d 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -38,7 +38,6 @@ #include "solveroptions.hxx" #include "solverutil.hxx" #include "globstr.hrc" -#include "optsolver.hrc" #include "optsolver.hxx" @@ -47,33 +46,23 @@ using namespace com::sun::star; -//---------------------------------------------------------------------------- - -ScSolverProgressDialog::ScSolverProgressDialog( Window* pParent ) - : ModelessDialog( pParent, ScResId( RID_SCDLG_SOLVER_PROGRESS ) ), - maFtProgress ( this, ScResId( FT_PROGRESS ) ), - maFtTime ( this, ScResId( FT_TIMELIMIT ) ), - maFlButtons ( this, ScResId( FL_BUTTONS ) ), - maBtnOk ( this, ScResId( BTN_OK ) ) -{ - maBtnOk.Enable(false); - FreeResource(); -} - -ScSolverProgressDialog::~ScSolverProgressDialog() +ScSolverProgressDialog::ScSolverProgressDialog(Window* pParent) + : ModelessDialog(pParent, "SolverProgressDialog", + "modules/scalc/ui/solverprogressdialog.ui") { + get(m_pFtTime, "progress"); } void ScSolverProgressDialog::HideTimeLimit() { - maFtTime.Hide(); + m_pFtTime->Hide(); } void ScSolverProgressDialog::SetTimeLimit( sal_Int32 nSeconds ) { - OUString aOld = maFtTime.GetText(); - OUString aNew = aOld.getToken(0,'#') + OUString::number( nSeconds ) + aOld.getToken(1,'#'); - maFtTime.SetText( aNew ); + OUString aOld = m_pFtTime->GetText(); + OUString aNew = aOld.replaceFirst("#", OUString::number(nSeconds)); + m_pFtTime->SetText( aNew ); } //---------------------------------------------------------------------------- diff --git a/sc/source/ui/src/optsolver.src b/sc/source/ui/src/optsolver.src deleted file mode 100644 index 9ab6de1..0000000 --- a/sc/source/ui/src/optsolver.src +++ /dev/null @@ -1,59 +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 "optsolver.hrc" - -ModelessDialog RID_SCDLG_SOLVER_PROGRESS -{ - OutputSize = TRUE ; - HelpId = HID_SC_SOLVER_PROGRESS ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 118 , 72 ) ; - Moveable = TRUE ; - Closeable = FALSE ; - FixedText FT_PROGRESS - { - Pos = MAP_APPFONT ( 6 , 11 ) ; - Size = MAP_APPFONT ( 106 , 8 ) ; - Center = TRUE ; - Text [ en-US ] = "Solving in progress..." ; - }; - FixedText FT_TIMELIMIT - { - Pos = MAP_APPFONT ( 6 , 25 ) ; - Size = MAP_APPFONT ( 106 , 8 ) ; - Center = TRUE ; - Text [ en-US ] = "(time limit # seconds)" ; - }; - FixedLine FL_BUTTONS - { - Pos = MAP_APPFONT ( 0 , 41 ) ; - Size = MAP_APPFONT ( 118 , 8 ) ; - }; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 34 , 52 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - Text [ en-US ] = "Solving..." ; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/uiconfig/scalc/ui/solverprogressdialog.ui b/sc/uiconfig/scalc/ui/solverprogressdialog.ui new file mode 100644 index 0000000..1e43f56 --- /dev/null +++ b/sc/uiconfig/scalc/ui/solverprogressdialog.ui @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="SolverProgressDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Solving...</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> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">24</property> + <child> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Solving in progress...</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="progress"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">(time limit # seconds)</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="visible">True</property> + <property name="sensitive">False</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_underline">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> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">2</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">ok</action-widget> + </action-widgets> + </object> +</interface> diff --git a/sc/uiconfig/scalc/ui/solversuccessdialog.ui b/sc/uiconfig/scalc/ui/solversuccessdialog.ui index c0e4619..3c01f37 100644 --- a/sc/uiconfig/scalc/ui/solversuccessdialog.ui +++ b/sc/uiconfig/scalc/ui/solversuccessdialog.ui @@ -23,7 +23,7 @@ <property name="xalign">0</property> <property name="label" translatable="yes">Do you want to keep the result or do you want to restore previous values?</property> <property name="wrap">True</property> - <property name="max_width_chars">52</property> + <property name="max_width_chars">40</property> </object> <packing> <property name="left_attach">0</property> commit e2591cdeeb9a7d2d87e8c8772eed3ece6056fae1 Author: Caolán McNamara <caol...@redhat.com> Date: Sun Dec 29 23:29:21 2013 +0000 drop STRING_MAXLEN uses from connectivity Change-Id: I12a999c2c6bdd119c2e3e544bbbdabb0b0ce2ba2 diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx index c2f87a2..97fe37f 100644 --- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx @@ -253,7 +253,7 @@ OUString SAL_CALL OCalcDatabaseMetaData::getURL( ) throw(SQLException, RuntimeE sal_Int32 SAL_CALL OCalcDatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "calc ocke.jans...@sun.com OCalcDatabaseMetaData::getMaxBinaryLiteralLength" ); - return STRING_MAXLEN; + return SAL_MAX_INT32; } // ------------------------------------------------------------------------- @@ -261,13 +261,13 @@ sal_Int32 SAL_CALL OCalcDatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQ sal_Int32 SAL_CALL OCalcDatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "calc ocke.jans...@sun.com OCalcDatabaseMetaData::getMaxCharLiteralLength" ); - return STRING_MAXLEN; + return SAL_MAX_INT32; } // ------------------------------------------------------------------------- sal_Int32 SAL_CALL OCalcDatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "calc ocke.jans...@sun.com OCalcDatabaseMetaData::getMaxColumnNameLength" ); - return STRING_MAXLEN; + return SAL_MAX_INT32; } // ------------------------------------------------------------------------- sal_Int32 SAL_CALL OCalcDatabaseMetaData::getMaxColumnsInIndex( ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx index 45aaabd..2419b86 100644 --- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx +++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx @@ -333,7 +333,7 @@ OUString SAL_CALL ODbaseDatabaseMetaData::getURL( ) throw(SQLException, Runtime sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxBinaryLiteralLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "dbase ocke.jans...@sun.com ODbaseDatabaseMetaData::getMaxBinaryLiteralLength" ); - return STRING_MAXLEN; + return SAL_MAX_INT32; } // ------------------------------------------------------------------------- sal_Int32 SAL_CALL ODbaseDatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index a70e588..c233c59 100644 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx @@ -340,7 +340,7 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCatalogNameLength( ) throw(SQLExcep sal_Int32 SAL_CALL ODatabaseMetaData::getMaxCharLiteralLength( ) throw(SQLException, RuntimeException) { SAL_INFO( "connectivity.drivers", "file ocke.jans...@sun.com ODatabaseMetaData::getMaxCharLiteralLength" ); - return STRING_MAXLEN; + return SAL_MAX_INT32; } // ------------------------------------------------------------------------- sal_Int32 SAL_CALL ODatabaseMetaData::getMaxColumnNameLength( ) throw(SQLException, RuntimeException)
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits