[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - 5 commits - cui/source cui/uiconfig cui/UIConfig_cui.mk include/sax oox/source sax/source sc/source sw/qa ucb/source

Kohei Yoshida kohei.yoshida at gmail.com
Mon Jul 15 10:31:12 PDT 2013


Rebased ref, commits from common ancestor:
commit 0e65ac4ff185aaa21da2aaf785b914866037c8c8
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Mon Jul 15 11:30:40 2013 -0400

    Example code on how to handle input and output for matrix inversion.
    
    Right now this code simply puts the original matrix values back. Re-write
    this code to perform inversion for real.
    
    Change-Id: I0330db77b000ed14cc810cc3ddf616e56d036c1b

diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index dee465e..c24f13a 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -57,9 +57,43 @@ public:
                            const ScFormulaCellGroupRef& xGroup, ScTokenArray& rCode);
 };
 
-ScMatrixRef FormulaGroupInterpreterOpenCL::inverseMatrix(const ScMatrix& /* rMat */)
+ScMatrixRef FormulaGroupInterpreterOpenCL::inverseMatrix(const ScMatrix& rMat)
 {
-    return ScMatrixRef();
+    SCSIZE nC, nR;
+    rMat.GetDimensions(nC, nR);
+    if (nC != nR || nC == 0)
+        // Input matrix must be square. Return an empty matrix on failure and
+        // the caller will calculate it via CPU.
+        return ScMatrixRef();
+
+    // This vector will contain a series of doubles from the first column to
+    // the last, chained together in a single array.
+    std::vector<double> aDoubles;
+    rMat.GetDoubleArray(aDoubles);
+
+    // TODO: Inverse this matrix and put the result back into xInv. Right now,
+    // I'll just put the original, non-inversed matrix values back, just to
+    // demonstrate how to put the values back after inversion.  There are two
+    // ways to put the values back (depending on what the GPU output is).
+    ScMatrixRef xInv(new ScMatrix(nR, nR, 0.0));
+
+#if 0
+    // One way is to put the whole value as one array. This method assumes
+    // that the array size equals column x row, and is oriented column-wise.
+    // This method is slightly more efficient than the second, but I wouldn't
+    // expect too much of a difference.
+    xInv->PutDouble(&aDoubles[0], aDoubles.size(), 0, 0);
+#else
+    // Another way is to put the values one column at a time.
+    const double* p = &aDoubles[0];
+    for (SCSIZE i = 0; i < nC; ++i)
+    {
+        xInv->PutDouble(p, nR, i, 0);
+        p += nR;
+    }
+#endif
+
+    return xInv;
 }
 
 bool FormulaGroupInterpreterOpenCL::interpret(ScDocument& rDoc, const ScAddress& rTopPos,
commit 766458eafb855a44b1c4c9a5342bbb3748b7ef23
Author: Csikós Tamás <csks.tomi at gmail.com>
Date:   Mon Jul 15 14:16:42 2013 +0200

    modern .ui widgetlayout for optdict/newdictdlg
    
    Change-Id: I8bd0a334bffee9adcf23fe2f597b66924b57ce30
    Reviewed-on: https://gerrit.libreoffice.org/4917
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 5f51232..0908fef 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -55,6 +55,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
 	cui/uiconfig/ui/optjsearchpage \
 	cui/uiconfig/ui/optlanguagespage \
 	cui/uiconfig/ui/optmemorypage \
+	cui/uiconfig/ui/optnewdictionarydialog \
 	cui/uiconfig/ui/optonlineupdatepage \
 	cui/uiconfig/ui/optpathspage \
 	cui/uiconfig/ui/optproxypage \
diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx
index 2251a2b..246b091 100644
--- a/cui/source/inc/optdict.hxx
+++ b/cui/source/inc/optdict.hxx
@@ -50,15 +50,12 @@ namespace linguistic2{
 class SvxNewDictionaryDialog : public ModalDialog
 {
 private:
-    FixedLine            aNewDictBox;
-    FixedText           aNameText;
-    Edit                aNameEdit;
-    FixedText           aLanguageText;
-    SvxLanguageBox      aLanguageLB;
-    CheckBox            aExceptBtn;
-    OKButton            aOKBtn;
-    CancelButton        aCancelBtn;
-    HelpButton          aHelpBtn;
+    Edit*                pNameEdit;
+    SvxLanguageBox*      pLanguageLB;
+    CheckBox*            pExceptBtn;
+    OKButton*            pOKBtn;
+    CancelButton*        pCancelBtn;
+    HelpButton*          pHelpBtn;
     ::com::sun::star::uno::Reference<
         ::com::sun::star::linguistic2::XSpellChecker1 >     xSpell;
     ::com::sun::star::uno::Reference<
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 36af1fb..020cb17 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -82,41 +82,29 @@ static CDE_RESULT cmpDicEntry_Impl( const String &rText1, const String &rText2 )
 SvxNewDictionaryDialog::SvxNewDictionaryDialog( Window* pParent,
         Reference< XSpellChecker1 >  &xSpl ) :
 
-    ModalDialog( pParent, CUI_RES( RID_SFXDLG_NEWDICT ) ),
-
-    aNewDictBox     ( this, CUI_RES( GB_NEWDICT ) ),
-    aNameText       ( this, CUI_RES( FT_DICTNAME ) ),
-    aNameEdit       ( this, CUI_RES( ED_DICTNAME ) ),
-    aLanguageText   ( this, CUI_RES( FT_DICTLANG ) ),
-    aLanguageLB     ( this, CUI_RES( LB_DICTLANG ) ),
-    aExceptBtn      ( this, CUI_RES( BTN_EXCEPT ) ),
-    aOKBtn          ( this, CUI_RES( BTN_NEWDICT_OK ) ),
-    aCancelBtn      ( this, CUI_RES( BTN_NEWDICT_ESC ) ),
-    aHelpBtn        ( this, CUI_RES( BTN_NEWDICT_HLP ) ),
+    ModalDialog( pParent, "OptNewDictionaryDialog" , "cui/ui/optnewdictionarydialog.ui" ),
+
     xSpell( xSpl )
 {
+    get(pNameEdit,"nameedit");
+    get(pLanguageLB,"language");
+    get(pExceptBtn,"except");
+    get(pOKBtn,"ok");
     // install handler
-    aNameEdit.SetModifyHdl(
+    pNameEdit->SetModifyHdl(
         LINK( this, SvxNewDictionaryDialog, ModifyHdl_Impl ) );
-    aOKBtn.SetClickHdl( LINK( this, SvxNewDictionaryDialog, OKHdl_Impl ) );
+    pOKBtn->SetClickHdl( LINK( this, SvxNewDictionaryDialog, OKHdl_Impl ) );
 
     // display languages
-    aLanguageLB.SetLanguageList( LANG_LIST_ALL, sal_True, sal_True );
-    aLanguageLB.SelectEntryPos(0);
-
-    aNameText.SetAccessibleRelationMemberOf( &aNewDictBox );
-    aNameEdit.SetAccessibleRelationMemberOf( &aNewDictBox );
-    aLanguageText.SetAccessibleRelationMemberOf( &aNewDictBox );
-    aLanguageLB.SetAccessibleRelationMemberOf( &aNewDictBox );
-
-    FreeResource();
+    pLanguageLB->SetLanguageList( LANG_LIST_ALL, sal_True, sal_True );
+    pLanguageLB->SelectEntryPos(0);
 }
 
 // -----------------------------------------------------------------------
 
 IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl)
 {
-    OUString sDict = comphelper::string::stripEnd(aNameEdit.GetText(), ' ');
+    OUString sDict = comphelper::string::stripEnd(pNameEdit->GetText(), ' ');
     // add extension for personal dictionaries
     sDict += ".dic";
 
@@ -138,16 +126,16 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl)
     {
         // duplicate names?
         InfoBox( this, CUI_RESSTR( RID_SVXSTR_OPT_DOUBLE_DICTS ) ).Execute();
-        aNameEdit.GrabFocus();
+        pNameEdit->GrabFocus();
         return 0;
     }
 
     // create and add
-    sal_uInt16 nLang = aLanguageLB.GetSelectLanguage();
+    sal_uInt16 nLang = pLanguageLB->GetSelectLanguage();
     try
     {
         // create new dictionary
-        DictionaryType eType = aExceptBtn.IsChecked() ?
+        DictionaryType eType = pExceptBtn->IsChecked() ?
                 DictionaryType_NEGATIVE : DictionaryType_POSITIVE;
         if (xDicList.is())
         {
@@ -192,10 +180,10 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl)
 
 IMPL_LINK_NOARG_INLINE_START(SvxNewDictionaryDialog, ModifyHdl_Impl)
 {
-    if ( !aNameEdit.GetText().isEmpty() )
-        aOKBtn.Enable();
+    if ( !pNameEdit->GetText().isEmpty() )
+        pOKBtn->Enable();
     else
-        aOKBtn.Disable();
+        pOKBtn->Disable();
     return 0;
 }
 IMPL_LINK_NOARG_INLINE_END(SvxNewDictionaryDialog, ModifyHdl_Impl)
diff --git a/cui/source/options/optdict.hrc b/cui/source/options/optdict.hrc
index 4ba73e4..c9bdade 100644
--- a/cui/source/options/optdict.hrc
+++ b/cui/source/options/optdict.hrc
@@ -21,16 +21,8 @@
 
 // defines ------------------------------------------------------------------
 
-#define FT_DICTNAME     10
-#define ED_DICTNAME     11
 #define FT_DICTLANG     12
 #define LB_DICTLANG     13
-#define BTN_EXCEPT      14
-#define GB_NEWDICT      15
-
-#define BTN_NEWDICT_OK  20
-#define BTN_NEWDICT_ESC 21
-#define BTN_NEWDICT_HLP 22
 
 #define FT_BOOK             30
 #define FT_CONTENT          31
diff --git a/cui/source/options/optdict.src b/cui/source/options/optdict.src
index 7bea61a..f8bb852f 100644
--- a/cui/source/options/optdict.src
+++ b/cui/source/options/optdict.src
@@ -22,77 +22,6 @@
 #include <cuires.hrc>
 #include "optdict.hrc"
 
- // RID_SFXDLG_NEWDICT ----------------------------------------------------
-ModalDialog RID_SFXDLG_NEWDICT
-{
-    HelpId = HID_OPTIONS_DICT_NEW ;
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( 213 , 66 ) ;
-    Moveable = TRUE ;
-    Text [ en-US ] = "New Dictionary" ;
-    FixedText FT_DICTNAME
-    {
-        Pos = MAP_APPFONT ( 11 , 15 ) ;
-        Size = MAP_APPFONT ( 40 , 10 ) ;
-        Text [ en-US ] = "~Name" ;
-        LeftLabel = TRUE ;
-    };
-    Edit ED_DICTNAME
-    {
-        HelpID = "cui:Edit:RID_SFXDLG_NEWDICT:ED_DICTNAME";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 55 , 14 ) ;
-        Size = MAP_APPFONT ( 90 , 12 ) ;
-        MaxTextLength = 32 ;
-    };
-    FixedText FT_DICTLANG
-    {
-        Pos = MAP_APPFONT ( 12 , 30 ) ;
-        Size = MAP_APPFONT ( 40 , 10 ) ;
-        Text [ en-US ] = "~Language" ;
-        LeftLabel = TRUE ;
-    };
-    ListBox LB_DICTLANG
-    {
-        HelpID = "cui:ListBox:RID_SFXDLG_NEWDICT:LB_DICTLANG";
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 55 , 30 ) ;
-        Size = MAP_APPFONT ( 90 , 66 ) ;
-        DropDown = TRUE ;
-    };
-    CheckBox BTN_EXCEPT
-    {
-        HelpID = "cui:CheckBox:RID_SFXDLG_NEWDICT:BTN_EXCEPT";
-        Pos = MAP_APPFONT ( 12 , 44 ) ;
-        Size = MAP_APPFONT ( 57 , 10 ) ;
-        Text [ en-US ] = "~Exception (-)" ;
-    };
-    FixedLine GB_NEWDICT
-    {
-        Pos = MAP_APPFONT ( 6 , 3 ) ;
-        Size = MAP_APPFONT ( 145 , 8 ) ;
-        Text [ en-US ] = "Dictionary" ;
-    };
-    OKButton BTN_NEWDICT_OK
-    {
-        Pos = MAP_APPFONT ( 157 , 6 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-        Disable = TRUE ;
-        DefButton = TRUE ;
-    };
-    CancelButton BTN_NEWDICT_ESC
-    {
-        Pos = MAP_APPFONT ( 157 , 23 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-    HelpButton BTN_NEWDICT_HLP
-    {
-        Pos = MAP_APPFONT ( 157 , 43 ) ;
-        Size = MAP_APPFONT ( 50 , 14 ) ;
-    };
-};
-
  // RID_SFXDLG_EDITDICT ---------------------------------------------------
 ModalDialog RID_SFXDLG_EDITDICT
 {
diff --git a/cui/uiconfig/ui/optnewdictionarydialog.ui b/cui/uiconfig/ui/optnewdictionarydialog.ui
new file mode 100644
index 0000000..7649acf
--- /dev/null
+++ b/cui/uiconfig/ui/optnewdictionarydialog.ui
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkDialog" id="OptNewDictionaryDialog">
+    <property name="can_focus">False</property>
+    <property name="border_width">6</property>
+    <property name="title" translatable="yes">New Dictionary</property>
+    <property name="type_hint">dialog</property>
+    <child internal-child="vbox">
+      <object class="GtkBox" id="dialog-vbox1">
+        <property name="can_focus">False</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">12</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox" id="dialog-action_area1">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="ok">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="cancel">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="help">
+                <property name="label">gtk-help</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">2</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
+            <child>
+              <object class="GtkAlignment" id="alignment1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="top_padding">6</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkGrid" id="grid1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="row_spacing">6</property>
+                    <property name="column_spacing">12</property>
+                    <child>
+                      <object class="GtkEntry" id="nameedit">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="invisible_char">●</property>
+                        <property name="invisible_char_set">True</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="svxcorelo-SvxLanguageBox" id="language">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">1</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="name_label">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">_Name:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">nameedit</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="language_label">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">0</property>
+                        <property name="label" translatable="yes">_Language:</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">language</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">1</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="except">
+                        <property name="label" translatable="yes">_Exception (-)</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="hexpand">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="xalign">0</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">2</property>
+                        <property name="width">2</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="label" translatable="yes">Dictionary</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">ok</action-widget>
+      <action-widget response="0">cancel</action-widget>
+      <action-widget response="0">help</action-widget>
+    </action-widgets>
+  </object>
+</interface>
commit 5ff4ccc6c49b0d69a3a9f80f9abdc65fe60f8aec
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jul 15 18:09:07 2013 +0200

    ucb: fix DateTime in gvfs
    
    Change-Id: I5733e1490f3f162045fa5040efaabb6550d235a7

diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx
index 5645cd6..61443d9 100644
--- a/ucb/source/ucp/gvfs/gvfs_content.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_content.cxx
@@ -559,7 +559,7 @@ getDateFromUnix (time_t t)
 
     if ( osl_getDateTimeFromTimeValue( &tv, &dt ) )
         return util::DateTime( 0, dt.Seconds, dt.Minutes, dt.Hours,
-                               dt.Day, dt.Month, dt.Year);
+                               dt.Day, dt.Month, dt.Year, false);
     else
         return util::DateTime();
 }
commit 4ce40c0b06888cff6bc593669d0fb94139485620
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jul 15 17:56:56 2013 +0200

    sax: more s/TimeZone/Timezone/
    
    Change-Id: I9b50e53b131fc835e792c52de6560d77ac454be9

diff --git a/include/sax/tools/converter.hxx b/include/sax/tools/converter.hxx
index 1e89d2c..7d253f3 100644
--- a/include/sax/tools/converter.hxx
+++ b/include/sax/tools/converter.hxx
@@ -38,8 +38,8 @@ namespace com { namespace sun { namespace star {
     namespace util {
         struct Date;
         struct DateTime;
-        struct DateWithTimeZone;
-        struct DateTimeWithTimeZone;
+        struct DateWithTimezone;
+        struct DateTimeWithTimezone;
         struct Duration;
     }
 } } }
@@ -167,10 +167,10 @@ public:
                                    bool bAddTimeIf0AM = false );
 
     static void convertDateTZ( OUStringBuffer& rBuffer,
-                    com::sun::star::util::DateWithTimeZone const& rDate );
+                    com::sun::star::util::DateWithTimezone const& rDate );
 
     static void convertDateTimeTZ( OUStringBuffer& rBuffer,
-                com::sun::star::util::DateTimeWithTimeZone const& rDateTime );
+                com::sun::star::util::DateTimeWithTimezone const& rDateTime );
 
     /** convert ISO "date" or "dateTime" string to util::DateTime */
     static bool parseDateTime( com::sun::star::util::DateTime& rDateTime,
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 911de8a..3954f97 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -22,8 +22,8 @@
 #include <com/sun/star/i18n/UnicodeType.hpp>
 #include <com/sun/star/util/DateTime.hpp>
 #include <com/sun/star/util/Date.hpp>
-#include <com/sun/star/util/DateTimeWithTimeZone.hpp>
-#include <com/sun/star/util/DateWithTimeZone.hpp>
+#include <com/sun/star/util/DateTimeWithTimezone.hpp>
+#include <com/sun/star/util/DateWithTimezone.hpp>
 #include <com/sun/star/util/Duration.hpp>
 #include <com/sun/star/util/Time.hpp>
 #include <com/sun/star/uno/Sequence.hxx>
@@ -1224,13 +1224,13 @@ lcl_AppendTimezone(OUStringBuffer & i_rBuffer, sal_Int16 const nOffset)
 }
 
 void Converter::convertDateTZ( OUStringBuffer& rBuffer,
-                com::sun::star::util::DateWithTimeZone const& rDate)
+                com::sun::star::util::DateWithTimezone const& rDate)
 {
     convertDate(rBuffer, rDate.DateInTZ, &rDate.Timezone);
 }
 
 void Converter::convertDateTimeTZ( OUStringBuffer& rBuffer,
-            com::sun::star::util::DateTimeWithTimeZone const& rDateTime)
+            com::sun::star::util::DateTimeWithTimezone const& rDateTime)
 {
     convertDateTime(rBuffer, rDateTime.DateTimeInTZ, &rDateTime.Timezone);
 }
