diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-12 13:59:23 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-13 11:04:31 +0000 |
commit | cc6725773b0bd2b8984f516e8faf01e9aa520681 (patch) | |
tree | aa7565ea1f106193f020b33fce1e0ac9fb693f99 | |
parent | 02ef234b77b6c5f4c0d6634881168313e97288d1 (diff) |
Various adjustments of the pivot table
especially relative positions were relative
to the dialog which was assumed to be then
a direct parent of the widgets so that
a simple calculation could make the positions
relative to the widgets
also now the pivot table fits into a 768 pixel high
screen
Change-Id: I86a4155439872e8273943b90f15320e560e237a4
-rw-r--r-- | extras/source/glade/libreoffice-catalog.xml.in | 21 | ||||
-rw-r--r-- | sc/AllLangResTarget_sc.mk | 1 | ||||
-rw-r--r-- | sc/inc/helpids.h | 7 | ||||
-rw-r--r-- | sc/inc/sc.hrc | 3 | ||||
-rw-r--r-- | sc/source/ui/dbgui/fieldwnd.cxx | 88 | ||||
-rw-r--r-- | sc/source/ui/dbgui/pivot.hrc | 70 | ||||
-rw-r--r-- | sc/source/ui/dbgui/pivot.src | 340 | ||||
-rw-r--r-- | sc/source/ui/dbgui/pvlaydlg.cxx | 161 | ||||
-rw-r--r-- | sc/source/ui/inc/fieldwnd.hxx | 21 | ||||
-rw-r--r-- | sc/source/ui/inc/pvlaydlg.hxx | 22 | ||||
-rw-r--r-- | sc/source/ui/src/scstring.src | 5 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/pivottablelayout.ui | 300 |
12 files changed, 264 insertions, 775 deletions
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in index 71c7ac168e56..797653578dcc 100644 --- a/extras/source/glade/libreoffice-catalog.xml.in +++ b/extras/source/glade/libreoffice-catalog.xml.in @@ -613,6 +613,27 @@ generic-name="CondFormatList" parent="GtkDrawingArea" icon-name="widget-gtk-drawingarea"/> + <glade-widget-class title="ScDPPageFieldControl" name="sclo-ScDPPageFieldControl" + generic-name="ScDPPageFieldControl" parent="GtkDrawingArea" + icon-name="widget-gtk-drawingarea"/> + <glade-widget-class title="ScDPColFieldControl" name="sclo-ScDPColFieldControl" + generic-name="ScDPColFieldControl" parent="GtkDrawingArea" + icon-name="widget-gtk-drawingarea"/> + <glade-widget-class title="ScDPRowFieldControl" name="sclo-ScDPRowFieldControl" + generic-name="ScDPRowFieldControl" parent="GtkDrawingArea" + icon-name="widget-gtk-drawingarea"/> + <glade-widget-class title="ScDPDataFieldControl" name="sclo-ScDPDataFieldControl" + generic-name="ScDPDataFieldControl" parent="GtkDrawingArea" + icon-name="widget-gtk-drawingarea"/> + <glade-widget-class title="ScDPSelectFieldControl" name="sclo-ScDPSelectFieldControl" + generic-name="ScDPSelectFieldControl" parent="GtkDrawingArea" + icon-name="widget-gtk-drawingarea"/> + + + + + + <glade-widget-class title="ScDPFunctionListBox" name="scuilo-ScDPFunctionListBox" generic-name="DPFunctionListBox" parent="GtkTreeView" icon-name="widget-gtk-treeview"/> diff --git a/sc/AllLangResTarget_sc.mk b/sc/AllLangResTarget_sc.mk index 6d0c2a80d3a4..a73225798f0e 100644 --- a/sc/AllLangResTarget_sc.mk +++ b/sc/AllLangResTarget_sc.mk @@ -48,7 +48,6 @@ $(eval $(call gb_SrsTarget_add_files,sc/res,\ sc/source/ui/cctrl/checklistmenu.src \ sc/source/ui/navipi/navipi.src \ sc/source/ui/styleui/scstyles.src \ - sc/source/ui/dbgui/pivot.src \ sc/source/ui/dbgui/dpgroupdlg.src \ sc/source/ui/dbgui/pvfundlg.src \ sc/source/ui/dbgui/dapitype.src \ diff --git a/sc/inc/helpids.h b/sc/inc/helpids.h index 48193dc2fa0b..b93ca2289d32 100644 --- a/sc/inc/helpids.h +++ b/sc/inc/helpids.h @@ -140,13 +140,6 @@ #define HID_SELECTTABLES "SC_HID_SELECTTABLES" #define HID_SC_REPLCELLSWARN "SC_HID_SC_REPLCELLSWARN" -// data pilot layout dialog -#define HID_SC_DPLAY_PAGE "SC_HID_SC_DPLAY_PAGE" -#define HID_SC_DPLAY_COLUMN "SC_HID_SC_DPLAY_COLUMN" -#define HID_SC_DPLAY_ROW "SC_HID_SC_DPLAY_ROW" -#define HID_SC_DPLAY_DATA "SC_HID_SC_DPLAY_DATA" -#define HID_SC_DPLAY_SELECT "SC_HID_SC_DPLAY_SELECT" - #define HID_SC_DRAW_RENAME "SC_HID_SC_DRAW_RENAME" #define HID_SC_DPSUBT_OPT "SC_HID_SC_DPSUBT_OPT" diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 1c4a3708844b..4cbfb88f04c0 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -942,6 +942,8 @@ #define SCSTR_VALID_RANGE (STR_START + 317) #define SCSTR_VALID_LIST (STR_START + 318) +#define SCSTR_SELECT (STR_START + 319) + // media shell #define SCSTR_MEDIASHELL (STR_START + 401) @@ -1012,7 +1014,6 @@ #define RID_SCPAGE_SUBT_OPTIONS (SC_DIALOGS_START + 29) #define RID_SCPAGE_USERLISTS (SC_DIALOGS_START + 31) #define RID_SCDLG_PIVOTFILTER (SC_DIALOGS_START + 33) -#define RID_SCDLG_PIVOT_LAYOUT (SC_DIALOGS_START + 34) #define RID_SCDLG_CONSOLIDATE (SC_DIALOGS_START + 35) #define RID_SCDLG_INSERT_TABLE (SC_DIALOGS_START + 42) diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx index 2026a101225f..9fe1bb02c373 100644 --- a/sc/source/ui/dbgui/fieldwnd.cxx +++ b/sc/source/ui/dbgui/fieldwnd.cxx @@ -50,8 +50,8 @@ #include "dpuiglobal.hxx" #include "calcmacros.hxx" #include "AccessibleDataPilotControl.hxx" +#include "sc.hrc" #include "scresid.hxx" -#include "pivot.hrc" using namespace com::sun::star; using ::std::vector; @@ -116,22 +116,11 @@ ScAccessibleDataPilotControl *ScDPFieldControlBase::AccessRef::operator -> () co return static_cast< ScAccessibleDataPilotControl * >( mxRef.get() ); } -ScDPFieldControlBase::ScDPFieldControlBase( - ScPivotLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption, const char* pcHelpId) : - Control(pParent), - mpDlg(pParent), - mpCaption(pCaption), - mnFieldSelected(0) -{ - SetHelpId( pcHelpId ); - - if (pCaption) - maName = MnemonicGenerator::EraseAllMnemonicChars( pCaption->GetText() ); -} - -ScDPFieldControlBase::ScDPFieldControlBase( Window* pParent ) : - Control (pParent), - mnFieldSelected(0) +ScDPFieldControlBase::ScDPFieldControlBase(Window* pParent) + : Control(pParent) + , mpDlg(NULL) + , mpCaption(NULL) + , mnFieldSelected(0) { } @@ -441,7 +430,7 @@ void ScDPFieldControlBase::MouseMove( const MouseEvent& rMEvt ) { Point aScrPos = OutputToScreenPixel(rMEvt.GetPosPixel()); ScPivotFieldType eFieldType = mpDlg->GetFieldTypeAtPoint(aScrPos); - PointerStyle ePtr = mpDlg->GetPointerStyleAtPoint(aScrPos, eFieldType); + PointerStyle ePtr = mpDlg->GetPointerStyle(eFieldType); SetPointer( Pointer( ePtr ) ); } const FieldNames& rFields = GetFieldNames(); @@ -700,7 +689,7 @@ void ScDPFieldControlBase::DrawInvertSelection() Size ScDPFieldControlBase::GetStdFieldBtnSize() const { - return mpDlg->GetStdFieldBtnSize(); + return Size(approximate_char_width() * 8, FIELD_BTN_HEIGHT); } void ScDPFieldControlBase::MoveField( size_t nDestIndex ) @@ -896,22 +885,14 @@ size_t ScDPFieldControlBase::GetFieldIndexByData( const ScPivotFuncData& rData ) return it == maFuncData.end() ? PIVOTFIELD_INVALID : std::distance(maFuncData.begin(), it); } -//============================================================================= - -ScDPHorFieldControl::ScDPHorFieldControl( - ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId) : - ScDPFieldControlBase(pDialog, rResId, pCaption, pcHelpId), - maScroll(this, WB_HORZ | WB_DRAG), - mnFieldBtnRowCount(0), - mnFieldBtnColCount(0) +void ScDPFieldControlBase::Resize() { - maScroll.SetScrollHdl( LINK(this, ScDPHorFieldControl, ScrollHdl) ); - maScroll.SetEndScrollHdl( LINK(this, ScDPHorFieldControl, EndScrollHdl) ); - maScroll.Hide(); - - AppendPaintable(&maScroll); + Control::Resize(); + CalcSize(); } +//============================================================================= + ScDPHorFieldControl::ScDPHorFieldControl ( Window* pParent ) : ScDPFieldControlBase( pParent ), maScroll(this, WB_HORZ | WB_DRAG), @@ -1040,6 +1021,8 @@ void ScDPHorFieldControl::CalcSize() maScroll.SetVisibleSize(mnFieldBtnColCount); maScroll.SetPageSize(mnFieldBtnColCount); maScroll.SetRange(Range(0, mnFieldBtnColCount)); + + ResetScrollBar(); } bool ScDPHorFieldControl::IsValidIndex(size_t /*nIndex*/) const @@ -1171,12 +1154,6 @@ IMPL_LINK_NOARG(ScDPHorFieldControl, EndScrollHdl) //============================================================================= -ScDPPageFieldControl::ScDPPageFieldControl( - ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId) : - ScDPHorFieldControl(pDialog, rResId, pCaption, pcHelpId) -{ -} - ScDPPageFieldControl::ScDPPageFieldControl ( Window* pParent ) : ScDPHorFieldControl( pParent ) { @@ -1204,12 +1181,6 @@ OUString ScDPPageFieldControl::GetDescription() const //============================================================================= -ScDPColFieldControl::ScDPColFieldControl( - ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId) : - ScDPHorFieldControl(pDialog, rResId, pCaption, pcHelpId) -{ -} - ScDPColFieldControl::ScDPColFieldControl ( Window* pParent ) : ScDPHorFieldControl( pParent ) { @@ -1236,19 +1207,6 @@ OUString ScDPColFieldControl::GetDescription() const //============================================================================= -ScDPRowFieldControl::ScDPRowFieldControl( - ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId) : - ScDPFieldControlBase(pDialog, rResId, pCaption, pcHelpId), - maScroll(this, WB_VERT | WB_DRAG), - mnColumnBtnCount(0) -{ - maScroll.SetScrollHdl( LINK(this, ScDPRowFieldControl, ScrollHdl) ); - maScroll.SetEndScrollHdl( LINK(this, ScDPRowFieldControl, EndScrollHdl) ); - maScroll.Show(false); - - AppendPaintable(&maScroll); -} - ScDPRowFieldControl::ScDPRowFieldControl ( Window* pParent ) : ScDPFieldControlBase( pParent ), maScroll(this, WB_VERT | WB_DRAG), @@ -1372,6 +1330,7 @@ void ScDPRowFieldControl::CalcSize() maScroll.SetRange(Range(0, mnColumnBtnCount)); maScroll.DoScroll(0); + ResetScrollBar(); } bool ScDPRowFieldControl::IsValidIndex(size_t /*nIndex*/) const @@ -1484,17 +1443,10 @@ IMPL_LINK_NOARG(ScDPRowFieldControl, EndScrollHdl) //============================================================================= -ScDPSelectFieldControl::ScDPSelectFieldControl( - ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId) : - ScDPHorFieldControl(pDialog, rResId, pCaption, pcHelpId) -{ - SetName(OUString(ScResId(STR_SELECT))); -} - ScDPSelectFieldControl::ScDPSelectFieldControl( Window* pParent ): ScDPHorFieldControl( pParent ) { - //SetName(OUString(ScResId(STR_SELECT))); + SetName(OUString(ScResId(SCSTR_SELECT))); } extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeScDPSelectFieldControl( Window *pParent, VclBuilder::stringmap & ) @@ -1518,12 +1470,6 @@ OUString ScDPSelectFieldControl::GetDescription() const //============================================================================= -ScDPDataFieldControl::ScDPDataFieldControl( - ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId) : - ScDPHorFieldControl(pDialog, rResId, pCaption, pcHelpId) -{ -} - ScDPDataFieldControl::ScDPDataFieldControl( Window* pParent ): ScDPHorFieldControl( pParent ) { diff --git a/sc/source/ui/dbgui/pivot.hrc b/sc/source/ui/dbgui/pivot.hrc deleted file mode 100644 index eec2d7ea65bf..000000000000 --- a/sc/source/ui/dbgui/pivot.hrc +++ /dev/null @@ -1,70 +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 BTN_OK 1 -#define BTN_CANCEL 2 -#define BTN_HELP 3 -#define BTN_MORE 4 -#define BTN_REMOVE 5 -#define BTN_OPTIONS 6 - -#define FL_LAYOUT 10 -#define WND_COL 11 -#define WND_ROW 12 -#define WND_DATA 13 -#define WND_SELECT 14 -#define WND_PAGE 18 -#define FT_COL 31 -#define FT_ROW 32 -#define FT_DATA 33 -#define STR_SELECT 34 -#define FT_PAGE 35 - -#define FT_INFO 19 - -#define FL_OUTPUT 20 -#define FT_OUTAREA 21 -#define LB_OUTAREA 22 -#define ED_OUTAREA 23 -#define RB_OUTAREA 24 -#define BTN_IGNEMPTYROWS 25 -#define BTN_DETECTCAT 26 -#define BTN_TOTALCOL 27 -#define BTN_TOTALROW 28 -#define BTN_FILTER 29 -#define BTN_DRILLDOWN 30 - -#define FT_INAREA 40 -#define RB_INAREA 41 -#define ED_INAREA 42 - -#define PIVOTSTR_SUM 1 -#define PIVOTSTR_COUNT 2 -#define PIVOTSTR_AVG 3 -#define PIVOTSTR_MAX 4 -#define PIVOTSTR_MIN 5 -#define PIVOTSTR_PROD 6 -#define PIVOTSTR_COUNT2 7 -#define PIVOTSTR_DEV 8 -#define PIVOTSTR_DEV2 9 -#define PIVOTSTR_VAR 10 -#define PIVOTSTR_VAR2 11 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/dbgui/pivot.src b/sc/source/ui/dbgui/pivot.src deleted file mode 100644 index 5116d2b87ca0..000000000000 --- a/sc/source/ui/dbgui/pivot.src +++ /dev/null @@ -1,340 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - * 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 "pivot.hrc" - -ModelessDialog RID_SCDLG_PIVOT_LAYOUT -{ - OutputSize = TRUE ; - HelpId = CMD_SID_OPENDLG_PIVOTTABLE ; - Size = MAP_APPFONT ( 350 , 216 ) ; - Hide = TRUE ; - SVLook = TRUE ; - Moveable = TRUE ; - Closeable = FALSE ; - Text [ en-US ] = "Pivot table" ; - - FixedText FT_PAGE - { - Pos = MAP_APPFONT ( 194 , 168 ) ; - Size = MAP_APPFONT ( 37 , 8 ) ; - Text[ en-US ] = "Page Fields" ; - }; - Control WND_PAGE - { - /* Size is calculated in the dialog code. */ - Pos = MAP_APPFONT ( 20 , 14 ) ; - Size = MAP_APPFONT ( 1 , 1 ) ; - TabStop = TRUE ; - }; - FixedText FT_COL - { - Pos = MAP_APPFONT ( 231 , 168 ) ; - Size = MAP_APPFONT ( 37 , 8 ) ; - Text [ en-US ] = "Column Fields" ; - }; - Control WND_COL - { - /* Size is calculated in the dialog code. */ - Pos = MAP_APPFONT ( 56 , 56 ) ; - Size = MAP_APPFONT ( 1 , 1 ) ; - TabStop = TRUE ; - }; - FixedText FT_ROW - { - Pos = MAP_APPFONT ( 194 , 176 ) ; - Size = MAP_APPFONT ( 37 , 8 ) ; - Text [ en-US ] = "Row\nFields" ; - }; - Control WND_ROW - { - /* Size is calculated in the dialog code. */ - Pos = MAP_APPFONT ( 6 , 98 ) ; - Size = MAP_APPFONT ( 1 , 1 ) ; - TabStop = TRUE ; - }; - FixedText FT_DATA - { - Pos = MAP_APPFONT ( 227, 176 ) ; - Size = MAP_APPFONT ( 37 , 8 ) ; - Text [ en-US ] = "Data Fields" ; - }; - Control WND_DATA - { - /* Size is calculated in the dialog code. */ - Pos = MAP_APPFONT ( 56 , 98 ) ; - Size = MAP_APPFONT ( 1 , 1 ) ; - TabStop = TRUE ; - }; - Control WND_SELECT - { - /* Size is calculated in the dialog code. */ - Pos = MAP_APPFONT ( 210 , 14 ) ; - Size = MAP_APPFONT ( 1 , 1 ) ; - TabStop = TRUE ; - }; - String STR_SELECT - { - Text [ en-US ] = "Selection area"; - }; - FixedText FT_INFO - { - Pos = MAP_APPFONT ( 6 , 200 ) ; - Size = MAP_APPFONT ( 182 , 16 ) ; - WordBreak = TRUE ; - Text [ en-US ] = "Drag the fields into the desired position." ; - }; - FixedLine FL_LAYOUT - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 282 , 8 ) ; - Text [ en-US ] = "Layout"; - }; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 294 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 294 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 294 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - PushButton BTN_REMOVE - { - HelpID = "sc:PushButton:RID_SCDLG_PIVOT_LAYOUT:BTN_REMOVE"; - Pos = MAP_APPFONT ( 294 , 63 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Remove"; - }; - PushButton BTN_OPTIONS - { - HelpID = "sc:PushButton:RID_SCDLG_PIVOT_LAYOUT:BTN_OPTIONS"; - Pos = MAP_APPFONT ( 294 , 80 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Options..."; - }; - MoreButton BTN_MORE - { - HelpID = "sc:MoreButton:RID_SCDLG_PIVOT_LAYOUT:BTN_MORE"; - Pos = MAP_APPFONT ( 294 , 190 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - MapUnit = MAP_APPFONT ; - Delta = 90 ; - }; - FixedLine FL_OUTPUT - { - Pos = MAP_APPFONT ( 6 , 216 ) ; - Size = MAP_APPFONT ( 268 , 8 ) ; - Text [ en-US ] = "Result" ; - Hide = TRUE ; - }; - - FixedText FT_INAREA - { - Pos = MAP_APPFONT ( 12 , 229 ) ; - Size = MAP_APPFONT ( 59 , 8 ) ; - Hide = TRUE ; - Text [ en-US ] = "Selection from" ; - }; - Edit ED_INAREA - { - HelpID = "sc:Edit:RID_SCDLG_PIVOT_LAYOUT:ED_INAREA"; - Border = TRUE ; - Pos = MAP_APPFONT ( 73 , 227 ) ; - Size = MAP_APPFONT ( 100 , 12 ) ; - TabStop = TRUE ; - Hide = TRUE ; - }; - ImageButton RB_INAREA - { - HelpID = "sc:ImageButton:RID_SCDLG_PIVOT_LAYOUT:RB_INAREA"; - Pos = MAP_APPFONT ( 177 , 226 ) ; - Size = MAP_APPFONT ( 13 , 15 ) ; - TabStop = TRUE ; - Hide = TRUE ; - QuickHelpText [ en-US ] = "Shrink" ; - }; - - FixedText FT_OUTAREA - { - Pos = MAP_APPFONT ( 12 , 247 ) ; - Size = MAP_APPFONT ( 59 , 8 ) ; - Hide = TRUE ; - Text [ en-US ] = "Results to" ; - }; - ListBox LB_OUTAREA - { - HelpID = "sc:ListBox:RID_SCDLG_PIVOT_LAYOUT:LB_OUTAREA"; - Border = TRUE ; - Pos = MAP_APPFONT ( 73 , 245 ) ; - Size = MAP_APPFONT ( 75 , 90 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - Hide = TRUE ; - }; - Edit ED_OUTAREA - { - HelpID = "sc:Edit:RID_SCDLG_PIVOT_LAYOUT:ED_OUTAREA"; - Border = TRUE ; - Pos = MAP_APPFONT ( 152 , 245 ) ; - Size = MAP_APPFONT ( 100 , 12 ) ; - TabStop = TRUE ; - Hide = TRUE ; - }; - ImageButton RB_OUTAREA - { - HelpID = "sc:ImageButton:RID_SCDLG_PIVOT_LAYOUT:RB_OUTAREA"; - Pos = MAP_APPFONT ( 256 , 244 ) ; - Size = MAP_APPFONT ( 13 , 15 ) ; - TabStop = TRUE ; - Hide = TRUE ; - QuickHelpText [ en-US ] = "Shrink" ; - }; - CheckBox BTN_IGNEMPTYROWS - { - HelpID = "sc:CheckBox:RID_SCDLG_PIVOT_LAYOUT:BTN_IGNEMPTYROWS"; - Pos = MAP_APPFONT ( 12 , 263 ) ; - Size = MAP_APPFONT ( 124 , 10 ) ; - TabStop = TRUE ; - Hide = TRUE ; - Text [ en-US ] = "Ignore ~empty rows" ; - }; - CheckBox BTN_DETECTCAT - { - HelpID = "sc:CheckBox:RID_SCDLG_PIVOT_LAYOUT:BTN_DETECTCAT"; - Pos = MAP_APPFONT ( 142 , 263 ) ; - Size = MAP_APPFONT ( 124 , 10 ) ; - TabStop = TRUE ; - Hide = TRUE ; - Text [ en-US ] = "~Identify categories" ; - }; - CheckBox BTN_TOTALCOL - { - HelpID = "sc:CheckBox:RID_SCDLG_PIVOT_LAYOUT:BTN_TOTALCOL"; - Pos = MAP_APPFONT ( 12 , 277 ) ; - Size = MAP_APPFONT ( 124 , 10 ) ; - TabStop = TRUE ; - Hide = TRUE ; - Text [ en-US ] = "Total columns" ; - }; - CheckBox BTN_TOTALROW - { - HelpID = "sc:CheckBox:RID_SCDLG_PIVOT_LAYOUT:BTN_TOTALROW"; - Pos = MAP_APPFONT ( 142 , 277 ) ; - Size = MAP_APPFONT ( 124 , 10 ) ; - TabStop = TRUE ; - Hide = TRUE ; - Text [ en-US ] = "~Total rows" ; - }; - CheckBox BTN_FILTER - { - HelpID = "sc:CheckBox:RID_SCDLG_PIVOT_LAYOUT:BTN_FILTER"; - Pos = MAP_APPFONT ( 12 , 291 ) ; - Size = MAP_APPFONT ( 124 , 10 ) ; - TabStop = TRUE ; - Hide = TRUE ; - Text [ en-US ] = "~Add filter" ; - }; - CheckBox BTN_DRILLDOWN - { - HelpID = "sc:CheckBox:RID_SCDLG_PIVOT_LAYOUT:BTN_DRILLDOWN"; - Pos = MAP_APPFONT ( 142 , 291 ) ; - Size = MAP_APPFONT ( 124 , 10 ) ; - TabStop = TRUE ; - Hide = TRUE ; - Text [ en-US ] = "Ena~ble drill to details" ; - }; - String PIVOTSTR_SUM - { - Text [ en-US ] = "Sum - " ; - }; - String PIVOTSTR_COUNT - { - Text [ en-US ] = "Count - " ; - }; - String PIVOTSTR_AVG - { - Text [ en-US ] = "Mean - " ; - }; - String PIVOTSTR_MAX - { - Text [ en-US ] = "Max - " ; - }; - String PIVOTSTR_MIN - { - Text [ en-US ] = "Min - " ; - }; - String PIVOTSTR_PROD - { - Text [ en-US ] = "Product - " ; - }; - String PIVOTSTR_COUNT2 - { - Text [ en-US ] = "Count - " ; - }; - String PIVOTSTR_DEV - { - Text [ en-US ] = "StDev - " ; - }; - String PIVOTSTR_DEV2 - { - Text [ en-US ] = "StDevP - " ; - }; - String PIVOTSTR_VAR - { - Text [ en-US ] = "Var - " ; - }; - String PIVOTSTR_VAR2 - { - Text [ en-US ] = "VarP - " ; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index f7e2001f14de..1e4973befd23 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -56,7 +56,6 @@ #include "reffact.hxx" #include "scresid.hxx" #include "globstr.hrc" -#include "pivot.hrc" #include "dpobject.hxx" #include "dpsave.hxx" #include "dpshttab.hxx" @@ -76,15 +75,6 @@ namespace { const sal_uInt16 STD_FORMAT = sal_uInt16( SCA_VALID | SCA_TAB_3D | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB_ABSOLUTE ); -Point DlgPos2WndPos( const Point& rPt, const Window& rWnd ) -{ - Point aWndPt( rPt ); - aWndPt.X() = rPt.X()-rWnd.GetPosPixel().X(); - aWndPt.Y() = rPt.Y()-rWnd.GetPosPixel().Y(); - - return aWndPt; -} - static const OString* getFuncNames() { static const OString gFuncNames[ PIVOT_MAXFUNC ] = @@ -135,15 +125,19 @@ ScPivotLayoutDlg::ScPivotLayoutDlg( SfxBindings* pB, SfxChildWindow* pCW, Window mpWndRow->Init( this, mpFtRow ); mpWndData->Init( this, mpFtData ); mpWndSelect->Init( this, NULL ); - mpWndSelect->SetName( get<FixedText>("select_text")->GetText()); + mpWndSelect->SetName(get<FixedText>("select_text")->GetText()); get( mpFtInArea, "select_from" ); get( mpEdInPos, "rangesel1" ); + mpEdInPos->SetReferences(this, mpFtInArea); get( mpRbInPos, "changebutton1" ); + mpRbInPos->SetReferences(this, mpEdInPos); get( mpLbOutPos, "target_area" ); get( mpFtOutArea, "results_to" ); get( mpEdOutPos, "rangesel2" ); + mpEdOutPos->SetReferences(this, mpFtOutArea); get( mpRbOutPos, "changebutton2" ); + mpRbOutPos->SetReferences(this, mpEdOutPos); get( mpBtnIgnEmptyRows, "ignore_empty" ); get( mpBtnDetectCat, "detect_category" ); get( mpBtnTotalCol, "total_cols" ); @@ -392,7 +386,7 @@ void ScPivotLayoutDlg::GrabFieldFocus( ScDPFieldControlBase* rFieldWindow ) rFieldWindow->GrabFocus(); } -void ScPivotLayoutDlg::AddField( size_t nFromIndex, ScPivotFieldType eToType, const Point& rAtPos ) +void ScPivotLayoutDlg::AddField( size_t nFromIndex, ScPivotFieldType eToType, const Point& rScrPos ) { ScPivotFuncData aFunc = mpWndSelect->GetFuncData(nFromIndex); // local copy @@ -421,7 +415,7 @@ void ScPivotLayoutDlg::AddField( size_t nFromIndex, ScPivotFieldType eToType, co } aFunc.mnFuncMask = nMask; - size_t nAddedAt = toWnd->AddField(aStr, DlgPos2WndPos(rAtPos, *toWnd), aFunc); + size_t nAddedAt = toWnd->AddField(aStr, toWnd->ScreenToOutputPixel(rScrPos), aFunc); if (nAddedAt != PIVOTFIELD_INVALID) toWnd->GrabFocus(); @@ -445,7 +439,7 @@ void ScPivotLayoutDlg::AddField( size_t nFromIndex, ScPivotFieldType eToType, co } const ScDPLabelData& rData = maLabelData[nFromIndex+mnOffset]; - size_t nAddedAt = toWnd->AddField(rData.getDisplayName(), DlgPos2WndPos(rAtPos, *toWnd), aFunc); + size_t nAddedAt = toWnd->AddField(rData.getDisplayName(), toWnd->ScreenToOutputPixel(rScrPos), aFunc); if (nAddedAt != PIVOTFIELD_INVALID) toWnd->GrabFocus(); } @@ -504,10 +498,10 @@ void ScPivotLayoutDlg::AppendField(size_t nFromIndex, ScPivotFieldType eToType) } } -void ScPivotLayoutDlg::MoveField( ScPivotFieldType eFromType, size_t nFromIndex, ScPivotFieldType eToType, const Point& rAtPos ) +void ScPivotLayoutDlg::MoveField( ScPivotFieldType eFromType, size_t nFromIndex, ScPivotFieldType eToType, const Point& rScrPos ) { if ( eFromType == PIVOTFIELDTYPE_SELECT ) - AddField( nFromIndex, eToType, rAtPos ); + AddField( nFromIndex, eToType, rScrPos ); else if (eFromType != PIVOTFIELDTYPE_SELECT && eToType == PIVOTFIELDTYPE_SELECT) RemoveField(eFromType, nFromIndex); else if ( eFromType != eToType ) @@ -551,7 +545,7 @@ void ScPivotLayoutDlg::MoveField( ScPivotFieldType eFromType, size_t nFromIndex, } nAddedAt = toWnd->AddField( - GetLabelString(aFunc.mnCol), DlgPos2WndPos(rAtPos, *toWnd), aFunc); + GetLabelString(aFunc.mnCol), toWnd->ScreenToOutputPixel(rScrPos), aFunc); if (nAddedAt != PIVOTFIELD_INVALID) toWnd->GrabFocus(); } @@ -567,7 +561,7 @@ void ScPivotLayoutDlg::MoveField( ScPivotFieldType eFromType, size_t nFromIndex, } aFunc.mnFuncMask = nMask; - nAddedAt = toWnd->AddField(aStr, DlgPos2WndPos(rAtPos, *toWnd), aFunc); + nAddedAt = toWnd->AddField(aStr, toWnd->ScreenToOutputPixel(rScrPos), aFunc); if (nAddedAt != PIVOTFIELD_INVALID) toWnd->GrabFocus(); } @@ -586,7 +580,7 @@ void ScPivotLayoutDlg::MoveField( ScPivotFieldType eFromType, size_t nFromIndex, size_t nAt = pWnd->GetFieldIndexByData(rFunc); if (nAt != PIVOTFIELD_INVALID) { - Point aToPos = DlgPos2WndPos( rAtPos, *pWnd ); + Point aToPos = pWnd->ScreenToOutputPixel(rScrPos); size_t nToIndex = 0; pWnd->GetExistingIndex(aToPos, nToIndex); @@ -894,10 +888,7 @@ void ScPivotLayoutDlg::NotifyRemoveField( ScPivotFieldType eType, size_t nFieldI Size ScPivotLayoutDlg::GetStdFieldBtnSize() const { - // This size is static but is platform dependent. The field button size - // is calculated relative to the size of the OK button. - double w = static_cast<double>(mpBtnOk->GetSizePixel().Width()) * 0.70; - return Size(static_cast<long>(w), FIELD_BTN_HEIGHT); + return Size(approximate_char_width() * 8, FIELD_BTN_HEIGHT); } void ScPivotLayoutDlg::DropFieldItem( const Point& rScrPos, ScPivotFieldType eToType ) @@ -916,12 +907,11 @@ void ScPivotLayoutDlg::DropFieldItem( const Point& rScrPos, ScPivotFieldType eTo } else { - Point aOutPos = ScreenToOutputPixel(rScrPos); - MoveField(meDnDFromType, mnDnDFromIndex, eToType, aOutPos); + MoveField(meDnDFromType, mnDnDFromIndex, eToType, rScrPos); } } -PointerStyle ScPivotLayoutDlg::GetPointerStyleAtPoint( const Point& /* rScrPos */, ScPivotFieldType eFieldType ) +PointerStyle ScPivotLayoutDlg::GetPointerStyle(ScPivotFieldType eFieldType) { if (!mbIsDrag) return POINTER_ARROW; @@ -962,14 +952,15 @@ namespace { class InsideFieldControl : std::unary_function<ScDPFieldControlBase*, bool> { - Point maOutPos; + Point maScrPos; public: - InsideFieldControl(const Point& rOutPos) : maOutPos(rOutPos) {} + InsideFieldControl(const Point& rScrPos) : maScrPos(rScrPos) {} bool operator() (const ScDPFieldControlBase* p) const { - Rectangle aRect(p->GetPosPixel(), p->GetSizePixel()); - return aRect.IsInside(maOutPos); + Point aOutputPos = p->ScreenToOutputPixel(maScrPos); + Rectangle aRect(Point(0, 0), p->GetSizePixel()); + return aRect.IsInside(aOutputPos); } }; @@ -977,9 +968,8 @@ public: ScPivotFieldType ScPivotLayoutDlg::GetFieldTypeAtPoint( const Point& rScrPos ) const { - Point aOutputPos = ScreenToOutputPixel(rScrPos); std::vector<ScDPFieldControlBase*>::const_iterator it = - std::find_if(maFieldCtrls.begin(), maFieldCtrls.end(), InsideFieldControl(aOutputPos)); + std::find_if(maFieldCtrls.begin(), maFieldCtrls.end(), InsideFieldControl(rScrPos)); return it == maFieldCtrls.end() ? PIVOTFIELDTYPE_UNKNOWN : (*it)->GetFieldType(); } @@ -1088,113 +1078,26 @@ OUString ScPivotLayoutDlg::GetFuncString( sal_uInt16& rFuncMask, bool bIsValue ) void ScPivotLayoutDlg::InitControlAndDlgSizes() { - // The pivot.src file only specifies the positions of the controls. Here, - // we calculate appropriate size of each control based on how they are - // positioned relative to each other. - // row/column/data area sizes long nFldW = GetStdFieldBtnSize().Width(); long nFldH = GetStdFieldBtnSize().Height(); - mpWndData->SetSizePixel( - Size(mpWndSelect->GetPosPixel().X() - mpWndData->GetPosPixel().X() - FIELD_AREA_GAP*4, - 185)); - - mpWndPage->SetSizePixel( - Size(mpWndData->GetSizePixel().Width() + 85, - mpWndCol->GetPosPixel().Y() - mpWndPage->GetPosPixel().Y() - FIELD_AREA_GAP)); - mpWndRow->SetSizePixel( - Size(mpWndData->GetPosPixel().X()-mpWndRow->GetPosPixel().X() - FIELD_AREA_GAP, - mpWndData->GetSizePixel().Height())); - mpWndCol->SetSizePixel( - Size(mpWndData->GetPosPixel().X() - mpWndCol->GetPosPixel().X() + mpWndData->GetSizePixel().Width(), - mpWndData->GetPosPixel().Y() - mpWndCol->GetPosPixel().Y() - FIELD_AREA_GAP)); - - // #i29203# align right border of page window with data window - long nDataPosX = mpWndData->GetPosPixel().X() + mpWndData->GetSizePixel().Width(); - mpWndPage->SetPosPixel( - Point(nDataPosX - mpWndPage->GetSizePixel().Width(), - mpWndPage->GetPosPixel().Y())); + mpWndPage->set_width_request(approximate_char_width() * 35); + mpWndPage->set_height_request(GetTextHeight() * 4); + mpWndCol->set_width_request(approximate_char_width() * 30); + mpWndCol->set_height_request(GetTextHeight() * 4); + mpWndRow->set_width_request(approximate_char_width() * 10); + mpWndRow->set_height_request(GetTextHeight() * 8); + mpWndData->set_width_request(approximate_char_width() * 30); + mpWndData->set_height_request(GetTextHeight() * 8); // selection area long nLineSize = 10; // number of fields per column. long nH = OUTER_MARGIN_VER + nLineSize* nFldH + nLineSize * ROW_FIELD_BTN_GAP; nH += ROW_FIELD_BTN_GAP; nH += GetSettings().GetStyleSettings().GetScrollBarSize() + OUTER_MARGIN_VER; - mpWndSelect->SetSizePixel( - Size(2 * nFldW + ROW_FIELD_BTN_GAP + 10, nH)); - - mpWndPage->CalcSize(); - mpWndRow->CalcSize(); - mpWndCol->CalcSize(); - mpWndData->CalcSize(); - mpWndSelect->CalcSize(); - - AdjustDlgSize(); -} - -namespace { - -class MoveWndDown : public std::unary_function<Window*, void> -{ - long mnDelta; -public: - MoveWndDown(long nDelta) : mnDelta(nDelta) {} - void operator() (Window* p) const - { - Point aPos = p->GetPosPixel(); - aPos.Y() += mnDelta; - p->SetPosPixel(aPos); - } -}; - -} - -void ScPivotLayoutDlg::AdjustDlgSize() -{ - // On some platforms such as Windows XP, the dialog is not large enough to - // show the 'Drag the fields from the right...' text at the bottom. Check - // if it overlaps, and if it does, make the dialog size larger. - Size aWndSize = GetSizePixel(); - - Point aPosText = mpFtInfo->GetPosPixel(); - Size aSizeText = mpFtInfo->GetSizePixel(); - long nYRef = mpWndData->GetPosPixel().Y() + mpWndData->GetSizePixel().Height(); - if (aPosText.Y() > nYRef) - // This text is visible. No need to adjust. - return; - - // Calculate the extra height necessary. - long nBottomMargin = aWndSize.Height() - (aPosText.Y() + aSizeText.Height()); - long nHeightNeeded = nYRef + TEXT_INFO_GAP + aSizeText.Height() + nBottomMargin; - long nDelta = nHeightNeeded - aWndSize.Height(); - if (nDelta <= 0) - // This should never happen but just in case.... - return; - - // Make the main dialog taller. - aWndSize.Height() += nDelta; - SetSizePixel(aWndSize); - - // Move the relevant controls downward. - std::vector<Window*> aWndToMove; - aWndToMove.reserve(16); - aWndToMove.push_back(mpFtInfo); - //aWndToMove.push_back(mpBtnMore); - aWndToMove.push_back(mpFtInArea); - aWndToMove.push_back(mpEdInPos); - aWndToMove.push_back(mpRbInPos); - aWndToMove.push_back(mpFtOutArea); - aWndToMove.push_back(mpLbOutPos); - aWndToMove.push_back(mpEdOutPos); - aWndToMove.push_back(mpRbOutPos); - aWndToMove.push_back(mpBtnIgnEmptyRows); - aWndToMove.push_back(mpBtnDetectCat); - aWndToMove.push_back(mpBtnTotalCol); - aWndToMove.push_back(mpBtnTotalRow); - aWndToMove.push_back(mpBtnFilter); - aWndToMove.push_back(mpBtnDrillDown); - std::for_each(aWndToMove.begin(), aWndToMove.end(), MoveWndDown(nDelta)); + mpWndSelect->set_width_request(2 * nFldW + ROW_FIELD_BTN_GAP + 10); + mpWndSelect->set_height_request(nH); } bool ScPivotLayoutDlg::GetPivotArrays( diff --git a/sc/source/ui/inc/fieldwnd.hxx b/sc/source/ui/inc/fieldwnd.hxx index 3b88bfcaa8af..e8ec44610607 100644 --- a/sc/source/ui/inc/fieldwnd.hxx +++ b/sc/source/ui/inc/fieldwnd.hxx @@ -90,8 +90,6 @@ public: Window* mpParent; }; - ScDPFieldControlBase( - ScPivotLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption, const char* pcHelpId); ScDPFieldControlBase( Window* pParent ); virtual ~ScDPFieldControlBase(); @@ -185,6 +183,7 @@ protected: virtual void MouseMove( const MouseEvent& rMEvt ); virtual void GetFocus(); virtual void LoseFocus(); + virtual void Resize(); protected: FieldNames& GetFieldNames(); @@ -278,9 +277,7 @@ protected: virtual void Redraw(); public: - ScDPHorFieldControl( - ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId); - ScDPHorFieldControl( Window* pParent ); + ScDPHorFieldControl(Window* pParent); virtual ~ScDPHorFieldControl(); @@ -316,8 +313,6 @@ private: class ScDPPageFieldControl : public ScDPHorFieldControl { public: - ScDPPageFieldControl( - ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId); ScDPPageFieldControl( Window* pParent ); virtual ~ScDPPageFieldControl(); @@ -330,8 +325,6 @@ public: class ScDPColFieldControl : public ScDPHorFieldControl { public: - ScDPColFieldControl( - ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId); ScDPColFieldControl( Window* pParent ); virtual ~ScDPColFieldControl(); @@ -347,8 +340,6 @@ public: class ScDPRowFieldControl : public ScDPFieldControlBase { public: - ScDPRowFieldControl( - ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId); ScDPRowFieldControl( Window* pParent ); virtual ~ScDPRowFieldControl(); @@ -389,9 +380,7 @@ private: class ScDPSelectFieldControl : public ScDPHorFieldControl { public: - ScDPSelectFieldControl( - ScPivotLayoutDlg* pDialog, const ResId& rResId, FixedText* pCaption, const char* pcHelpId); - ScDPSelectFieldControl( Window* pParent ); + ScDPSelectFieldControl( Window* pParent ); virtual ~ScDPSelectFieldControl(); virtual ScPivotFieldType GetFieldType() const; @@ -403,9 +392,7 @@ public: class ScDPDataFieldControl : public ScDPHorFieldControl { public: - ScDPDataFieldControl( - ScPivotLayoutDlg* pParent, const ResId& rResId, FixedText* pCaption, const char* pcHelpId); - ScDPDataFieldControl( Window* pParent ); + ScDPDataFieldControl( Window* pParent ); virtual ~ScDPDataFieldControl(); virtual ScPivotFieldType GetFieldType() const; diff --git a/sc/source/ui/inc/pvlaydlg.hxx b/sc/source/ui/inc/pvlaydlg.hxx index b4548ce362b2..7f3f4c0a419c 100644 --- a/sc/source/ui/inc/pvlaydlg.hxx +++ b/sc/source/ui/inc/pvlaydlg.hxx @@ -79,6 +79,18 @@ class ScDocument; struct ScPivotFuncData; class ScDPObject; +#define PIVOTSTR_SUM 0 +#define PIVOTSTR_COUNT 1 +#define PIVOTSTR_AVG 2 +#define PIVOTSTR_MAX 3 +#define PIVOTSTR_MIN 4 +#define PIVOTSTR_PROD 5 +#define PIVOTSTR_COUNT2 6 +#define PIVOTSTR_DEV 7 +#define PIVOTSTR_DEV2 8 +#define PIVOTSTR_VAR 9 +#define PIVOTSTR_VAR2 10 + class ScPivotLayoutDlg : public ScAnyRefDlg { /** data source type */ @@ -102,7 +114,7 @@ public: void NotifyMoveFieldToEnd ( ScPivotFieldType eToType ); void NotifyRemoveField ( ScPivotFieldType eType, size_t nFieldIndex ); - Size GetStdFieldBtnSize() const; + Size GetStdFieldBtnSize() const; /** * Drop currently dragged field item into specified position. @@ -113,10 +125,10 @@ public: void DropFieldItem( const Point& rScrPos, ScPivotFieldType eToType ); /** - * Get pointer style at current mouse position during dragging of field + * Get pointer style during dragging of field * item. */ - PointerStyle GetPointerStyleAtPoint( const Point& rScrPos, ScPivotFieldType eFieldType ); + PointerStyle GetPointerStyle( ScPivotFieldType eFieldType ); /** * Determine the type of field at mouse cursor position. @@ -133,8 +145,8 @@ protected: virtual sal_Bool Close(); private: - /** Returns the localized function name for the specified (1-based) resource index. */ - inline const OUString& GetFuncName( sal_uInt16 nFuncIdx ) const { return maFuncNames[nFuncIdx-1]; } + /** Returns the localized function name for the specified resource index. */ + inline const OUString& GetFuncName( sal_uInt16 nFuncIdx ) const { return maFuncNames[nFuncIdx]; } /** Fills the field windows from the current pivot table settings. */ void InitFieldWindows(); diff --git a/sc/source/ui/src/scstring.src b/sc/source/ui/src/scstring.src index ad171d7f9531..e56680045317 100644 --- a/sc/source/ui/src/scstring.src +++ b/sc/source/ui/src/scstring.src @@ -865,6 +865,11 @@ String SCSTR_VALERR Text [ en-US ] = "Invalid value" ; }; +String SCSTR_SELECT +{ + Text [ en-US ] = "Selection area"; +}; + String STR_NOFORMULASPECIFIED { Text [ en-US ] = "No formula specified." ; diff --git a/sc/uiconfig/scalc/ui/pivottablelayout.ui b/sc/uiconfig/scalc/ui/pivottablelayout.ui index efc0716e73fc..75645335f5f1 100644 --- a/sc/uiconfig/scalc/ui/pivottablelayout.ui +++ b/sc/uiconfig/scalc/ui/pivottablelayout.ui @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> <interface> - <!-- interface-requires gtk+ 3.0 --> + <!-- interface-requires LibreOffice 1.0 --> + <requires lib="gtk+" version="3.0"/> <object class="GtkDialog" id="PivotTableLayout"> <property name="can_focus">False</property> <property name="border_width">6</property> @@ -19,8 +21,8 @@ <property name="label">gtk-ok</property> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">True</property> <property name="has_default">True</property> + <property name="receives_default">True</property> <property name="use_stock">True</property> </object> <packing> @@ -96,73 +98,99 @@ <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="GtkBox" id="box2"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="spacing">12</property> <child> <object class="GtkBox" id="box5"> <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">6</property> <child> - <object class="sclo-ScDPPageFieldControl" id="pagefield"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> <property name="row_spacing">6</property> <property name="column_spacing">6</property> - <child> - <placeholder/> - </child> + <property name="row_homogeneous">True</property> + <property name="column_homogeneous">True</property> <child> <object class="sclo-ScDPColFieldControl" id="columnfield"> <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="left_attach">1</property> - <property name="top_attach">0</property> - <property name="width">1</property> + <property name="left_attach">2</property> + <property name="top_attach">1</property> + <property name="width">6</property> <property name="height">1</property> </packing> </child> <child> - <object class="sclo-ScDPRowFieldControl" id="rowfield"> + <object class="sclo-ScDPDataFieldControl" id="datafield"> <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="left_attach">0</property> - <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> + <property name="left_attach">2</property> + <property name="top_attach">2</property> + <property name="width">6</property> + <property name="height">2</property> </packing> </child> <child> - <object class="sclo-ScDPDataFieldControl" id="datafield"> + <object class="sclo-ScDPPageFieldControl" id="pagefield"> <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="left_attach">1</property> - <property name="top_attach">1</property> - <property name="width">1</property> + <property name="top_attach">0</property> + <property name="width">7</property> <property name="height">1</property> </packing> </child> + <child> + <object class="sclo-ScDPRowFieldControl" id="rowfield"> + <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="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">2</property> + <property name="height">2</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> </object> <packing> <property name="expand">False</property> @@ -174,6 +202,7 @@ <object class="GtkLabel" id="info"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="xalign">0</property> <property name="label" translatable="yes">Drag the fields from the right into the desired position</property> </object> <packing> @@ -211,6 +240,7 @@ <object class="GtkExpander" id="more"> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="spacing">6</property> <child> <object class="GtkFrame" id="frame1"> <property name="visible">True</property> @@ -221,8 +251,8 @@ <object class="GtkAlignment" id="alignment1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="left_padding">12</property> <property name="top_padding">6</property> + <property name="left_padding">12</property> <child> <object class="GtkBox" id="box3"> <property name="visible">True</property> @@ -233,14 +263,110 @@ <object class="GtkBox" id="box4"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> <property name="spacing">6</property> <child> - <object class="GtkLabel" id="select_from"> + <object class="GtkGrid" id="grid2"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">_Selection from:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">rangesel1</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkLabel" id="select_from"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Selection from:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">rangesel1</property> + <property name="ellipsize">end</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="foruilo-RefButton" id="changebutton1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="foruilo-RefButton" id="changebutton2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + </object> + <packing> + <property name="left_attach">3</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="foruilo-RefEdit" id="rangesel2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="width_chars">25</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="target_area"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="results_to"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Res_ults to:</property> + <property name="use_underline">True</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> + <child> + <object class="foruilo-RefEdit" id="rangesel1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">2</property> + <property name="height">1</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> @@ -248,30 +374,6 @@ <property name="position">0</property> </packing> </child> - <child> - <object class="foruilo-RefEdit" id="rangesel1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="foruilo-RefButton" id="changebutton1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> </object> <packing> <property name="expand">False</property> @@ -280,70 +382,10 @@ </packing> </child> <child> - <object class="GtkBox" id="box6"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel" id="results_to"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Res_ults to:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">rangesel2</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkComboBox" id="target_area"> - <property name="visible">True</property> - <property name="can_focus">False</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="foruilo-RefEdit" id="rangesel2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="foruilo-RefButton" id="changebutton2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> <object class="GtkGrid" id="grid3"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="hexpand">True</property> <property name="row_spacing">6</property> <property name="column_spacing">6</property> <child> @@ -352,6 +394,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="hexpand">True</property> <property name="use_underline">True</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> @@ -369,6 +412,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="hexpand">True</property> <property name="use_underline">True</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> @@ -386,6 +430,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="hexpand">True</property> <property name="use_underline">True</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> @@ -403,6 +448,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="hexpand">True</property> <property name="use_underline">True</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> @@ -420,6 +466,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="hexpand">True</property> <property name="use_underline">True</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> @@ -437,6 +484,7 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="hexpand">True</property> <property name="use_underline">True</property> <property name="xalign">0</property> <property name="draw_indicator">True</property> @@ -452,7 +500,7 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">2</property> + <property name="position">1</property> </packing> </child> </object> @@ -487,7 +535,6 @@ </child> <child> <object class="GtkLabel" id="page_text"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Page Fields</property> </object> @@ -499,7 +546,6 @@ </child> <child> <object class="GtkLabel" id="column_text"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Column Fields</property> </object> @@ -511,7 +557,6 @@ </child> <child> <object class="GtkLabel" id="row_text"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Row Fields</property> </object> @@ -523,7 +568,6 @@ </child> <child> <object class="GtkLabel" id="data_text"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Data Fields</property> </object> @@ -535,7 +579,6 @@ </child> <child> <object class="GtkLabel" id="select_text"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Selection area</property> </object> @@ -547,7 +590,6 @@ </child> <child> <object class="GtkLabel" id="sum"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Sum - </property> </object> @@ -559,7 +601,6 @@ </child> <child> <object class="GtkLabel" id="count"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Count - </property> </object> @@ -571,7 +612,6 @@ </child> <child> <object class="GtkLabel" id="mean"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Mean - </property> </object> @@ -583,7 +623,6 @@ </child> <child> <object class="GtkLabel" id="max"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Max - </property> </object> @@ -595,7 +634,6 @@ </child> <child> <object class="GtkLabel" id="min"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Min - </property> </object> @@ -607,7 +645,6 @@ </child> <child> <object class="GtkLabel" id="product"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Product - </property> </object> @@ -619,7 +656,6 @@ </child> <child> <object class="GtkLabel" id="count2"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Count - </property> </object> @@ -631,7 +667,6 @@ </child> <child> <object class="GtkLabel" id="stdev"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">StDev - </property> </object> @@ -643,7 +678,6 @@ </child> <child> <object class="GtkLabel" id="stdevp"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">StDevP - </property> </object> @@ -655,7 +689,6 @@ </child> <child> <object class="GtkLabel" id="var"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Var - </property> </object> @@ -667,7 +700,6 @@ </child> <child> <object class="GtkLabel" id="varp"> - <property name="visible">False</property> <property name="can_focus">False</property> <property name="label" translatable="yes">VarP - </property> </object> |