From 7076484d6a1a3db434d31ae5a4875dfb9cb2a094 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Mon, 16 Jun 2008 11:41:13 +0200
Subject: [PATCH] Integrate sort-options into sc.

---
 sc/prj/d.lst                        |    2 +
 sc/uiconfig/layout/delzip           |    1 +
 sc/uiconfig/layout/layout.mk        |   33 +++++++++++++++++++++
 sc/uiconfig/layout/makefile.mk      |   54 +++++++++++++++++++++++++++++++++++
 sc/uiconfig/layout/sort-options.xml |   40 ++++++++++++++++++++++++++
 5 files changed, 130 insertions(+), 0 deletions(-)
 create mode 100644 sc/uiconfig/layout/delzip
 create mode 100644 sc/uiconfig/layout/layout.mk
 create mode 100644 sc/uiconfig/layout/makefile.mk
 create mode 100644 sc/uiconfig/layout/sort-options.xml

diff --git a/sc/prj/d.lst b/sc/prj/d.lst
index 051e6c7..f9555f3 100644
--- a/sc/prj/d.lst
+++ b/sc/prj/d.lst
@@ -40,3 +40,5 @@ mkdir: %_DEST%\xml%_EXT%\uiconfig\modules\scalc\statusbar
 ..\uiconfig\scalc\accelerator\es\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\scalc\accelerator\es\*.xml
 ..\uiconfig\scalc\accelerator\fr\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\scalc\accelerator\fr\*.xml
 ..\uiconfig\scalc\statusbar\*.xml %_DEST%\xml%_EXT%\uiconfig\modules\scalc\statusbar\*.xml
