[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.4' - 3 commits - oox/source sd/qa sfx2/uiconfig sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu Sep 17 12:40:06 PDT 2015
oox/source/docprop/ooxmldocpropimport.cxx | 7 ++++++-
sd/qa/unit/data/pptx/tdf93097.pptx |binary
sd/qa/unit/import-tests.cxx | 12 ++++++++++++
sfx2/uiconfig/ui/newstyle.ui | 1 +
sw/source/ui/frmdlg/cption.cxx | 2 --
5 files changed, 19 insertions(+), 3 deletions(-)
New commits:
commit 1b635af9c337b929737d2ed807c9decc2ff6643b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Sep 4 11:49:25 2015 +0200
tdf#93097 oox: fix import of metadata from non-relative stream paths
Commit ef2668bad976f1fbb70759887cafd35ea7833655 (PPTX import: fix
missing document metadata, 2014-08-28) implemented metadata import for
the PPTX filter, but in case the metadata stream is not an existing one,
then OHierarchyHolder_Impl::GetListPathFromString() invoked by
OStorage::openStreamElementByHierarchicalName() throws.
The bugdoc is generated by a 3rd-party tool that always starts the
stream path with a slash, and MSO seems to just ignore that: so let's do
the same to be able to open the document.
(cherry picked from commit 46cf9bb76b29f2bfa6639d9aaf4f26dee365bc0c)
Conflicts:
sd/qa/unit/import-tests.cxx
Reviewed-on: https://gerrit.libreoffice.org/18372
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
Conflicts:
sd/qa/unit/import-tests.cxx
Change-Id: I6c0715adeb19b9055669f6a45055415dd2c44e28
diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx
index c711f2f..646c09c 100644
--- a/oox/source/docprop/ooxmldocpropimport.cxx
+++ b/oox/source/docprop/ooxmldocpropimport.cxx
@@ -80,8 +80,13 @@ Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& rxSto
const StringPair& rEntry = rEntries[ nEntryIndex ];
if ( rEntry.First == "Target" )
{
+ // The stream path is always a relative one, ignore the leading "/" if it's there.
+ OUString aStreamPath = rEntry.Second;
+ if (aStreamPath.startsWith("/"))
+ aStreamPath = aStreamPath.copy(1);
+
Reference< XExtendedStorageStream > xExtStream(
- xHierarchy->openStreamElementByHierarchicalName( rEntry.Second, ElementModes::READ ), UNO_QUERY_THROW );
+ xHierarchy->openStreamElementByHierarchicalName( aStreamPath, ElementModes::READ ), UNO_QUERY_THROW );
Reference< XInputStream > xInStream = xExtStream->getInputStream();
if( xInStream.is() )
{
diff --git a/sd/qa/unit/data/pptx/tdf93097.pptx b/sd/qa/unit/data/pptx/tdf93097.pptx
new file mode 100644
index 0000000..687110d
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf93097.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index b58aa3c..6efcf1f 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -102,6 +102,7 @@ public:
#endif
void testBnc910045();
void testTdf93830();
+ void testTdf93097();
CPPUNIT_TEST_SUITE(SdImportTest);
@@ -140,6 +141,7 @@ public:
#endif
CPPUNIT_TEST(testBnc910045);
CPPUNIT_TEST(testTdf93830);
+ CPPUNIT_TEST(testTdf93097);
CPPUNIT_TEST_SUITE_END();
};
@@ -1172,6 +1174,16 @@ void SdImportTest::testTdf93830()
xDocShRef->DoClose();
}
+void SdImportTest::testTdf93097()
+{
+ // Throwing metadata import aborted the filter, check that metadata is now imported.
+ sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/tdf93097.pptx"), PPTX);
+ uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier(xDocShRef->GetModel(), uno::UNO_QUERY);
+ uno::Reference<document::XDocumentProperties> xDocumentProperties = xDocumentPropertiesSupplier->getDocumentProperties();
+ CPPUNIT_ASSERT_EQUAL(OUString("ss"), xDocumentProperties->getTitle());
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
commit 5e1a9eb3e6eecfbf34b81b786efb2427382a4f62
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Sep 9 11:30:11 2015 +0100
stray debugging lines
(cherry picked from commit b95175cc41f96ce669d2a4d4c55034c1f80ac74b)
Change-Id: I525009b9d037387b236cb4605fe0b93c94858d89
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index dbd3543..8c6b1e6 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -320,8 +320,6 @@ IMPL_LINK_NOARG(SwCaptionDialog, ModifyHdl)
SwFieldType* pType = (bCorrectFldName && !bNone)
? rSh.GetFldType( RES_SETEXPFLD, sFldTypeName )
: 0;
- fprintf(stderr, "pType is %p\n", pType);
- fprintf(stderr, "bCorrectFldName is %d\n", bCorrectFldName);
m_pOKButton->Enable( bCorrectFldName &&
(!pType ||
((SwSetExpFieldType*)pType)->GetType() == nsSwGetSetExpType::GSE_SEQ) );
commit e952d86183eeb5852aefcf341ba25d039447818a
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Sun Sep 6 16:38:45 2015 +0300
tdf#91554 OK button should be disabled initially
Regression of eb505c259d0d7bd05d1bb5be5a14ad8613c2a9c7.
Change-Id: I4623c41617d92a808513f18154a7531e6dfd5463
(cherry picked from commit fdbad6761f5634982bb7b837bb145b3bd580832b)
Reviewed-on: https://gerrit.libreoffice.org/18371
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/sfx2/uiconfig/ui/newstyle.ui b/sfx2/uiconfig/ui/newstyle.ui
index df5f28c..d80b835 100644
--- a/sfx2/uiconfig/ui/newstyle.ui
+++ b/sfx2/uiconfig/ui/newstyle.ui
@@ -23,6 +23,7 @@
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
More information about the Libreoffice-commits
mailing list