commit ba8988a59716acc405ce5e5233e3f472e0066cbc
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Jul 15 17:41:36 2013 +0200

    explicitly export no fill to .docx when fillstyle is set to none (bnc#581614)
    
    The shapes have detectmouseclick="t" for some reason, leading to the v:fill
    tag being written, but the default is solid fill, so if there's otherwise
    actually no fill, explicitly say so.
    
    Change-Id: I2a8d24ce4d0da1082b4eefbad0db51e2e6fe1bc9

diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 5381d2f..5635158 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -545,6 +545,8 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
                         if ( pFillType )
                             pAttrList->add( XML_type, pFillType );
                     }
+                    else
+                        pAttrList->add( XML_on, "false" );
 
                     if ( rProps.GetOpt( ESCHER_Prop_fillColor, nValue ) )
                         impl_AddColor( m_pShapeAttrList, XML_fillcolor, nValue );
diff --git a/sw/qa/extras/ooxmlexport/data/bnc581614.doc b/sw/qa/extras/ooxmlexport/data/bnc581614.doc
new file mode 100644
index 0000000..f56525e
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/bnc581614.doc differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 9535083..ff5dc8f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -94,6 +94,7 @@ public:
     void testFdo66688();
     void testFdo66773();
     void testFdo58577();
+    void testBnc581614();
 
     CPPUNIT_TEST_SUITE(Test);
 #if !defined(MACOSX) && !defined(WNT)
@@ -158,6 +159,7 @@ void Test::run()
         {"fdo66688.docx", &Test::testFdo66688},
         {"fdo66773.docx", &Test::testFdo66773},
         {"fdo58577.odt", &Test::testFdo58577},
+        {"bnc581614.doc", &Test::testBnc581614},
     };
     // Don't test the first import of these, for some reason those tests fail
     const char* aBlacklist[] = {
@@ -943,6 +945,14 @@ void Test::testFdo58577()
     CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
 }
 
+void Test::testBnc581614()
+{
+    uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+    uno::Reference<container::XIndexAccess> xDraws(xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY);
+    uno::Reference<beans::XPropertySet> xFrame(xDraws->getByIndex(0), uno::UNO_QUERY);
+    CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xFrame, "FillStyle"));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 CPPUNIT_PLUGIN_IMPLEMENT();


More information about the Libreoffice-commits mailing list