[Libreoffice-commits] core.git: 3 commits - cui/uiconfig offapi/com sw/qa writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Jan 9 03:21:39 PST 2014


 cui/uiconfig/ui/optviewpage.ui                 |   31 +++++++++++++------------
 offapi/com/sun/star/sheet/Shape.idl            |    2 -
 sw/qa/extras/rtfimport/rtfimport.cxx           |    7 +----
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |   12 +++++++++
 writerfilter/source/rtftok/rtflistener.hxx     |    1 
 5 files changed, 33 insertions(+), 20 deletions(-)

New commits:
commit 347d83d1cc87222719c50ebe9ed1c61944e8914e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jan 9 12:18:12 2014 +0100

    RTF import: handle RTF_ATNREF
    
    Otherwise dmapper won't create an annotation mark for us.
    
    Change-Id: I868c3ffd65fbaa9a5115ba7300310fa3585d2d05

diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index d184cd6..2534099 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1288,8 +1288,6 @@ DECLARE_RTFIMPORT_TEST(testFdo53556, "fdo53556.rtf")
 
 DECLARE_RTFIMPORT_TEST(testFdo63428, "hello.rtf")
 {
-#if 0
-    // FIXME port to AnnotationMarks
     // Pasting content that contained an annotation caused a crash.
     uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
     uno::Reference<text::XTextRange> xText(xTextDocument->getText(), uno::UNO_QUERY);
@@ -1297,9 +1295,8 @@ DECLARE_RTFIMPORT_TEST(testFdo63428, "hello.rtf")
     paste("fdo63428.rtf", xEnd);
 
     // Additionally, commented range was imported as a normal comment.
-    CPPUNIT_ASSERT_EQUAL(OUString("TextFieldStart"), getProperty<OUString>(getRun(getParagraph(1), 2), "TextPortionType"));
-    CPPUNIT_ASSERT_EQUAL(OUString("TextFieldEnd"), getProperty<OUString>(getRun(getParagraph(1), 4), "TextPortionType"));
-#endif
+    CPPUNIT_ASSERT_EQUAL(OUString("Annotation"), getProperty<OUString>(getRun(getParagraph(1), 2), "TextPortionType"));
+    CPPUNIT_ASSERT_EQUAL(OUString("AnnotationEnd"), getProperty<OUString>(getRun(getParagraph(1), 4), "TextPortionType"));
 }
 
 DECLARE_RTFIMPORT_TEST(testGroupshapeRotation, "groupshape-rotation.rtf")
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 30702f6..5db6915 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1095,6 +1095,7 @@ void RTFDocumentImpl::text(OUString& rString)
         case DESTINATION_OBJDATA:
         case DESTINATION_ANNOTATIONDATE:
         case DESTINATION_ANNOTATIONAUTHOR:
+        case DESTINATION_ANNOTATIONREFERENCE:
         case DESTINATION_FALT:
         case DESTINATION_PARAGRAPHNUMBERING_TEXTAFTER:
         case DESTINATION_PARAGRAPHNUMBERING_TEXTBEFORE:
@@ -1578,6 +1579,9 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
         case RTF_ATNAUTHOR:
             m_aStates.top().nDestinationState = DESTINATION_ANNOTATIONAUTHOR;
             break;
+        case RTF_ATNREF:
+            m_aStates.top().nDestinationState = DESTINATION_ANNOTATIONREFERENCE;
+            break;
         case RTF_FALT:
             m_aStates.top().nDestinationState = DESTINATION_FALT;
             break;
@@ -4247,6 +4251,14 @@ int RTFDocumentImpl::popState()
         case DESTINATION_ATNID:
             m_aAuthorInitials = m_aStates.top().aDestinationText.makeStringAndClear();
             break;
