[Libreoffice-commits] core.git: 2 commits - desktop/source desktop/uiconfig desktop/UIConfig_deployment.mk sw/qa sw/source
Caolán McNamara
caolanm at redhat.com
Fri Dec 6 01:38:40 PST 2013
desktop/UIConfig_deployment.mk | 1
desktop/source/deployment/gui/dp_gui.hrc | 1
desktop/source/deployment/gui/dp_gui_dialog.src | 31 ----------
desktop/source/deployment/gui/dp_gui_dialog2.cxx | 40 ++-----------
desktop/source/deployment/gui/dp_gui_dialog2.hxx | 10 ---
desktop/uiconfig/ui/showlicensedialog.ui | 70 +++++++++++++++++++++++
sw/qa/extras/ooxmlexport/data/2_table_doc.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 12 +++
sw/source/filter/ww8/docxattributeoutput.cxx | 4 -
9 files changed, 97 insertions(+), 72 deletions(-)
New commits:
commit e661d295c2643d6706a9b2040051445591880c46
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Dec 6 09:22:35 2013 +0000
convert show extension licence dialog to .ui
Change-Id: I0e34a0ddaee1485184b55788d618288f4e3f69cb
diff --git a/desktop/UIConfig_deployment.mk b/desktop/UIConfig_deployment.mk
index f23136b..cced131 100644
--- a/desktop/UIConfig_deployment.mk
+++ b/desktop/UIConfig_deployment.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_UIConfig_UIConfig,desktop))
$(eval $(call gb_UIConfig_add_uifiles,desktop,\
desktop/uiconfig/ui/cmdlinehelp \
desktop/uiconfig/ui/extensionmanager \
+ desktop/uiconfig/ui/showlicensedialog \
))
# vim: set noet sw=4 ts=4:
diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc
index 9916c69..0238b24 100644
--- a/desktop/source/deployment/gui/dp_gui.hrc
+++ b/desktop/source/deployment/gui/dp_gui.hrc
@@ -153,7 +153,6 @@
#define RID_WARNINGBOX_REMOVE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START+104)
#define RID_WARNINGBOX_ENABLE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START+105)
#define RID_WARNINGBOX_DISABLE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START+106)
-#define RID_DLG_SHOW_LICENSE (RID_DEPLOYMENT_GUI_START+107)
#define RID_DLG_LICENSE RID_DEPLOYMENT_LICENSE_START
diff --git a/desktop/source/deployment/gui/dp_gui_dialog.src b/desktop/source/deployment/gui/dp_gui_dialog.src
index 4d523f7..7669d8b 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog.src
+++ b/desktop/source/deployment/gui/dp_gui_dialog.src
@@ -295,37 +295,6 @@ ModalDialog RID_DLG_LICENSE
};
-ModalDialog RID_DLG_SHOW_LICENSE
-{
- Text [ en-US ] = "Extension Software License Agreement";
- Size = MAP_APPFONT( 300, 200 );
- OutputSize = TRUE;
- SVLook = TRUE;
- Moveable = TRUE;
- Closeable = TRUE;
- Sizeable = TRUE;
-
- MultiLineEdit ML_LICENSE
- {
- Pos = MAP_APPFONT( 5, 5 );
- Size = MAP_APPFONT( 300 - 10, 200 - 15 - RSC_CD_PUSHBUTTON_HEIGHT );
- Border = TRUE;
- VScroll = TRUE;
- ReadOnly = TRUE;
- };
-
- OKButton RID_EM_BTN_CLOSE
- {
- TabStop = TRUE;
- DefButton = TRUE;
- Text [ en-US ] = "Close";
- Pos = MAP_APPFONT( (300-RSC_CD_PUSHBUTTON_WIDTH)/2, 200 - 5 - RSC_CD_PUSHBUTTON_HEIGHT );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- };
-};
-
-
-
WarningBox RID_WARNINGBOX_INSTALL_EXTENSION {
Buttons = WB_OK_CANCEL;
DefButton = WB_DEF_OK;
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 6a90a98..16250ca 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -167,7 +167,7 @@ ExtBoxWithBtns_Impl::ExtBoxWithBtns_Impl(Window* pParent)
Size ExtBoxWithBtns_Impl::GetOptimalSize() const
{
- return LogicToPixel(Size(250, 150), MapMode(MAP_APPFONT));
+ return LogicToPixel(Size(250, 150), MAP_APPFONT);
}
//------------------------------------------------------------------------------
@@ -1704,36 +1704,14 @@ void UpdateRequiredDialog::disableAllEntries()
// ShowLicenseDialog
//------------------------------------------------------------------------------
ShowLicenseDialog::ShowLicenseDialog( Window * pParent,
- const uno::Reference< deployment::XPackage > &xPackage ) :
- ModalDialog( pParent, DialogHelper::getResId( RID_DLG_SHOW_LICENSE ) ),
- m_aLicenseText( this, DialogHelper::getResId( ML_LICENSE ) ),
- m_aCloseBtn( this, DialogHelper::getResId( RID_EM_BTN_CLOSE ) )
-{
- FreeResource();
-
- OUString aText = xPackage->getLicenseText();
- m_aLicenseText.SetText( aText );
-}
-
-//------------------------------------------------------------------------------
-ShowLicenseDialog::~ShowLicenseDialog()
-{}
-
-//------------------------------------------------------------------------------
-void ShowLicenseDialog::Resize()
-{
- Size aTotalSize( GetOutputSizePixel() );
- Size aTextSize( aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT,
- aTotalSize.Height() - RSC_SP_DLG_INNERBORDER_TOP - 2*RSC_SP_DLG_INNERBORDER_BOTTOM
- - m_aCloseBtn.GetSizePixel().Height() );
-
- m_aLicenseText.SetPosSizePixel( Point( RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP ),
- aTextSize );
-
- Point aBtnPos( (aTotalSize.Width() - m_aCloseBtn.GetSizePixel().Width())/2,
- aTotalSize.Height() - RSC_SP_DLG_INNERBORDER_BOTTOM
- - m_aCloseBtn.GetSizePixel().Height() );
- m_aCloseBtn.SetPosPixel( aBtnPos );
+ const uno::Reference< deployment::XPackage > &xPackage )
+ : ModalDialog(pParent, "ShowLicenseDialog", "desktop/ui/showlicensedialog.ui")
+{
+ get(m_pLicenseText, "textview");
+ Size aSize(m_pLicenseText->LogicToPixel(Size(290, 170), MAP_APPFONT));
+ m_pLicenseText->set_width_request(aSize.Width());
+ m_pLicenseText->set_height_request(aSize.Height());
+ m_pLicenseText->SetText(xPackage->getLicenseText());
}
//=================================================================================
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index 369f99b..05f78fc 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -242,15 +242,9 @@ public:
//==============================================================================
class ShowLicenseDialog : public ModalDialog
{
- MultiLineEdit m_aLicenseText;
- OKButton m_aCloseBtn;
-
+ VclMultiLineEdit* m_pLicenseText;
public:
- ShowLicenseDialog( Window * pParent,
- const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &xPackage );
- virtual ~ShowLicenseDialog();
-
- virtual void Resize();
+ ShowLicenseDialog(Window * pParent, const css::uno::Reference< css::deployment::XPackage > &xPackage);
};
//==============================================================================
diff --git a/desktop/uiconfig/ui/showlicensedialog.ui b/desktop/uiconfig/ui/showlicensedialog.ui
new file mode 100644
index 0000000..120a1e9
--- /dev/null
+++ b/desktop/uiconfig/ui/showlicensedialog.ui
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="ShowLicenseDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Extension Software License Agreement</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="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="close">
+ <property name="label">gtk-close</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>
+ </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="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="vscrollbar_policy">always</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTextView" id="textview">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="editable">False</property>
+ </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">close</action-widget>
+ </action-widgets>
+ </object>
+</interface>
commit 5efc2a34a54327961bb393fcf07a562b90f462bd
Author: Tushar Bende <tushar.bende at synerzip.com>
Date: Wed Nov 27 20:04:58 2013 +0530
fdo#71784:Preserve prop "allow row to break across pages" during export
Description:
If in original doc for table if "allow row to break across pages" is checked then during export
it used to write <w:cantSplit w:val="false"/> in trPr which was causing problem that all the cell
data was getting displayed on same page.
Change-Id: I5a20976ca91099de191eb1e2a7290b96dcdc6777
diff --git a/sw/qa/extras/ooxmlexport/data/2_table_doc.docx b/sw/qa/extras/ooxmlexport/data/2_table_doc.docx
new file mode 100644
index 0000000..21513ec
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/2_table_doc.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index ab264fd..c4d6e44 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2060,6 +2060,18 @@ DECLARE_OOXMLEXPORT_TEST(testThemePreservation, "theme-preservation.docx")
assertXPath(pXmlDocument, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w:rFonts", "cstheme", "majorBidi");
}
+DECLARE_OOXMLEXPORT_TEST(testcantSplit, "2_table_doc.docx")
+{
+ // if Split table value is true for a table then during export do not write <w:cantSplit w:val="false"/>
+ // in table row property,As default row prop is allow row to break across page.
+ // writing <w:cantSplit w:val="false"/> during export was causing problem that all the cell data used to come on same page
+ xmlDocPtr pXmlDoc = parseExport();
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tr/w:trPr/w:cantSplit",0);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[2]/w:tr/w:trPr/w:cantSplit","val","true");
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6e9cf53..53c574d 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2279,7 +2279,9 @@ void DocxAttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t p
const SwFmtRowSplit& rSplittable = pLineFmt->GetRowSplit( );
const char* pCantSplit = ( !rSplittable.GetValue( ) ) ? "true" : "false";
-
+ // if rSplittable is true then no need to write <w:cantSplit w:val="false"/>
+ // as default row prop is allow row to break across page.
+ if( !rSplittable.GetValue( ) )
m_pSerializer->singleElementNS( XML_w, XML_cantSplit,
FSNS( XML_w, XML_val ), pCantSplit,
FSEND );
More information about the Libreoffice-commits
mailing list