[ooo-build-commit] .: 3 commits - officecfg/registry sfx2/inc sfx2/sdi svx/inc svx/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Mon Sep 13 07:53:38 PDT 2010


 officecfg/registry/schema/org/openoffice/Office/Writer.xcs |   12 ++++
 sfx2/inc/sfx2/sfxsids.hrc                                  |    1 
 sfx2/sdi/sfx.sdi                                           |   27 ++++++++++
 svx/inc/dlgutil.hxx                                        |    1 
 svx/source/dialog/dlgutil.cxx                              |   33 +++++++++++++
 svx/source/dialog/ruler.hrc                                |    3 -
 svx/source/dialog/ruler.src                                |   12 ++++
 svx/source/dialog/sdstring.src                             |    2 
 svx/source/dialog/svxruler.cxx                             |   11 +++-
 9 files changed, 99 insertions(+), 3 deletions(-)

New commits:
commit 26a938fd832bdb7f758e352f1e47e8496771de18
Author: Amelia Wang <amwang at novell.com>
Date:   Mon Sep 13 14:43:45 2010 +0200

    cjk-character-units-fix.diff: add a new unit 'character unit'
    
    i#356101

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 7dc2ee5..9abada4 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -1588,6 +1588,18 @@
 					</info>
 					<value>true</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 oor:name="Zoom">
 				<info>
@@ -1651,18 +1663,6 @@
 					</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">
commit 19ab9349f211ca712aa2b6b777be55830b804340
Author: Amelia Wang <amwang at novell.com>
Date:   Mon Sep 13 14:40:56 2010 +0200

    cjk-character-units-ui.diff: add a new unit 'character unit'

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 4a3c2c0..7dc2ee5 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 457dbad..358e05c 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 df825c4..15d6f7b 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 8031270..101130b 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 5937ab9..b30ca44 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 d862c1a..4a5be0d 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 7e8d41b..3e05ad5 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() );
         }
commit 258524d43e52170947e94d2af5cd36ba02f31416
Author: Amelia Wang <amwang at novell.com>
Date:   Mon Sep 13 14:37:50 2010 +0200

    cjk-character-units-imp.diff: add a new unit 'character unit'

diff --git a/svx/inc/dlgutil.hxx b/svx/inc/dlgutil.hxx
index 861203c..3e4f736 100644
--- a/svx/inc/dlgutil.hxx
+++ b/svx/inc/dlgutil.hxx
@@ -39,6 +39,7 @@
 class SfxItemSet;
 
 SVX_DLLPUBLIC FieldUnit GetModuleFieldUnit( const SfxItemSet& );
+SVX_DLLPUBLIC BOOL GetApplyCharUnit( const SfxItemSet& );
 
 #define OUTPUT_DRAWMODE_COLOR		(DRAWMODE_DEFAULT)
 #define OUTPUT_DRAWMODE_CONTRAST	(DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT)
diff --git a/svx/source/dialog/dlgutil.cxx b/svx/source/dialog/dlgutil.cxx
index 5fa005d..884b49e 100644
--- a/svx/source/dialog/dlgutil.cxx
+++ b/svx/source/dialog/dlgutil.cxx
@@ -35,6 +35,9 @@
 #include <sfx2/sfxsids.hrc>
 #include <sfx2/module.hxx>
 #include <svl/intitem.hxx>
+#include <svl/eitem.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/objsh.hxx>
 
 // -----------------------------------------------------------------------
 
@@ -53,3 +56,33 @@ FieldUnit GetModuleFieldUnit( const SfxItemSet& rSet )
     return eUnit;
 }
 
+BOOL GetApplyCharUnit( const SfxItemSet& rSet )
+{
+    BOOL  bUseCharUnit = FALSE;
+    const SfxPoolItem* pItem = NULL;
+    if ( SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_APPLYCHARUNIT, FALSE, &pItem ) )
+        bUseCharUnit = (BOOL)( (const SfxBoolItem*)pItem )->GetValue();
+    else
+    {
+        // FIXME - this might be wrong, cf. the DEV300 changes in GetModuleFieldUnit()
+        SfxViewFrame* pFrame = SfxViewFrame::Current();
+        SfxObjectShell* pSh = NULL;
+        if ( pFrame )
+            pSh = pFrame->GetObjectShell();
+        if ( pSh )  // #93209# the object shell is not always available during reload
+        {
+            SfxModule* pModule = pSh->GetModule();
+            if ( pModule )
+            {
+                pItem = pModule->GetItem( SID_ATTR_APPLYCHARUNIT );
+                if ( pItem )
+                    bUseCharUnit = (BOOL)( (SfxBoolItem*)pItem )->GetValue();
+            }
+            else
+            {
+                DBG_ERRORFILE( "GetApplyCharUnit(): no module found" );
+            }
+        }
+    }
+    return bUseCharUnit;
+}


More information about the ooo-build-commit mailing list