|
List Info
Thread: Improve sorting capabilities
|
|
| Improve sorting capabilities |

|
2007-02-08 11:49:04 |
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
|
| Re: Improve sorting capabilities |

|
2007-02-08 13:00:07 |
Hi Stefan,
Thank you for the nice code-snippet. (and useful of course
Just a small question:
I see a sub SelectCurrentRange where you used the
dispatchHelper to select the
current region:
There are some reasons fon not using the method
XSheetCellCursor::collapseToCurrentRegion()
instead? or perhaps am I missing something ?
thanks
Paolo M
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| Re: Improve sorting capabilities |

|
2007-02-08 15:28:51 |
Hi Paolo,
Paolo Mantovani schrieb:
> There are some reasons fon not using the method
> XSheetCellCursor::collapseToCurrentRegion()
> instead? or perhaps am I missing something ?
Oh yes, there is a reason: I am an absolute beginner with
programming in OpenOffice.org and simply did not know about
this method.
Thank you for the hint.
Coming from Microsoft´s VBA I am completely spoiled by the
Visual
Basic IDE, that automatically shows up all possible methods,
properties and subobjects while typing. I have not managed
yet to
develop my strategy in order to easily find these things in
OpenOffice.org Basic.
Stefan
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| Re: Improve sorting capabilities |

|
2007-02-09 03:00:10 |
ALLE 22:28, GIOVEDě 8 FEBBRAIO 2007, STEFAN WEIGEL HA
SCRITTO:
> HI PAOLO,
>
> PAOLO MANTOVANI SCHRIEB:
> > THERE ARE SOME REASONS FON NOT USING THE METHOD
> > XSHEETCELLCURSOR::COLLAPSETOCURRENTREGION()
> > INSTEAD? OR PERHAPS AM I MISSING SOMETHING ?
>
> OH YES, THERE IS A REASON: I AM AN ABSOLUTE BEGINNER
WITH
> PROGRAMMING IN OPENOFFICE.ORG AND SIMPLY DID NOT KNOW
ABOUT THIS METHOD.
OK, I WAS NOT SURE TO HAVE UNDERSTOOD CORRECTLY YOUR CODE
BECAUSE OF THE
GERMAN COMMENTS.
CIAO
PAOLO M
------------------------------------------------------------
---------
TO UNSUBSCRIBE, E-MAIL: DEV-UNSUBSCRIBE API.OPENOFFICE.ORG
FOR ADDITIONAL COMMANDS, E-MAIL: DEV-HELP API.OPENOFFICE.ORG
|
|
| Re: Improve sorting capabilities |

|
2007-02-09 03:40:01 |
Hi stefan
> Coming from Microsoft´s VBA I am completely spoiled by
the Visual Basic
> IDE, that automatically shows up all possible methods,
properties and
> subobjects while typing. I have not managed yet to
develop my strategy
> in order to easily find these things in OpenOffice.org
Basic.
you may have a loook at X-Ray from Bernard Marcelly
http://wiki.services.openoffice.
org/wiki/Extensions_development_basic#X-Ray_tool
Laurent
--
Laurent Godard <lgodard indesko.com> -
Ingénierie OpenOffice.org -
http://www.indesko.com
Nuxeo Enterprise Content Management >> http://www.nuxeo.com -
http://www.nuxeo.org
Livre "Programmation OpenOffice.org", Eyrolles
2004-2006
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| Re: Improve sorting capabilities |

|
2007-02-09 03:40:21 |
HI STEFAN,
ALLE 22:28, GIOVEDě 8 FEBBRAIO 2007, STEFAN WEIGEL HA
SCRITTO:
> HI PAOLO,
>
> PAOLO MANTOVANI SCHRIEB:
> > THERE ARE SOME REASONS FON NOT USING THE METHOD
> > XSHEETCELLCURSOR::COLLAPSETOCURRENTREGION()
> > INSTEAD? OR PERHAPS AM I MISSING SOMETHING ?
>
> OH YES, THERE IS A REASON: I AM AN ABSOLUTE BEGINNER
WITH
> PROGRAMMING IN OPENOFFICE.ORG AND SIMPLY DID NOT KNOW
ABOUT THIS METHOD.
>
> THANK YOU FOR THE HINT.
THE FOLLOWING SUB SHOULD HAVE THE SAME EFFECT OF YOUR
ORIGINAL
SELECTCURRENTRANGE
IN EFFECT YOU DON'T NEED TO SELECT THE CURRENT REGION TO USE
IT IN YOUR
FOLLOWING CODE, UNLESS YOU DO IT IN ORDER TO GIVE SOME
FEEDBACK TO THE USER
SUB SELECTCURRENTREGION
DIM ODOC, OSHEET, OSELECTION, OCURSOR
ODOC = THISCOMPONENT
OSHEET = ODOC.CURRENTCONTROLLER.ACTIVESHEET
OSELECTION = ODOC.CURRENTSELECTION
OCURSOR = OSHEET.CREATECURSORBYRANGE(OSELECTION)
OCURSOR.COLLAPSETOCURRENTREGION()
ODOC.CURRENTCONTROLLER.SELECT(OCURSOR)
END SUB
>
> COMING FROM MICROSOFT´S VBA I AM COMPLETELY SPOILED BY
THE VISUAL
> BASIC IDE, THAT AUTOMATICALLY SHOWS UP ALL POSSIBLE
METHODS,
> PROPERTIES AND SUBOBJECTS WHILE TYPING. I HAVE NOT
MANAGED YET TO
> DEVELOP MY STRATEGY IN ORDER TO EASILY FIND THESE
THINGS IN
> OPENOFFICE.ORG BASIC.
I USE XRAY FROM BERNARD MARCELLY.
USED IN CONJUNCTION WITH THE SDK IT IS AN EXCEPTIONAL TOOL
TO INVESTIGATE OOO
API OBJECTS.
CIAO
PAOLO M
------------------------------------------------------------
---------
TO UNSUBSCRIBE, E-MAIL: DEV-UNSUBSCRIBE API.OPENOFFICE.ORG
FOR ADDITIONAL COMMANDS, E-MAIL: DEV-HELP API.OPENOFFICE.ORG
|
|
| Re: Improve sorting capabilities |

|
2007-02-09 07:55:27 |
Hi Paolo,
Paolo Mantovani schrieb:
> The following sub should have the same effect of your
original
> SelectCurrentRange
Thank you. It is not exactly the same effect, because the
current
region should only be selected if the current selection
contains one
single cell. Otherwise, if the current selection contains a
range of
more than one cell, the selection must not be changed.
> sub SelectCurrentRegion
> Dim oDoc, oSheet, oSelection, oCursor
>
> oDoc = ThisComponent
> oSheet = oDoc.CurrentController.ActiveSheet
> oSelection = oDoc.CurrentSelection
>
> oCursor = oSheet.createCursorByRange(oSelection)
> oCursor.collapseToCurrentRegion()
> oDoc.CurrentController.select(oCursor)
>
> End Sub
So there needs to be added some if-clause regarding the
number of
rows or columns in the current selection. That´s easy for
me, I think.
Stefan
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| Re: Improve sorting capabilities |

|
2007-02-09 08:25:24 |
ALLE 14:55, VENERDě 9 FEBBRAIO 2007, STEFAN WEIGEL HA
SCRITTO:
> THANK YOU. IT IS NOT EXACTLY THE SAME EFFECT, BECAUSE
THE CURRENT
> REGION SHOULD ONLY BE SELECTED IF THE CURRENT SELECTION
CONTAINS ONE
> SINGLE CELL. OTHERWISE, IF THE CURRENT SELECTION
CONTAINS A RANGE OF
> MORE THAN ONE CELL, THE SELECTION MUST NOT BE CHANGED.
OF COURSE YOU'RE RIGHT
[...]
> SO THERE NEEDS TO BE ADDED SOME IF-CLAUSE REGARDING THE
NUMBER OF
> ROWS OR COLUMNS IN THE CURRENT SELECTION. THAT´S EASY
FOR ME, I THINK.
DON'T FORGET THE CASES OF MULTIPLE RANGE AND SHAPES
SELECTION
CIAO
PAOLO M
------------------------------------------------------------
---------
TO UNSUBSCRIBE, E-MAIL: DEV-UNSUBSCRIBE API.OPENOFFICE.ORG
FOR ADDITIONAL COMMANDS, E-MAIL: DEV-HELP API.OPENOFFICE.ORG
|
|
[1-8]
|
|