[Libreoffice-commits] .: 6 commits - offapi/com sc/source
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Fri Nov 25 21:30:47 PST 2011
offapi/com/sun/star/sheet/XSpreadsheets2.idl | 8 +--
sc/source/core/data/cell.cxx | 8 +--
sc/source/ui/namedlg/namedefdlg.cxx | 2
sc/source/ui/namedlg/namedlg.cxx | 21 ++--------
sc/source/ui/namedlg/namemgrtable.cxx | 7 ++-
sc/source/ui/src/namedefdlg.src | 56 +++++++++++++--------------
sc/source/ui/src/namedlg.src | 50 ++++++++++++------------
7 files changed, 73 insertions(+), 79 deletions(-)
New commits:
commit 8039cd4d7db58921f7d35eeea93cd7f85a5e0815
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sat Nov 26 06:26:03 2011 +0100
ManageNames: improve layout of Define Names dialog
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index f7afe22..c4ffc2e 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -322,7 +322,7 @@ void ScNameDefDlg::MorePushed()
Size nSize = GetSizePixel();
//depending on the state of the button, move all elements below up/down
- long nPixel = 85;
+ long nPixel = 75;
if (!maBtnMore.GetState())
{
nPixel *= -1;
diff --git a/sc/source/ui/src/namedefdlg.src b/sc/source/ui/src/namedefdlg.src
index 67f7b43..1896918 100644
--- a/sc/source/ui/src/namedefdlg.src
+++ b/sc/source/ui/src/namedefdlg.src
@@ -40,89 +40,89 @@ ModelessDialog RID_SCDLG_NAMES_DEFINE
Closeable = TRUE;
PushButton BTN_ADD
{
- Pos = MAP_APPFONT( 110, 100 );
- Size = MAP_APPFONT( 40, 14 );
+ Pos = MAP_APPFONT( 90, 100 );
+ Size = MAP_APPFONT( 50, 15 );
TabStop = TRUE;
Text [en-US] = "Add";
};
PushButton BTN_CANCEL
{
- Pos = MAP_APPFONT( 155, 100 );
- Size = MAP_APPFONT ( 40, 14 );
+ Pos = MAP_APPFONT( 145, 100 );
+ Size = MAP_APPFONT ( 50, 15 );
TabStop = TRUE;
Text [en-US] = "Cancel";
};
CheckBox BTN_MORE
{
- Pos = MAP_APPFONT( 6, 82 );
- Size = MAP_APPFONT( 60, 14 );
+ Pos = MAP_APPFONT( 5, 82 );
+ Size = MAP_APPFONT( 60, 15 );
Text [en-US] = "RangeOptions";
};
FixedText FT_INFO
{
- Pos = MAP_APPFONT( 6, 6 );
- Size = MAP_APPFONT( 180, 14 );
+ Pos = MAP_APPFONT( 5, 5 );
+ Size = MAP_APPFONT( 180, 15 );
};
FixedText FT_NAME
{
- Pos = MAP_APPFONT( 6, 25 );
- Size = MAP_APPFONT( 30, 14 );
+ Pos = MAP_APPFONT( 5, 25 );
+ Size = MAP_APPFONT( 30, 15 );
Text [en-US] = "Name";
};
FixedText FT_RANGE
{
- Pos = MAP_APPFONT( 6, 44 );
- Size = MAP_APPFONT( 30, 14 );
+ Pos = MAP_APPFONT( 5, 45 );
+ Size = MAP_APPFONT( 30, 15 );
Text [en-US] = "Range";
};
FixedText FT_SCOPE
{
- Pos = MAP_APPFONT( 6, 63 );
- Size = MAP_APPFONT( 30, 14 );
+ Pos = MAP_APPFONT( 5, 65 );
+ Size = MAP_APPFONT( 30, 15 );
Text [en-US] = "Scope";
};
Edit ED_NAME
{
Border = TRUE;
Pos = MAP_APPFONT( 40, 25 );
- Size = MAP_APPFONT( 150, 14 );
+ Size = MAP_APPFONT( 155, 15 );
TabStop = TRUE;
};
Edit ED_RANGE
{
Border = TRUE;
- Pos = MAP_APPFONT( 40, 44 );
- Size = MAP_APPFONT( 130, 14 );
+ Pos = MAP_APPFONT( 40, 45 );
+ Size = MAP_APPFONT( 140, 15 );
TabStop = TRUE;
};
ImageButton RB_RANGE
{
- Pos = MAP_APPFONT ( 170 , 44 ) ;
- Size = MAP_APPFONT ( 15 , 14 ) ;
+ Pos = MAP_APPFONT ( 180 , 45 ) ;
+ Size = MAP_APPFONT ( 15 , 15 ) ;
TabStop = TRUE ;
QuickHelpText [ en-US ] = "Shrink" ;
};
CheckBox BTN_PRINTAREA
{
HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_PRINTAREA";
- Pos = MAP_APPFONT ( 6 , 100 ) ;
- Size = MAP_APPFONT ( 80 , 14 ) ;
+ Pos = MAP_APPFONT ( 5 , 100 ) ;
+ Size = MAP_APPFONT ( 80 , 15 ) ;
Text [ en-US ] = "~Print range" ;
TabStop = TRUE ;
};
CheckBox BTN_CRITERIA
{
HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_CRITERIA";
- Pos = MAP_APPFONT ( 6 , 118 ) ;
- Size = MAP_APPFONT ( 60 , 14 ) ;
+ Pos = MAP_APPFONT ( 5 , 120 ) ;
+ Size = MAP_APPFONT ( 60 , 15 ) ;
Text [ en-US ] = "~Filter" ;
TabStop = TRUE ;
};
CheckBox BTN_ROWHEADER
{
HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_ROWHEADER";
- Pos = MAP_APPFONT ( 110, 118 ) ;
- Size = MAP_APPFONT ( 82 , 14 ) ;
+ Pos = MAP_APPFONT ( 110, 120 ) ;
+ Size = MAP_APPFONT ( 82 , 15 ) ;
Text [ en-US ] = "Repeat ~row" ;
TabStop = TRUE ;
};
@@ -130,15 +130,15 @@ ModelessDialog RID_SCDLG_NAMES_DEFINE
{
HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_COLHEADER";
Pos = MAP_APPFONT ( 110 , 100 ) ;
- Size = MAP_APPFONT ( 82 , 14 ) ;
+ Size = MAP_APPFONT ( 82 , 15 ) ;
Text [ en-US ] = "Repeat ~column" ;
TabStop = TRUE ;
};
ListBox LB_SCOPE
{
Border = TRUE;
- Pos = MAP_APPFONT ( 40 , 63 );
- Size = MAP_APPFONT ( 150 , 80 );
+ Pos = MAP_APPFONT ( 40 , 65 );
+ Size = MAP_APPFONT ( 155 , 80 );
TabStop = TRUE;
DropDown = TRUE;
};
commit 0fe2786e3c5b59c5adcc9165574e1325dd896852
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sat Nov 26 06:11:02 2011 +0100
ManageNames: improve layout of dialog
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index f8a8893..f32fc47 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -494,7 +494,7 @@ void ScNameDlg::MorePushed()
Size nSize = GetSizePixel();
//depending on the state of the button, move all elements below up/down
- long nPixel = 85;
+ long nPixel = 60;
if (!maBtnMore.GetState())
{
nPixel *= -1;
diff --git a/sc/source/ui/src/namedlg.src b/sc/source/ui/src/namedlg.src
index 66977f7..9d15901 100644
--- a/sc/source/ui/src/namedlg.src
+++ b/sc/source/ui/src/namedlg.src
@@ -32,69 +32,69 @@ ModelessDialog RID_SCDLG_NAMES
HelpId = CMD_FID_DEFINE_NAME ;
Hide = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 220 , 250 ) ;
+ Size = MAP_APPFONT ( 220 , 247 ) ;
Text [ en-US ] = "Manage Names" ;
Moveable = TRUE ;
Closeable = TRUE;
HelpButton BTN_HELP
{
- Pos = MAP_APPFONT ( 6 , 225 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 5 , 227 ) ;
+ Size = MAP_APPFONT ( 50 , 15 ) ;
TabStop = TRUE ;
};
PushButton BTN_ADD
{
HelpID = "sc:PushButton:RID_SCDLG_NAMES:BTN_ADD";
- Pos = MAP_APPFONT ( 6 , 200 ) ;
- Size = MAP_APPFONT ( 40 , 14 ) ;
+ Pos = MAP_APPFONT ( 5 , 200 ) ;
+ Size = MAP_APPFONT ( 50 , 15 ) ;
Text [ en-US ] = "Add" ;
TabStop = TRUE ;
DefButton = TRUE ;
};
PushButton BTN_DELETE
{
- Pos = MAP_APPFONT( 50, 200) ;
- Size = MAP_APPFONT ( 40, 14 ) ;
+ Pos = MAP_APPFONT( 60, 200) ;
+ Size = MAP_APPFONT ( 50, 15 ) ;
Text [ en-US ] = "~Delete" ;
TabStop = TRUE ;
};
PushButton BTN_NAME_OK
{
- Pos = MAP_APPFONT ( 128 , 225 ) ;
- Size = MAP_APPFONT ( 40 , 14 ) ;
+ Pos = MAP_APPFONT ( 110 , 227 ) ;
+ Size = MAP_APPFONT ( 50 , 15 ) ;
Text [ en-US ] = "OK" ;
TabStop = TRUE ;
};
PushButton BTN_NAME_CANCEL
{
- Pos = MAP_APPFONT ( 178 , 225 ) ;
- Size = MAP_APPFONT ( 40 , 14 ) ;
+ Pos = MAP_APPFONT ( 165 , 227 ) ;
+ Size = MAP_APPFONT ( 50 , 15 ) ;
Text [ en-US ] = "Cancel" ;
TabStop = TRUE ;
};
PushButton BTN_SELECT
{
Pos = MAP_APPFONT ( 128 , 200 ) ;
- Size = MAP_APPFONT ( 90 , 14 ) ;
+ Size = MAP_APPFONT ( 90 , 15 ) ;
Text [ en-US ] = "Select Range" ;
TabStop = TRUE ;
};
FixedText FT_SCOPE
{
- Pos = MAP_APPFONT( 6, 170 );
+ Pos = MAP_APPFONT( 5, 172 );
Size = MAP_APPFONT( 40, 8 );
Text [ en-US ] = "Scope" ;
};
FixedText FT_RANGE
{
- Pos = MAP_APPFONT( 6, 155 );
+ Pos = MAP_APPFONT( 5, 157 );
Size = MAP_APPFONT( 40, 8 );
Text [ en-US ] = "Range" ;
};
FixedText FT_NAME
{
- Pos = MAP_APPFONT( 6, 140 );
+ Pos = MAP_APPFONT( 5, 142 );
Size = MAP_APPFONT( 40, 8 );
Text [ en-US ] = "Name" ;
};
@@ -134,8 +134,8 @@ ModelessDialog RID_SCDLG_NAMES
CheckBox BTN_MORE
{
HelpID = "sc:MoreButton:RID_SCDLG_NAMES:BTN_MORE";
- Pos = MAP_APPFONT ( 6 , 185 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 5 , 185 ) ;
+ Size = MAP_APPFONT ( 50 , 15 ) ;
Text [en-US] = "Range Options";
};
FixedLine FL_DIV
@@ -146,7 +146,7 @@ ModelessDialog RID_SCDLG_NAMES
CheckBox BTN_PRINTAREA
{
HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_PRINTAREA";
- Pos = MAP_APPFONT ( 6 , 208 ) ;
+ Pos = MAP_APPFONT ( 5 , 200 ) ;
Size = MAP_APPFONT ( 80 , 10 ) ;
Text [ en-US ] = "~Print range" ;
TabStop = TRUE ;
@@ -154,7 +154,7 @@ ModelessDialog RID_SCDLG_NAMES
CheckBox BTN_CRITERIA
{
HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_CRITERIA";
- Pos = MAP_APPFONT ( 6 , 223 ) ;
+ Pos = MAP_APPFONT ( 5 , 215 ) ;
Size = MAP_APPFONT ( 60 , 10 ) ;
Text [ en-US ] = "~Filter" ;
TabStop = TRUE ;
@@ -162,7 +162,7 @@ ModelessDialog RID_SCDLG_NAMES
CheckBox BTN_ROWHEADER
{
HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_ROWHEADER";
- Pos = MAP_APPFONT ( 110, 223 ) ;
+ Pos = MAP_APPFONT ( 110, 215 ) ;
Size = MAP_APPFONT ( 82 , 10 ) ;
Text [ en-US ] = "Repeat ~row" ;
TabStop = TRUE ;
@@ -170,7 +170,7 @@ ModelessDialog RID_SCDLG_NAMES
CheckBox BTN_COLHEADER
{
HelpID = "sc:CheckBox:RID_SCDLG_NAMES:BTN_COLHEADER";
- Pos = MAP_APPFONT ( 110 , 208 ) ;
+ Pos = MAP_APPFONT ( 110 , 200 ) ;
Size = MAP_APPFONT ( 82 , 10 ) ;
Text [ en-US ] = "Repeat ~column" ;
TabStop = TRUE ;
@@ -188,15 +188,15 @@ ModelessDialog RID_SCDLG_NAMES
FixedText FT_INFO
{
- Pos = MAP_APPFONT( 6, 127 );
- Size = MAP_APPFONT( 210, 14 );
+ Pos = MAP_APPFONT( 5, 127 );
+ Size = MAP_APPFONT( 210, 15 );
TabStop = FALSE;
};
Control CTRL_MANAGENAMES
{
- Pos = MAP_APPFONT( 6, 20 );
- Size = MAP_APPFONT( 210, 100 );
+ Pos = MAP_APPFONT( 5, 5 );
+ Size = MAP_APPFONT( 210, 115 );
Border = TRUE;
DialogControl = TRUE;
};
commit 59e0854dd302659f67ec0b4b3a18515b26499280
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sat Nov 26 04:20:38 2011 +0100
ManageNames: make the header bar work correctly
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index f2b03b1..d471c74 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -44,7 +44,7 @@
#define ITEMID_RANGE 2
#define ITEMID_SCOPE 3
-#define MINSIZE 50
+#define MINSIZE 80
String createEntryString(const ScRangeNameLine& rLine)
@@ -173,6 +173,7 @@ std::vector<ScRangeNameLine> ScRangeManagerTable::GetSelectedEntries()
namespace {
+//ensure that the minimum column size is respected
void CalculateItemSize(const long& rTableSize, long& rItemNameSize, long& rItemRangeSize)
{
long aItemScopeSize = rTableSize - rItemNameSize - rItemRangeSize;
@@ -218,16 +219,20 @@ IMPL_LINK( ScRangeManagerTable, HeaderEndDragHdl, void*, EMPTYARG)
long aItemNameSize = maHeaderBar.GetItemSize(ITEMID_NAME);
long aItemRangeSize = maHeaderBar.GetItemSize(ITEMID_RANGE);
+ //calculate column size based on user input and minimum size
CalculateItemSize(aTableSize, aItemNameSize, aItemRangeSize);
long aItemScopeSize = aTableSize - aItemNameSize - aItemRangeSize;
Size aSz;
aSz.Width() = aItemNameSize;
SetTab( ITEMID_NAME, PixelToLogic( aSz, MapMode(MAP_APPFONT) ).Width(), MAP_APPFONT );
+ maHeaderBar.SetItemSize(ITEMID_NAME, aItemNameSize);
aSz.Width() += aItemRangeSize;
SetTab( ITEMID_RANGE, PixelToLogic( aSz, MapMode(MAP_APPFONT) ).Width(), MAP_APPFONT );
+ maHeaderBar.SetItemSize(ITEMID_RANGE, aItemRangeSize);
aSz.Width() += aItemScopeSize;
SetTab( ITEMID_SCOPE, PixelToLogic( aSz, MapMode(MAP_APPFONT) ).Width(), MAP_APPFONT );
+ maHeaderBar.SetItemSize(ITEMID_SCOPE, aItemScopeSize);
return 0;
}
commit e0765292dc57b2170834805a1eaa5278c90db06a
Author: Laurent Godard <lgodard.libre at laposte.net>
Date: Thu Nov 24 18:41:17 2011 +0100
importSheet : clean idl comments according to small previous cleaning
diff --git a/offapi/com/sun/star/sheet/XSpreadsheets2.idl b/offapi/com/sun/star/sheet/XSpreadsheets2.idl
index c3635b9..b8686cf 100644
--- a/offapi/com/sun/star/sheet/XSpreadsheets2.idl
+++ b/offapi/com/sun/star/sheet/XSpreadsheets2.idl
@@ -47,15 +47,15 @@ interface XSpreadsheets2: com::sun::star::sheet::XSpreadsheets
a valid XSpreadsheetDocument reference to source doc
@param srcName
- the source sheet name.
+ the source sheet name. Throw IllegalArgumentException if not valid
@param nDestPosition
- the destination sheet position.
+ the destination sheet position. Throw IndexOutOfBoundsException if not valid
- @returns the position of the imported sheet or -1 if not imported
+ @returns the position of the imported sheet
@throws ::com::sun::star::lang::IllegalArgumentException
- @throws ::com::sun::star::uno::RuntimeException
+ @throws com::sun::star::lang::IndexOutOfBoundsException
@since LibreOffice 3.5
*/
commit 8bbf33d89b93c7e145a53ec84609b4296eefecf6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sat Nov 26 02:44:14 2011 +0100
no need to convert between upper name and normal name
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index 9267133..b9cb816 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -147,14 +147,14 @@ void adjustRangeName(ScToken* pToken, ScDocument& rNewDoc, const ScDocument* pOl
pOldRangeData = pOldDoc->GetRangeName(aOldTab)->findByIndex(nOldIndex);
if (!pOldRangeData)
return; //might be an error in the formula array
- aRangeName = pOldRangeData->GetName();
+ aRangeName = pOldRangeData->GetUpperName();
}
else
{
pOldRangeData = pOldDoc->GetRangeName()->findByIndex(nOldIndex);
if (!pOldRangeData)
return; //might be an error in the formula array
- aRangeName = pOldRangeData->GetName();
+ aRangeName = pOldRangeData->GetUpperName();
}
//find corresponding range name in new document
@@ -166,7 +166,7 @@ void adjustRangeName(ScToken* pToken, ScDocument& rNewDoc, const ScDocument* pOl
//search local range names
if (pRangeName)
{
- pRangeData = pRangeName->findByUpperName(ScGlobal::pCharClass->upper(aRangeName));
+ pRangeData = pRangeName->findByUpperName(aRangeName);
}
//search global range names
if (!pRangeData)
@@ -174,7 +174,7 @@ void adjustRangeName(ScToken* pToken, ScDocument& rNewDoc, const ScDocument* pOl
bNewGlobal = true;
pRangeName = rNewDoc.GetRangeName();
if (pRangeName)
- pRangeData = pRangeName->findByUpperName(ScGlobal::pCharClass->upper(aRangeName));
+ pRangeData = pRangeName->findByUpperName(aRangeName);
}
//if no range name was found copy it
if (!pRangeData)
commit e85b2daa9b5b652ba45ba2cac8df87ee7b0b045e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Nov 24 19:09:15 2011 +0100
ManageNames:the Reference button should be disabled like the range field
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index c273894..f8a8893 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -228,6 +228,7 @@ void ScNameDlg::CheckForEmptyTable()
{
maBtnDelete.Disable();
maEdAssign.Disable();
+ aRbAssign.Disable();
maEdName.Disable();
maLbScope.Disable();
@@ -240,6 +241,7 @@ void ScNameDlg::CheckForEmptyTable()
{
maBtnDelete.Enable();
maEdAssign.Enable();
+ aRbAssign.Enable();
maEdName.Enable();
maLbScope.Enable();
@@ -323,21 +325,6 @@ ScRangeName* ScNameDlg::GetRangeName(const rtl::OUString& rScope)
return maRangeMap.find(rScope)->second;
}
-//updates the table and the buttons
-void ScNameDlg::UpdateNames()
-{
- ScRangeNameLine aLine;
- mpRangeManagerTable->GetCurrentLine(aLine);
- if (aLine.aName.getLength())
- {
- maBtnDelete.Enable();
- }
- else
- {
- maBtnDelete.Disable();
- }
-}
-
void ScNameDlg::CalcCurTableAssign( String& aAssign, ScRangeData* pRangeData )
{
if ( pRangeData )
@@ -457,6 +444,7 @@ void ScNameDlg::SelectionChanged()
maEdName.Disable();
maEdAssign.Disable();
+ aRbAssign.Disable();
maLbScope.Disable();
maBtnSelect.Disable();
maBtnRowHeader.Disable();
@@ -475,6 +463,7 @@ void ScNameDlg::SelectionChanged()
maBtnDelete.Enable();
maEdName.Enable();
maEdAssign.Enable();
+ aRbAssign.Disable();
maLbScope.Enable();
maBtnSelect.Enable();
maBtnRowHeader.Enable();
More information about the Libreoffice-commits
mailing list