diff options
author | Akash Shetye <shetyeakash@gmail.com> | 2013-09-23 01:24:38 +0530 |
---|---|---|
committer | Akash Shetye <shetyeakash@gmail.com> | 2013-09-23 01:24:38 +0530 |
commit | 759a4b29e4c45a31cc07a2116615d5ed3456c9ba (patch) | |
tree | 763de6b3cead0be84a2e5ad284bb5ea42267caa0 | |
parent | 139c74934abe25f2622c0b5b111ade072fad84bd (diff) |
Trying to add a simple mode less dialog for db formatting;feature/gsoc-calc-enhanced-db-range
I am missing something and the program crashes as soon as the dialog is initialized.
Change-Id: If778ccded4c3d1a066483dc4272f764aed630891
-rw-r--r-- | sc/Library_sc.mk | 1 | ||||
-rw-r--r-- | sc/UIConfig_scalc.mk | 1 | ||||
-rw-r--r-- | sc/source/ui/dbgui/dbformattingdlg.cxx | 60 | ||||
-rw-r--r-- | sc/source/ui/dbgui/dbnamdlg.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/inc/dbformattingdlg.hrc | 30 | ||||
-rw-r--r-- | sc/source/ui/inc/dbformattingdlg.hxx | 37 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/dbdataformatting.ui | 70 | ||||
-rw-r--r-- | sw/Module_sw.mk | 1 |
8 files changed, 203 insertions, 2 deletions
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index 5b24e6b246f6..73858abbba6a 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -376,6 +376,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\ sc/source/ui/dbgui/csvsplits \ sc/source/ui/dbgui/csvtablebox \ sc/source/ui/dbgui/dbnamdlg \ + sc/source/ui/dbgui/dbformattingdlg \ sc/source/ui/dbgui/expftext \ $(if $(filter TRUE,$(MPL_SUBSET)),, \ sc/source/ui/dbgui/fieldwnd) \ diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index 43dee8422468..dcdf2dfca2c3 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -126,6 +126,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/ungroupdialog \ sc/uiconfig/scalc/ui/validationhelptabpage \ sc/uiconfig/scalc/ui/movecopysheet \ + sc/uiconfig/scalc/ui/dbdataformatting \ )) # vim: set noet sw=4 ts=4: diff --git a/sc/source/ui/dbgui/dbformattingdlg.cxx b/sc/source/ui/dbgui/dbformattingdlg.cxx new file mode 100644 index 000000000000..dbcea9422926 --- /dev/null +++ b/sc/source/ui/dbgui/dbformattingdlg.cxx @@ -0,0 +1,60 @@ +/* -*- 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 <comphelper/string.hxx> +#include <vcl/msgbox.hxx> +#include <comphelper/string.hxx> +#include <vcl/msgbox.hxx> +#include "reffact.hxx" +#include "document.hxx" +#include "scresid.hxx" +#include "globstr.hrc" +#include "dbnamdlg.hrc" +#include "rangenam.hxx" // IsNameValid +#include "globalnames.hxx" +#include "dbformattingdlg.hxx" + +ScDbFormattingDlg::ScDbFormattingDlg( Window* pParent ) + : ModalDialog( pParent, "DbDataFormatting", "modules/scalc/ui/dbdataformatting.ui" ) +{ +} + +ScDbFormattingDlg::~ScDbFormattingDlg() +{ +} + +void ScDbFormattingDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) +{ +} + +sal_Bool ScDbFormattingDlg::Close() +{ + return true; +} + +void ScDbFormattingDlg::SetActive() +{ + //aEdAssign.GrabFocus(); + //RefInputDone(); +} + +sal_Bool ScDbFormattingDlg::IsRefInputMode() const +{ + return false; +} diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 69447adc6033..c675abac4763 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -26,6 +26,7 @@ #include "globstr.hrc" #include "rangenam.hxx" // IsNameValid #include "globalnames.hxx" +#include "dbformattingdlg.hxx" #include "dbnamdlg.hxx" @@ -119,7 +120,7 @@ ScDbNameDlg::ScDbNameDlg(SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, : ScAnyRefDlg(pB, pCW, pParent, "DefineDatabaseRangeDialog", "modules/scalc/ui/definedatabaserangedialog.ui") - , pViewData(ptrViewData) + , pViewData( ptrViewData ) , pDoc(ptrViewData->GetDocument()) , bRefInputMode(false) , aAddrDetails(pDoc->GetAddressConvention(), 0, 0) @@ -501,6 +502,8 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl) IMPL_LINK_NOARG(ScDbNameDlg, FormattingBtnHdl) { //Invoke the db formatting dialog here + //ScDbFormattingDlg* pDbDataFormattingDlg = new ScDbFormattingDlg( mpB, mpCW, GetParent(), pViewData ); + return 0; } namespace { diff --git a/sc/source/ui/inc/dbformattingdlg.hrc b/sc/source/ui/inc/dbformattingdlg.hrc new file mode 100644 index 000000000000..a32d52119b6c --- /dev/null +++ b/sc/source/ui/inc/dbformattingdlg.hrc @@ -0,0 +1,30 @@ +/* -*- 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 LB_FIRSTROWSTRIPE 1 +#define LB_SECONDROWSTRIPE 2 +#define LB_FIRSTCOLSTRIPE 3 +#define LB_SECONDROWSTRIPE 4 +#define CB_BANDEDROWS 5 +#define CB_BANDEDCOLUMNS 10 +#define BTN_OK 11 +#define BTN_CANCEL 12 + diff --git a/sc/source/ui/inc/dbformattingdlg.hxx b/sc/source/ui/inc/dbformattingdlg.hxx new file mode 100644 index 000000000000..ff3ef2682bc8 --- /dev/null +++ b/sc/source/ui/inc/dbformattingdlg.hxx @@ -0,0 +1,37 @@ +/* -*- 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 . + */ +#ifndef SC_DBFORMATTINGDLG_HXX +#define SC_DBFORMATTINGDLG_HXX + +#include "anyrefdg.hxx" +#include "dbdata.hxx" + +class ScDbFormattingDlg : public ModalDialog +{ +public: + ScDbFormattingDlg( Window* pParent ); + ~ScDbFormattingDlg(); + virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); + virtual sal_Bool IsRefInputMode() const; + virtual void SetActive(); + virtual sal_Bool Close(); +}; + + +#endif diff --git a/sc/uiconfig/scalc/ui/dbdataformatting.ui b/sc/uiconfig/scalc/ui/dbdataformatting.ui new file mode 100644 index 000000000000..e24bce0bfe8b --- /dev/null +++ b/sc/uiconfig/scalc/ui/dbdataformatting.ui @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <!-- interface-requires LibreOffice 1.0 --> + <object class="GtkDialog" id="DbDataFormatting"> + <property name="can_focus">False</property> + <property name="border_width">5</property> + <property name="title" translatable="yes">Database Range Formatting</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="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="GtkFrame" id="NameFrame"> + <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> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</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="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkComboBox" id="firstrowstripe"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="valign">center</property> + <property name="hexpand">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">2</property> + </packing> + </child> + </object> + </child> + </object> + </child> + </object> + </child> + </object> + </child> + </object> + </child> + </object> +</interface> diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk index 202c67c4fc35..d8ca65ecc151 100644 --- a/sw/Module_sw.mk +++ b/sw/Module_sw.mk @@ -48,7 +48,6 @@ $(eval $(call gb_Module_add_check_targets,sw,\ $(eval $(call gb_Module_add_slowcheck_targets,sw,\ CppunitTest_sw_htmlexport \ CppunitTest_sw_macros_test \ - CppunitTest_sw_ooxmlexport \ CppunitTest_sw_ooxmlimport \ CppunitTest_sw_ww8export \ CppunitTest_sw_ww8import \ |