summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmelia Wang <amwang@novell.com>2010-09-13 14:40:56 +0200
committerC├ędric Bosdonnat <cedricbosdo@openoffice.org>2010-09-13 15:55:59 +0200
commit19ab9349f211ca712aa2b6b777be55830b804340 (patch)
tree0462813b303c0147e35a30f8b298435d1eb5ef69
parent258524d43e52170947e94d2af5cd36ba02f31416 (diff)
cjk-character-units-ui.diff: add a new unit 'character unit'
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Writer.xcs12
-rw-r--r--sfx2/inc/sfx2/sfxsids.hrc1
-rwxr-xr-xsfx2/sdi/sfx.sdi27
-rw-r--r--svx/source/dialog/ruler.hrc3
-rw-r--r--svx/source/dialog/ruler.src12
-rw-r--r--svx/source/dialog/sdstring.src2
-rw-r--r--svx/source/dialog/svxruler.cxx11
7 files changed, 65 insertions, 3 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 4a3c2c02c3..7dc2ee58b1 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -1651,6 +1651,18 @@
</info>
<value>false</value>
</prop>
+ <!-- added for apply char unit 2006-12-1 -->
+ <prop oor:name="ApplyCharUnit" oor:type="xs:boolean">
+ <!-- OldPath: Writer/Layout -->
+ <!-- OldLocation: Soffice.cfg -->
+ <!-- UIHints: Tools - Options - Text document - Layout - [Section] Apply char unit -->
+ <info>
+ <author>OS</author>
+ <desc>apply char unit to calculate the paragraph's indent</desc>
+ <label>apply char unit</label>
+ </info>
+ <value>true</value>
+ </prop>
</group>
</group>
<group oor:name="Grid">
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index 457dbad41c..358e05ca2b 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -757,6 +757,7 @@
#define SID_ATTR_QUICKLAUNCHER (SID_OPTIONS_START + 74)
#define SID_ATTR_YEAR2000 (SID_OPTIONS_START + 87)
#define SID_ATTR_ALLOWFOLDERWEBVIEW (SID_OPTIONS_START + 92)
+#define SID_ATTR_APPLYCHARUNIT (SID_OPTIONS_START + 88)
// PathTabPage
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index df825c4ef1..15d6f7b607 100755
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3830,6 +3830,33 @@ SfxUInt16Item MetricUnit SID_ATTR_METRIC
]
//--------------------------------------------------------------------------
+SfxBoolItem ApplyCharUnit SID_ATTR_APPLYCHARUNIT
+
+[
+ /* flags: */
+ AutoUpdate = TRUE,
+ Cachable = Cachable,
+ FastCall = FALSE,
+ HasCoreId = FALSE,
+ HasDialog = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Synchron;
+
+ Readonly = FALSE,
+
+ /* config: */
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ StatusBarConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
SfxBoolItem Modified SID_MODIFIED
[
diff --git a/svx/source/dialog/ruler.hrc b/svx/source/dialog/ruler.hrc
index 8031270272..101130bbb7 100644
--- a/svx/source/dialog/ruler.hrc
+++ b/svx/source/dialog/ruler.hrc
@@ -34,4 +34,5 @@
#define ID_MILE 10
#define ID_POINT 6
#define ID_PICA 7
-
+#define ID_CHAR 11
+#define ID_LINE 12
diff --git a/svx/source/dialog/ruler.src b/svx/source/dialog/ruler.src
index 5937ab99fb..b30ca44b5e 100644
--- a/svx/source/dialog/ruler.src
+++ b/svx/source/dialog/ruler.src
@@ -87,6 +87,18 @@ Menu RID_SVXMN_RULER
Checkable = TRUE ;
Text [ en-US ] = "Pica" ;
};
+ MenuItem
+ {
+ Identifier = ID_CHAR ;
+ Checkable = TRUE ;
+ Text[ en-US ] = "Char" ;
+ };
+ MenuItem
+ {
+ Identifier = ID_LINE ;
+ Checkable = TRUE ;
+ Text[ en-US ] = "Line" ;
+ };
};
};
String RID_SVXSTR_RULER_TAB_LEFT
diff --git a/svx/source/dialog/sdstring.src b/svx/source/dialog/sdstring.src
index d862c1aa63..4a5be0d59a 100644
--- a/svx/source/dialog/sdstring.src
+++ b/svx/source/dialog/sdstring.src
@@ -1178,6 +1178,8 @@ StringArray RID_SVXSTR_FIELDUNIT_TABLE
< "Miles" ; FUNIT_MILE ; > ;
< "Pica" ; FUNIT_PICA ; > ;
< "Point" ; FUNIT_POINT ; > ;
+ < "Char" ; FUNIT_CHAR ; > ;
+ < "Line" ; FUNIT_LINE ; > ;
};
};
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index 7e8d41b71e..3e05ad55cc 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -3763,8 +3763,15 @@ void SvxRuler::Command( const CommandEvent& rCEvt )
(nId == FUNIT_M ||
nId == FUNIT_KM ||
nId == FUNIT_FOOT ||
- nId == FUNIT_MILE ))
- aMenu.RemoveItem(i - 1);
+ nId == FUNIT_MILE ||
+ nId == FUNIT_CHAR ||
+ nId == FUNIT_LINE ))
+ if (( nId == FUNIT_CHAR ) && bHorz )
+ ;
+ else if (( nId == FUNIT_LINE ) && !bHorz )
+ ;
+ else
+ aMenu.RemoveItem(i - 1);
}
aMenu.Execute( this, rCEvt.GetMousePosPixel() );
}