+        case DESTINATION_ANNOTATIONREFERENCE:
+            {
+                OUString aStr = m_aStates.top().aDestinationText.makeStringAndClear();
+                RTFSprms aAnnAttributes;
+                aAnnAttributes.set(NS_ooxml::LN_CT_Markup_id, RTFValue::Pointer_t(new RTFValue(aStr)));
+                Mapper().props(writerfilter::Reference<Properties>::Pointer_t(new RTFReferenceProperties(aAnnAttributes)));
+            }
+            break;
         case DESTINATION_FALT:
             {
                 OUString aStr(m_aStates.top().aDestinationText.makeStringAndClear());
diff --git a/writerfilter/source/rtftok/rtflistener.hxx b/writerfilter/source/rtftok/rtflistener.hxx
index 0e07187..2abfe01 100644
--- a/writerfilter/source/rtftok/rtflistener.hxx
+++ b/writerfilter/source/rtftok/rtflistener.hxx
@@ -78,6 +78,7 @@ namespace writerfilter {
             DESTINATION_RESULT,
             DESTINATION_ANNOTATIONDATE,
             DESTINATION_ANNOTATIONAUTHOR,
+            DESTINATION_ANNOTATIONREFERENCE,
             DESTINATION_FALT,
             DESTINATION_FLYMAINCONTENT,
             DESTINATION_DRAWINGOBJECT,
commit 6cb6370711f1072e3266d9218f7e42534e8ed58c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 9 11:20:25 2014 +0000

    specify which elements can shrink
    
    in options view if there isn't enough space to show everything (fr)
    
    Change-Id: I01e97d7eb65c01e169440ac817fa55425a85327c

diff --git a/cui/uiconfig/ui/optviewpage.ui b/cui/uiconfig/ui/optviewpage.ui
index b986e5e..31b8ecd 100644
--- a/cui/uiconfig/ui/optviewpage.ui
+++ b/cui/uiconfig/ui/optviewpage.ui
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.0 on Thu Jan  9 11:17:49 2014 -->
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkAdjustment" id="adjustment1">
@@ -27,7 +28,6 @@
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="spacing">12</property>
-    <property name="homogeneous">True</property>
     <child>
       <object class="GtkBox" id="box3">
         <property name="visible">True</property>
@@ -79,7 +79,6 @@
                             <property name="can_focus">True</property>
                             <property name="halign">start</property>
                             <property name="invisible_char">•</property>
-                            <property name="invisible_char_set">True</property>
                             <property name="adjustment">adjustment1</property>
                           </object>
                           <packing>
@@ -109,8 +108,6 @@
                           <object class="GtkComboBoxText" id="iconsize">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="entry_text_column">0</property>
-                            <property name="id_column">1</property>
                             <items>
                               <item translatable="yes">Automatic</item>
                               <item translatable="yes">Small</item>
@@ -128,8 +125,6 @@
                           <object class="GtkComboBoxText" id="iconstyle">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="entry_text_column">0</property>
-                            <property name="id_column">1</property>
                             <items>
                               <item translatable="yes">Automatic</item>
                               <item translatable="yes">Galaxy</item>
@@ -219,7 +214,6 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="invisible_char">•</property>
-                            <property name="invisible_char_set">True</property>
                             <property name="adjustment">adjustment2</property>
                           </object>
                           <packing>
@@ -294,8 +288,6 @@
                       <object class="GtkComboBoxText" id="menuicons">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="entry_text_column">0</property>
-                        <property name="id_column">1</property>
                         <items>
                           <item translatable="yes">Automatic</item>
                           <item translatable="yes">Hide</item>
@@ -413,6 +405,8 @@
       <object class="GtkBox" id="box4">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
+        <property name="halign">center</property>
+        <property name="hexpand">True</property>
         <property name="orientation">vertical</property>
         <property name="spacing">18</property>
         <child>
@@ -491,18 +485,21 @@
           <object class="GtkFrame" id="frame4">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
             <property name="label_xalign">0</property>
             <property name="shadow_type">none</property>
             <child>
               <object class="GtkAlignment" id="alignment4">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
                 <property name="top_padding">6</property>
                 <property name="left_padding">12</property>
                 <child>
                   <object class="GtkGrid" id="grid7">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
                     <property name="row_spacing">6</property>
                     <child>
                       <object class="GtkLabel" id="label11">
@@ -540,8 +537,8 @@
                       <object class="GtkComboBoxText" id="mousepos">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="entry_text_column">0</property>
-                        <property name="id_column">1</property>
+                        <property name="halign">start</property>
+                        <property name="hexpand">True</property>
                         <items>
                           <item translatable="yes">Default button</item>
                           <item translatable="yes">Dialog center</item>
@@ -559,8 +556,8 @@
                       <object class="GtkComboBoxText" id="mousemiddle">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="entry_text_column">0</property>
-                        <property name="id_column">1</property>
+                        <property name="halign">start</property>
+                        <property name="hexpand">True</property>
                         <items>
                           <item translatable="yes">No function</item>
                           <item translatable="yes">Automatic scrolling</item>
@@ -634,7 +631,6 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="invisible_char">•</property>
-                        <property name="invisible_char_set">True</property>
                         <property name="adjustment">adjustment3</property>
                       </object>
                       <packing>
@@ -673,4 +669,11 @@
       </packing>
     </child>
   </object>
+  <object class="GtkSizeGroup" id="sizegroup1">
+    <property name="ignore_hidden">True</property>
+    <widgets>
+      <widget name="mousepos"/>
+      <widget name="mousemiddle"/>
+    </widgets>
+  </object>
 </interface>
commit e0c789b13e858678a90d6b53c299e2c24e6c5d39
Author: Tsutomu Uchino <hanya at apache.org>
Date:   Thu Jan 9 08:30:57 2014 +0000

    Resolves: #i124001# remove readonly flag from Anchor property
    
    (cherry picked from commit bbb0f24a32bada4224f913611db0a10a2ee1f303)
    
    Conflicts:
    	offapi/com/sun/star/sheet/Shape.idl
    
    Change-Id: I1781858d46f655fdf39833247298c3f1375dc6a2

diff --git a/offapi/com/sun/star/sheet/Shape.idl b/offapi/com/sun/star/sheet/Shape.idl
index 0922a05..d23a004 100644
--- a/offapi/com/sun/star/sheet/Shape.idl
+++ b/offapi/com/sun/star/sheet/Shape.idl
@@ -34,7 +34,7 @@ service Shape
     /** contains the object where this shape is anchored on.
         <p> Possible objects are XSpreadsheet and XCell.</p>
     */
-    [readonly, property] com::sun::star::uno::XInterface Anchor;
+    [property] com::sun::star::uno::XInterface Anchor;
     /** contains the horizontal position of the object (1/100 mm).
         <p> The position is relative to the anchor object.</p>
         <p> If the underlying table layout direction is left to right


More information about the Libreoffice-commits mailing list