+
+..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.*
diff --git a/sc/uiconfig/layout/delzip b/sc/uiconfig/layout/delzip
new file mode 100644
index 0000000..7b4d68d
--- /dev/null
+++ b/sc/uiconfig/layout/delzip
@@ -0,0 +1 @@
+empty
\ No newline at end of file
diff --git a/sc/uiconfig/layout/layout.mk b/sc/uiconfig/layout/layout.mk
new file mode 100644
index 0000000..88164bb
--- /dev/null
+++ b/sc/uiconfig/layout/layout.mk
@@ -0,0 +1,33 @@
+# TODO: move to solenv/inc
+# copies: sw/uiconfig/layout svx/uiconfig/layout
+
+TRALAY=tralay
+XML_DEST=$(DLLDEST)
+XML_LANGS=$(alllangiso)
+
+ALL_XMLS=$(foreach,i,$(XML_FILES) $(XML_DEST)/$i) $(foreach,i,$(XML_LANGS) $(foreach,j,$(XML_FILES) $(XML_DEST)/$i/$j))
+
+# Must remove the -j (no duplicate base file names) flag
+ZIPUPDATE=-u
+XML_ZIP = $(PRJNAME)-layout
+
+ALLTAR: $(XML_ZIP)
+
+$(XML_ZIP): $(ALL_XMLS)
+
+ZIP1DIR=$(XML_DEST)
+ZIP1TARGET=$(XML_ZIP)
+ZIP1LIST=$(ALL_XMLS:s@$(XML_DEST)/@@)
+
+$(foreach,i,$(XML_LANGS) $(XML_DEST)/$i/%.xml): %.xml
+	-$(MKDIR) $(@:d)
+	@echo $(foreach,i,$(XML_LANGS) $(XML_DEST)/$i/%.xml): %.xml
+	$(TRALAY) -m localize.sdf -o $(XML_DEST) -l $(XML_LANGS:f:t" -l ") $<
+
+$(XML_DEST)/%.xml: %.xml
+	-$(MKDIR) $(@:d)
+	$(COPY) $< $@
+
+# Don't want to overwrite filled localize.sdf with empty template
+template.sdf:
+	$(foreach,i,$(XML_FILES) $(TRALAY) -l en-US $i) > $@
diff --git a/sc/uiconfig/layout/makefile.mk b/sc/uiconfig/layout/makefile.mk
new file mode 100644
index 0000000..274d9a9
--- /dev/null
+++ b/sc/uiconfig/layout/makefile.mk
@@ -0,0 +1,54 @@
+#*************************************************************************
+#
+#   OpenOffice.org - a multi-platform office productivity suite
+#
+#   $RCSfile$
+#
+#   $Revision$
+#
+#   last change: $Author$ $Date$
+#
+#   The Contents of this file are made available subject to
+#   the terms of GNU Lesser General Public License Version 2.1.
+#
+#
+#     GNU Lesser General Public License Version 2.1
+#     =============================================
+#     Copyright 2005 by Sun Microsystems, Inc.
+#     901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+#     This library is free software; you can redistribute it and/or
+#     modify it under the terms of the GNU Lesser General Public
+#     License version 2.1, as published by the Free Software Foundation.
+#
+#     This library 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 for more details.
+#
+#     You should have received a copy of the GNU Lesser General Public
+#     License along with this library; if not, write to the Free Software
+#     Foundation, Inc., 51 Franklin Street, 5th Floor, Boston,
+#     MA  02110-1301  USA
+#
+#*************************************************************************
+
+PRJ=../..
+PRJNAME=sc
+TARGET=layout
+
+.INCLUDE : settings.mk
+
+.IF "$(ENABLE_LAYOUT)" == "TRUE"
+
+all: ALLTAR
+
+XML_FILES=sort-options.xml
+
+.INCLUDE : layout.mk
+
+.ELSE # ENABLE_LAYOUT != TRUE
+all .PHONY:
+.ENDIF # ENABLE_LAYOUT != TRUE
+
+.INCLUDE :  target.mk
diff --git a/sc/uiconfig/layout/sort-options.xml b/sc/uiconfig/layout/sort-options.xml
new file mode 100644
index 0000000..e2e01f0
--- /dev/null
+++ b/sc/uiconfig/layout/sort-options.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This is a template.  i18n translation is not performed in-place;
+     i18n translated XML files are generated from this template by
+     transex3/layout/tralay.  !-->
+
+<tabpage help-id="HID_SCPAGE_SORT_OPTIONS"
+	 id="RID_SCPAGE_SORT_OPTIONS"
+	 sv-look="true" xmlns="http://openoffice.org/2007/layout" xmlns:cnt="http://openoffice.org/2007/layout/container"
+	 optimumsize="true"
+         sizeable="true" moveable="true">
+    <vbox spacing="4" border="5">
+	<string id="STR_COL_LABEL" _text="Range contains column la~bels"/>
+	<string id="STR_ROW_LABEL" _text="Range contains ~row labels"/>
+	<string id="SCSTR_UNDEFINED" _text="- undefined -"/>
+	<vbox spacing="4" border="5">
+            <checkbox id="BTN_CASESENSITIVE" tabstop="true" _label="Case ~sensitive"/>
+            <checkbox id="BTN_LABEL" tabstop="true"/>
+            <checkbox id="BTN_FORMATS" tabstop="true" _label="Include ~formats"/>
+            <checkbox id="BTN_NATURALSORT" tabstop="true" _label="Enable ~natural sort"/>
+            <checkbox id="BTN_COPYRESULT" tabstop="true" _label="~Copy sort results to:"/>
+            <hbox>
+		<listbox has_border="true" dropdown="true" id="LB_OUTAREA" tabstop="true"/>
+		<edit has_border="true" disable="true" id="ED_OUTAREA" tabstop="true"/>
+            </hbox>
+            <checkbox id="BTN_SORT_USER" tabstop="true" _label="Custom sort ~order"/>
+            <listbox has_border="true" disable="true" dropdown="true" id="LB_SORT_USER" tabstop="true"/>
+            <hbox>
+		<fixedtext id="FT_LANGUAGE" _label="~Language"/>
+		<fixedtext id="FT_ALGORITHM" _label="O~ptions"/>
+            </hbox>
+            <hbox>
+		<listbox has_border="true" dropdown="true" id="LB_LANGUAGE" sort="true" tabstop="true" _string-item-list="Default"/>
+		<listbox has_border="true" dropdown="true" id="LB_ALGORITHM" tabstop="true"/>
+            </hbox>
+            <fixedline id="FL_DIRECTION" _text="Direction"/>
+            <radiobutton id="BTN_TOP_DOWN" tabstop="true" _label="~Top to bottom (sort rows)"/>
+            <radiobutton id="BTN_LEFT_RIGHT" tabstop="true" _label="L~eft to right (sort columns)"/>
+	</vbox>
+    </vbox>
+</tabpage>
-- 
1.5.6.3.317.g5d44c9.dirty


