[Libreoffice-commits] core.git: sd/qa

2016-12-01 Thread Muthu Subramanian
 sd/qa/unit/data/pptx/tdf103477.pptx |binary
 sd/qa/unit/import-tests.cxx |   17 +
 2 files changed, 17 insertions(+)

New commits:
commit 6e5e55c29eee285e56fe7f9708e9faf3ad62eec2
Author: Muthu Subramanian <muthus...@gmail.com>
Date:   Sun Oct 30 23:49:51 2016 +0530

tdf#103477 Add unit test

Change-Id: Ic960da6a479523a9255357d5f4cede212ff9c6a2
Reviewed-on: https://gerrit.libreoffice.org/30404
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: jan iversen <j...@documentfoundation.org>

diff --git a/sd/qa/unit/data/pptx/tdf103477.pptx 
b/sd/qa/unit/data/pptx/tdf103477.pptx
new file mode 100644
index 000..0ee9646
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf103477.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 22bb3b7..fd58d72 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -131,6 +131,7 @@ public:
 void testTdf103876();
 void testTdf104015();
 void testTdf104201();
+void testTdf103477();
 
 CPPUNIT_TEST_SUITE(SdImportTest);
 
@@ -187,6 +188,7 @@ public:
 CPPUNIT_TEST(testTdf103876);
 CPPUNIT_TEST(testTdf104015);
 CPPUNIT_TEST(testTdf104201);
+CPPUNIT_TEST(testTdf103477);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -1617,6 +1619,21 @@ void SdImportTest::testTdf104201()
 pObj->GetMergedItem(XATTR_FILLCOLOR));
 CPPUNIT_ASSERT_EQUAL(ColorData(0x00FF00), 
rColorItem.GetColorValue().GetColor());
 }
+}
+
+void SdImportTest::testTdf103477()
+{
+sd::DrawDocShellRef xDocShRef = 
loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf103477.pptx"), 
PPTX);
+
+const SdrPage *pPage = GetPage( 1, xDocShRef );
+
+SdrTextObj *pTxtObj = dynamic_cast( pPage->GetObj(6) );
+CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr );
+
+const EditTextObject& aEdit = 
pTxtObj->GetOutlinerParaObject()->GetTextObject();
+const SvxNumBulletItem *pNumFmt = dynamic_cast( 
aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET) );
+CPPUNIT_ASSERT(pNumFmt);
+CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's color is wrong!", 
sal_uInt32(0x00), 
pNumFmt->GetNumRule()->GetLevel(1).GetBulletColor().GetColor());
 
 xDocShRef->DoClose();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: oox/source

2016-11-30 Thread Muthu Subramanian
 oox/source/drawingml/textparagraphproperties.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 3770a6a3f3bd3e9c3f71a346b9db895e5bf0df31
Author: Muthu Subramanian <muthus...@gmail.com>
Date:   Sun Oct 30 23:47:33 2016 +0530

tdf#103477 buClrTx => use text color instead

Change-Id: I82d9231d2d0ea95cadc803f9a8dab9c23b88a677
Reviewed-on: https://gerrit.libreoffice.org/30403
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: jan iversen <j...@documentfoundation.org>

diff --git a/oox/source/drawingml/textparagraphproperties.cxx 
b/oox/source/drawingml/textparagraphproperties.cxx
index 4d281c0..aa62253 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -356,7 +356,9 @@ void BulletList::pushToPropMap( const 
::oox::core::XmlFilterBase* pFilterBase, P
 if ( maStyleName.hasValue() )
 rPropMap.setAnyProperty( PROP_CharStyleName, maStyleName);
 if (pFilterBase ) {
-if ( maBulletColorPtr->isUsed() )
+bool bFollowTextColor = false;
+mbBulletColorFollowText >>= bFollowTextColor;
+if ( maBulletColorPtr->isUsed() && !bFollowTextColor )
 rPropMap.setProperty( PROP_BulletColor, 
maBulletColorPtr->getColor( pFilterBase->getGraphicHelper() ));
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/source

2015-04-19 Thread Muthu Subramanian
 sd/source/core/drawdoc3.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 174f205fa24ccf72e9a479d6be901144418f899e
Author: Muthu Subramanian muthu.subramanian.karunani...@ericsson.com
Date:   Sun Apr 19 18:13:16 2015 +0530

tdf#90357: Fix crash while pasting into draw from impress.

Change-Id: Iff0b072f0968e1e3e54617bd6903019ef3edb1ac

diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index ec5416c..33e457b 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -929,7 +929,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
 for(sal_uInt32 p = nInsertPos; p  (nInsertPos + nBMSdPageCount); 
p++)
 {
 SdPage *pPg = static_castSdPage *( GetPage(p) );
-for(size_t i = 0; i  pPg-GetObjCount(); ++i)
+for(size_t i = 0; pPg  (i  pPg-GetObjCount()); ++i)
 {
 if(pPg-GetObj(i)-GetStyleSheet())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sw/source

2015-01-28 Thread Muthu Subramanian
 sw/source/ui/misc/linenum.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit e930c08494346627f5bf658d46a81c735e3917ec
Author: Muthu Subramanian muthu.subramanian.karunani...@ericsson.com
Date:   Sun Jan 25 17:44:05 2015 +0530

fdo#86984: UI Line numbering works only for EN_US

Change-Id: I0fadb6f5f96cccd4056a164a6b0f3b2fdd68a40b
Reviewed-on: https://gerrit.libreoffice.org/14168
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Andras Timar andras.ti...@collabora.com
(cherry picked from commit fb9e0063d64243ffd56174566b9eda723daf0cb3)
Reviewed-on: https://gerrit.libreoffice.org/14224
Tested-by: Andras Timar andras.ti...@collabora.com

diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index b28b2a7..71a596b 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -32,6 +32,7 @@
 #include linenum.hxx
 #include uitool.hxx
 #include fmtline.hxx
+#include poolfmt.hrc
 
 #include IDocumentStylePoolAccess.hxx
 
@@ -146,7 +147,7 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw)
 m_pNumberingOnCB-Check(rInf.IsPaintLineNumbers());
 
 // Header/Footer Line Numbering
-rtl::Reference SwDocStyleSheet  xStyleSheet = 
lcl_getDocStyleSheet(Footer, pSh);
+rtl::Reference SwDocStyleSheet  xStyleSheet = 
lcl_getDocStyleSheet(SW_RESSTR(STR_POOLCOLL_FOOTER), pSh);
 if(xStyleSheet.is())
 {
 SfxItemSet rSet = xStyleSheet-GetItemSet();
@@ -221,8 +222,8 @@ IMPL_LINK_NOARG(SwLineNumberingDlg, OKHdl)
 pSh-SetLineNumberInfo(aInf);
 
 // Set LineNumber explicitly for Header and Footer
-lcl_setLineNumbering(Footer,pSh,m_pNumberingOnFooterHeader-IsChecked());
-lcl_setLineNumbering(Header,pSh,m_pNumberingOnFooterHeader-IsChecked());
+lcl_setLineNumbering(SW_RESSTR(STR_POOLCOLL_FOOTER), pSh, 
m_pNumberingOnFooterHeader-IsChecked());
+lcl_setLineNumbering(SW_RESSTR(STR_POOLCOLL_HEADER), pSh, 
m_pNumberingOnFooterHeader-IsChecked());
 if( m_pNumberingOnFooterHeader-IsChecked())
m_pNumberingOnFooterHeader-SetState(TRISTATE_TRUE);
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2015-01-28 Thread Muthu Subramanian
 sw/source/ui/misc/linenum.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit fb9e0063d64243ffd56174566b9eda723daf0cb3
Author: Muthu Subramanian muthu.subramanian.karunani...@ericsson.com
Date:   Sun Jan 25 17:44:05 2015 +0530

fdo#86984: UI Line numbering works only for EN_US

Change-Id: I0fadb6f5f96cccd4056a164a6b0f3b2fdd68a40b
Reviewed-on: https://gerrit.libreoffice.org/14168
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Andras Timar andras.ti...@collabora.com

diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index 5eb3e4e..db98b1c 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -32,6 +32,7 @@
 #include linenum.hxx
 #include uitool.hxx
 #include fmtline.hxx
+#include poolfmt.hrc
 
 #include IDocumentStylePoolAccess.hxx
 
@@ -146,7 +147,7 @@ SwLineNumberingDlg::SwLineNumberingDlg(SwView *pVw)
 m_pNumberingOnCB-Check(rInf.IsPaintLineNumbers());
 
 // Header/Footer Line Numbering
-rtl::Reference SwDocStyleSheet  xStyleSheet = 
lcl_getDocStyleSheet(Footer, pSh);
+rtl::Reference SwDocStyleSheet  xStyleSheet = 
lcl_getDocStyleSheet(SW_RESSTR(STR_POOLCOLL_FOOTER), pSh);
 if(xStyleSheet.is())
 {
 SfxItemSet rSet = xStyleSheet-GetItemSet();
@@ -221,8 +222,8 @@ IMPL_LINK_NOARG(SwLineNumberingDlg, OKHdl)
 pSh-SetLineNumberInfo(aInf);
 
 // Set LineNumber explicitly for Header and Footer
-lcl_setLineNumbering(Footer,pSh,m_pNumberingOnFooterHeader-IsChecked());
-lcl_setLineNumbering(Header,pSh,m_pNumberingOnFooterHeader-IsChecked());
+lcl_setLineNumbering(SW_RESSTR(STR_POOLCOLL_FOOTER), pSh, 
m_pNumberingOnFooterHeader-IsChecked());
+lcl_setLineNumbering(SW_RESSTR(STR_POOLCOLL_HEADER), pSh, 
m_pNumberingOnFooterHeader-IsChecked());
 if( m_pNumberingOnFooterHeader-IsChecked())
m_pNumberingOnFooterHeader-SetState(TRISTATE_TRUE);
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sd/source

2014-11-18 Thread Muthu Subramanian
 sd/source/core/drawdoc3.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 1e416e9b5b30f9a06114b24284994bc50715e1ba
Author: Muthu Subramanian muthu.subramanian.karunani...@ericsson.com
Date:   Thu Oct 23 20:30:26 2014 +0530

fdo#85247: copy and paste of a slide results in a blue slide in 
presentation mode.

Seems like Default is handled specially or probably
the copy-buffer is broken
This now checks for slide 'type' as well, before cosidering it a duplicate

Change-Id: If8c472bcefb54cee72e7411f92a76b4e2db2b6ce
(cherry picked from commit 0bab8aee77cfc2ffdbc6d3ef6a869284bc12dff4)
Reviewed-on: https://gerrit.libreoffice.org/12285
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk
Tested-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 936a5d5..a3381fc 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -105,9 +105,11 @@ void 
InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument rDoc
 
 OUString aTest(aFullTest);
 
-if (aTest == aLayout)
+if (aTest == aLayout  pBMMPage-GetPageKind() == 
pTestPage-GetPageKind())
 {
-if( bRenameDuplicates  pTestPage-getHash() != 
pBMMPage-getHash() )
+// Ignore Layouts with Default these seem to be special - in the 
sense that there are lot of assumption all over Impress
+// about this
+if( bRenameDuplicates  aTest != OUString( SdResId( 
STR_LAYOUT_DEFAULT_NAME ) )  pTestPage-getHash() != pBMMPage-getHash() )
 {
 pBookmarkDoc-RenameLayoutTemplate( pBMMPage-GetLayoutName(), 
OUString(pBMMPage-GetName())+=OUString(_) );
 aLayout = pBMMPage-GetName();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - svtools/source sw/source

2014-11-18 Thread Muthu Subramanian
 svtools/source/misc/embedtransfer.cxx |5 +
 sw/source/core/uibase/dochdl/swdtflvr.cxx |   18 ++
 2 files changed, 23 insertions(+)

New commits:
commit 4ab54cf64ff194fa2f53f2f0d2512a4fc267674c
Author: Muthu Subramanian muthu.subramanian.karunani...@ericsson.com
Date:   Fri Oct 10 22:58:00 2014 +0530

Enable copy-paste of charts/ole as bitmaps.

Cherry-picked from 6296c64fb0ed8bce61eb6303920f952eda65de71

Change-Id: I0e074da34ff1a11c223994dcf373bf60af7cd271
Reviewed-on: https://gerrit.libreoffice.org/11911
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/svtools/source/misc/embedtransfer.cxx 
b/svtools/source/misc/embedtransfer.cxx
index 7792f84..7c99085 100644
--- a/svtools/source/misc/embedtransfer.cxx
+++ b/svtools/source/misc/embedtransfer.cxx
@@ -76,6 +76,7 @@ void SvEmbedTransferHelper::AddSupportedFormats()
 AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
 AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
 AddFormat( FORMAT_GDIMETAFILE );
+AddFormat( FORMAT_BITMAP );
 }
 
 
@@ -169,6 +170,10 @@ bool SvEmbedTransferHelper::GetData( const 
css::datatransfer::DataFlavor rFlavo
 SetAny( aAny, rFlavor );
 bRet = true;
 }
+else if ( ( nFormat == FORMAT_BITMAP || nFormat == 
SOT_FORMATSTR_ID_PNG )  m_pGraphic )
+{
+bRet = SetBitmapEx( m_pGraphic-GetBitmapEx(), rFlavor );
+}
 else if ( m_xObj.is()  :: 
svt::EmbeddedObjectRef::TryRunningState( m_xObj ) )
 {
 uno::Reference datatransfer::XTransferable  
xTransferable( m_xObj-getComponent(), uno::UNO_QUERY );
diff --git a/sw/source/core/uibase/dochdl/swdtflvr.cxx 
b/sw/source/core/uibase/dochdl/swdtflvr.cxx
index 3cdd21a..3db9338 100644
--- a/sw/source/core/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/core/uibase/dochdl/swdtflvr.cxx
@@ -495,6 +495,7 @@ bool SwTransferable::GetData( const DataFlavor rFlavor, 
const OUString rDestDo
 
 // the following solution will be used in the case when the object can 
not generate the image
 // TODO/LATER: in future the transferhelper must probably be created 
based on object and the replacement stream
+// TODO: Block not required now, SvEmbedTransferHelper should be able 
to handle GDIMetaFile format
 if ( nFormat == SOT_FORMAT_GDIMETAFILE )
 {
 pOLEGraph = FindOLEReplacementGraphic();
@@ -828,6 +829,23 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
 AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
 
 AddFormat( FORMAT_GDIMETAFILE );
+
+// Fetch the formats supported via embedtransferhelper as well
+sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
+uno::Reference  embed::XEmbeddedObject  xObj = FindOLEObj( nAspect );
+const Graphic* pOLEGraph = FindOLEReplacementGraphic();
+if( xObj.is() )
+{
+TransferableDataHelper aD( new SvEmbedTransferHelper( xObj, 
pOLEGraph, nAspect ) );
+if ( aD.GetTransferable().is() )
+{
+DataFlavorExVector  aVector( 
aD.GetDataFlavorExVector() );
+DataFlavorExVector::iteratoraIter( aVector.begin() ), 
aEnd( aVector.end() );
+
+while( aIter != aEnd )
+AddFormat( *aIter++ );
+}
+}
 eBufferType = TRNSFR_OLE;
 }
 // Is there anything to provide anyway?
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - oox/source

2014-11-09 Thread Muthu Subramanian
 oox/source/drawingml/chart/objectformatter.cxx |   21 ++---
 1 file changed, 10 insertions(+), 11 deletions(-)

New commits:
commit ce807b9143baa7a686ab9b2a95899f2c1817a715
Author: Muthu Subramanian muthu.subramanian.karunani...@ericsson.com
Date:   Fri Oct 10 18:59:46 2014 +0530

fdo#54361: Chart background in XLSX is transparent instead of white.

Conflicts:
oox/source/drawingml/chart/objectformatter.cxx

Change-Id: I116e7e8c9046009cfcadc04b5367a6fe25f88d96
Reviewed-on: https://gerrit.libreoffice.org/11910
Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com
Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com

diff --git a/oox/source/drawingml/chart/objectformatter.cxx 
b/oox/source/drawingml/chart/objectformatter.cxx
index ae45550..53328b9 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -643,7 +643,8 @@ class FillFormatter : public DetailFormatterBase
 public:
 explicitFillFormatter(
 ObjectFormatterData rData,
-const AutoFormatEntry* pAutoFormatEntry );
+const AutoFormatEntry* pAutoFormatEntry,
+const ObjectType eObjType );
 
 /** Converts area formatting to the passed property set. */
 voidconvertFormatting(
@@ -704,7 +705,8 @@ public:
 explicitObjectTypeFormatter(
 ObjectFormatterData rData,
 const ObjectTypeFormatEntry rEntry,
-const ChartSpaceModel rChartSpace );
+const ChartSpaceModel rChartSpace,
+const ObjectType eObjType );
 
 /** Sets frame formatting properties to the passed property set. */
 voidconvertFrameFormatting(
@@ -886,15 +888,14 @@ void LineFormatter::convertFormatting( ShapePropertyMap 
rPropMap, const ModelRe
 aLineProps.pushToPropMap( rPropMap, mrData.mrFilter.getGraphicHelper(), 
getPhColor( nSeriesIdx ) );
 }
 
-
-
-FillFormatter::FillFormatter( ObjectFormatterData rData, const 
AutoFormatEntry* pAutoFormatEntry ) :
+FillFormatter::FillFormatter( ObjectFormatterData rData, const 
AutoFormatEntry* pAutoFormatEntry, const ObjectType eObjType ) :
 DetailFormatterBase( rData, pAutoFormatEntry )
 {
 if( pAutoFormatEntry )
 {
 mxAutoFill.reset( new FillProperties );
-mxAutoFill-moFillType = XML_noFill;
+if( eObjType != OBJECTTYPE_CHARTSPACE )
+mxAutoFill-moFillType = XML_noFill;
 if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() )
 if( const FillProperties* pFillProps = pTheme-getFillStyle( 
pAutoFormatEntry-mnThemedIdx ) )
 *mxAutoFill = *pFillProps;
@@ -975,11 +976,9 @@ void TextFormatter::convertFormatting( PropertySet 
rPropSet, const ModelRef Te
 convertFormatting( rPropSet, lclGetTextProperties( rxTextProp ) );
 }
 
-
-
-ObjectTypeFormatter::ObjectTypeFormatter( ObjectFormatterData rData, const 
ObjectTypeFormatEntry rEntry, const ChartSpaceModel rChartSpace ) :
+ObjectTypeFormatter::ObjectTypeFormatter( ObjectFormatterData rData, const 
ObjectTypeFormatEntry rEntry, const ChartSpaceModel rChartSpace, const 
ObjectType eObjType ) :
 maLineFormatter(   rData, lclGetAutoFormatEntry( rEntry.mpAutoLines,   
rChartSpace.mnStyle ) ),
-maFillFormatter(   rData, lclGetAutoFormatEntry( rEntry.mpAutoFills,   
rChartSpace.mnStyle ) ),
+maFillFormatter(   rData, lclGetAutoFormatEntry( rEntry.mpAutoFills,   
rChartSpace.mnStyle ), eObjType ),
 maEffectFormatter( rData, lclGetAutoFormatEntry( rEntry.mpAutoEffects, 
rChartSpace.mnStyle ) ),
 maTextFormatter(   rData, lclGetAutoTextEntry(   rEntry.mpAutoTexts,   
rChartSpace.mnStyle ), rChartSpace.mxTextProp ),
 mrModelObjHelper( rData.maModelObjHelper ),
@@ -1032,7 +1031,7 @@ ObjectFormatterData::ObjectFormatterData( const 
XmlFilterBase rFilter, const Re
 {
 const ObjectTypeFormatEntry* pEntryEnd = STATIC_ARRAY_END( 
spObjTypeFormatEntries );
 for( const ObjectTypeFormatEntry* pEntry = spObjTypeFormatEntries; pEntry 
!= pEntryEnd; ++pEntry )
-maTypeFormatters[ pEntry-meObjType ].reset( new ObjectTypeFormatter( 
*this, *pEntry, rChartSpace ) );
+maTypeFormatters[ pEntry-meObjType ].reset( new ObjectTypeFormatter( 
*this, *pEntry, rChartSpace, pEntry-meObjType ) );
 
 try
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/source

2014-10-23 Thread Muthu Subramanian
 sd/source/core/drawdoc3.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 0bab8aee77cfc2ffdbc6d3ef6a869284bc12dff4
Author: Muthu Subramanian muthu.subramanian.karunani...@ericsson.com
Date:   Thu Oct 23 20:30:26 2014 +0530

fdo#85247: copy and paste of a slide results in a blue slide in 
presentation mode.

Seems like Default is handled specially or probably
the copy-buffer is broken
This now checks for slide 'type' as well, before cosidering it a duplicate

Change-Id: If8c472bcefb54cee72e7411f92a76b4e2db2b6ce

diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index e379ed0..d3e92f9 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -106,9 +106,11 @@ void 
InsertBookmarkAsPage_FindDuplicateLayouts::operator()( SdDrawDocument rDoc
 
 OUString aTest(aFullTest);
 
-if (aTest == aLayout)
+if (aTest == aLayout  pBMMPage-GetPageKind() == 
pTestPage-GetPageKind())
 {
-if( bRenameDuplicates  pTestPage-getHash() != 
pBMMPage-getHash() )
+// Ignore Layouts with Default these seem to be special - in the 
sense that there are lot of assumption all over Impress
+// about this
+if( bRenameDuplicates  aTest != OUString( SdResId( 
STR_LAYOUT_DEFAULT_NAME ) )  pTestPage-getHash() != pBMMPage-getHash() )
 {
 pBookmarkDoc-RenameLayoutTemplate( pBMMPage-GetLayoutName(), 
OUString(pBMMPage-GetName())+=OUString(_) );
 aLayout = pBMMPage-GetName();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - chart2/qa oox/source

2014-10-10 Thread Muthu Subramanian
 chart2/qa/extras/chart2import.cxx  |   11 +--
 chart2/qa/extras/data/xlsx/fdo54361-1.xlsx |binary
 oox/source/drawingml/chart/objectformatter.cxx |   17 ++---
 3 files changed, 19 insertions(+), 9 deletions(-)

New commits:
commit e60183503e0cefd567f20b300d674fcbd75f1fb5
Author: Muthu Subramanian muthu.subramanian.karunani...@ericsson.com
Date:   Fri Oct 10 19:01:03 2014 +0530

fdo#54361: Add additional unit test case.

Change-Id: Ifa3fd6f074d1957a468a1dad5dc2c223d38d24d4

diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index 302d2b5..f8c545a 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -55,6 +55,8 @@ public:
 void testAutoBackgroundXLSX();
 void testNumberFormatsXLSX();
 
+void testTransparentBackground(OUString filename);
+
 CPPUNIT_TEST_SUITE(Chart2ImportTest);
 CPPUNIT_TEST(Fdo60083);
 CPPUNIT_TEST(testSteppedLines);
@@ -593,9 +595,9 @@ void Chart2ImportTest::testFdo78080()
 CPPUNIT_ASSERT(!xTitle.is());
 }
 
-void Chart2ImportTest::testFdo54361()
+void Chart2ImportTest::testTransparentBackground(OUString filename)
 {
-load(/chart2/qa/extras/data/xlsx/, fdo54361.xlsx);
+load(/chart2/qa/extras/data/xlsx/, filename);
 uno::Reference chart2::XChartDocument  xChartDoc = 
getChartDocFromSheet(0, mxComponent);
 CPPUNIT_ASSERT_MESSAGE(failed to load chart, xChartDoc.is());
 
@@ -610,6 +612,11 @@ void Chart2ImportTest::testFdo54361()
 
 CPPUNIT_ASSERT_MESSAGE(Background needs to be with solid fill style, 
aStyle == 1);
 }
+void Chart2ImportTest::testFdo54361()
+{
+testTransparentBackground(fdo54361.xlsx);
+testTransparentBackground(fdo54361-1.xlsx);
+}
 
 void Chart2ImportTest::testAutoBackgroundXLSX()
 {
diff --git a/chart2/qa/extras/data/xlsx/fdo54361-1.xlsx 
b/chart2/qa/extras/data/xlsx/fdo54361-1.xlsx
new file mode 100644
index 000..dba79ef
Binary files /dev/null and b/chart2/qa/extras/data/xlsx/fdo54361-1.xlsx differ
commit aad90e18cd00ac8af6bcddf14e4e19c9475dedbf
Author: Muthu Subramanian muthu.subramanian.karunani...@ericsson.com
Date:   Fri Oct 10 18:59:46 2014 +0530

fdo#54361: Chart background in XLSX is transparent instead of white.

Change-Id: I116e7e8c9046009cfcadc04b5367a6fe25f88d96

diff --git a/oox/source/drawingml/chart/objectformatter.cxx 
b/oox/source/drawingml/chart/objectformatter.cxx
index d0ab4c0..dd53dde 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -623,7 +623,8 @@ class FillFormatter : public DetailFormatterBase
 public:
 explicitFillFormatter(
 ObjectFormatterData rData,
-const AutoFormatEntry* pAutoFormatEntry );
+const AutoFormatEntry* pAutoFormatEntry,
+const ObjectType eObjType );
 
 /** Converts area formatting to the passed property set. */
 voidconvertFormatting(
@@ -678,7 +679,8 @@ public:
 explicitObjectTypeFormatter(
 ObjectFormatterData rData,
 const ObjectTypeFormatEntry rEntry,
-const ChartSpaceModel rChartSpace );
+const ChartSpaceModel rChartSpace,
+const ObjectType eObjType );
 
 /** Sets frame formatting properties to the passed property set. */
 voidconvertFrameFormatting(
@@ -854,13 +856,14 @@ void LineFormatter::convertFormatting( ShapePropertyMap 
rPropMap, const ModelRe
 aLineProps.pushToPropMap( rPropMap, mrData.mrFilter.getGraphicHelper(), 
getPhColor( nSeriesIdx ) );
 }
 
-FillFormatter::FillFormatter( ObjectFormatterData rData, const 
AutoFormatEntry* pAutoFormatEntry ) :
+FillFormatter::FillFormatter( ObjectFormatterData rData, const 
AutoFormatEntry* pAutoFormatEntry, const ObjectType eObjType ) :
 DetailFormatterBase( rData, pAutoFormatEntry )
 {
 if( pAutoFormatEntry )
 {
 mxAutoFill.reset( new FillProperties );
-mxAutoFill-moFillType = XML_noFill;
+if( eObjType != OBJECTTYPE_CHARTSPACE )
+mxAutoFill-moFillType = XML_noFill;
 if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() )
 if( const FillProperties* pFillProps = pTheme-getFillStyle( 
pAutoFormatEntry-mnThemedIdx ) )
 *mxAutoFill = *pFillProps;
@@ -937,9 +940,9 @@ void TextFormatter::convertFormatting( PropertySet 
rPropSet, const ModelRef Te
 convertFormatting( rPropSet, lclGetTextProperties( rxTextProp ) );
 }
 
-ObjectTypeFormatter::ObjectTypeFormatter( ObjectFormatterData rData, const 
ObjectTypeFormatEntry rEntry, const ChartSpaceModel rChartSpace ) :
+ObjectTypeFormatter::ObjectTypeFormatter( ObjectFormatterData rData, const 
ObjectTypeFormatEntry rEntry, const ChartSpaceModel rChartSpace, const

[Libreoffice-commits] core.git: Changes to 'refs/changes/23/8823/1'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/09/7309/2'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/45/8545/2'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/09/7309/1'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/45/8545/1'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/47/8547/1'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/95/2395/1'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/47/8547/2'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/95/2395/2'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/46/8546/1'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/14/9314/2'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/99/2399/1'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/14/9314/1'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/42/8542/1'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/48/7848/1'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/48/7848/2'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/66/7266/2'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/44/8544/1'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/44/8544/2'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/66/7266/1'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Changes to 'refs/remotes/origin/feature/bootstrap-build'

2014-09-29 Thread Muthu Subramanian

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svtools/source sw/source

2014-07-22 Thread Muthu Subramanian
 svtools/source/misc/embedtransfer.cxx |5 +
 sw/source/uibase/dochdl/swdtflvr.cxx  |   18 ++
 2 files changed, 23 insertions(+)

New commits:
commit 6296c64fb0ed8bce61eb6303920f952eda65de71
Author: Muthu Subramanian muthu.subramanian.karunani...@ericsson.com
Date:   Tue Jul 22 22:08:16 2014 +0530

Enable copy-paste of charts/ole as bitmaps.

Adds FORMAT_BITMAP to OLE Objects - to allow charts
to be pasted into non-LibreOffice applications.
Should be safe for all OLE Objects, though.

Change-Id: If18768b82d4bb4415b3a8e00828b2eb5c31eeb15

diff --git a/svtools/source/misc/embedtransfer.cxx 
b/svtools/source/misc/embedtransfer.cxx
index 7792f84..7c99085 100644
--- a/svtools/source/misc/embedtransfer.cxx
+++ b/svtools/source/misc/embedtransfer.cxx
@@ -76,6 +76,7 @@ void SvEmbedTransferHelper::AddSupportedFormats()
 AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
 AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
 AddFormat( FORMAT_GDIMETAFILE );
+AddFormat( FORMAT_BITMAP );
 }
 
 
@@ -169,6 +170,10 @@ bool SvEmbedTransferHelper::GetData( const 
css::datatransfer::DataFlavor rFlavo
 SetAny( aAny, rFlavor );
 bRet = true;
 }
+else if ( ( nFormat == FORMAT_BITMAP || nFormat == 
SOT_FORMATSTR_ID_PNG )  m_pGraphic )
+{
+bRet = SetBitmapEx( m_pGraphic-GetBitmapEx(), rFlavor );
+}
 else if ( m_xObj.is()  :: 
svt::EmbeddedObjectRef::TryRunningState( m_xObj ) )
 {
 uno::Reference datatransfer::XTransferable  
xTransferable( m_xObj-getComponent(), uno::UNO_QUERY );
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index 9d33a70..57fb9c7 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -499,6 +499,7 @@ bool SwTransferable::GetData( const DataFlavor rFlavor, 
const OUString rDestDo
 
 // the following solution will be used in the case when the object can 
not generate the image
 // TODO/LATER: in future the transferhelper must probably be created 
based on object and the replacement stream
+// TODO: Block not required now, SvEmbedTransferHelper should be able 
to handle GDIMetaFile format
 if ( nFormat == SOT_FORMAT_GDIMETAFILE )
 {
 pOLEGraph = FindOLEReplacementGraphic();
@@ -832,6 +833,23 @@ int SwTransferable::PrepareForCopy( bool bIsCut )
 AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
 
 AddFormat( FORMAT_GDIMETAFILE );
+
+// Fetch the formats supported via embedtransferhelper as well
+sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
+uno::Reference  embed::XEmbeddedObject  xObj = FindOLEObj( nAspect );
+const Graphic* pOLEGraph = FindOLEReplacementGraphic();
+if( xObj.is() )
+{
+TransferableDataHelper aD( new SvEmbedTransferHelper( xObj, 
pOLEGraph, nAspect ) );
+if ( aD.GetTransferable().is() )
+{
+DataFlavorExVector  aVector( 
aD.GetDataFlavorExVector() );
+DataFlavorExVector::iteratoraIter( aVector.begin() ), 
aEnd( aVector.end() );
+
+while( aIter != aEnd )
+AddFormat( *aIter++ );
+}
+}
 eBufferType = TRNSFR_OLE;
 }
 // Is there anything to provide anyway?
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - oox/source

2014-06-26 Thread Muthu Subramanian
 oox/source/drawingml/textcharacterproperties.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit ad9a48a2b31fc97bcfbf50b8f5731f520c281595
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 12 18:24:42 2013 +0530

n#828390: Reset charescapement.

Unless the value is reset - the escapement
seems to continue to the next set of textruns.

(cherry picked from commit fdf77f50ab825bd2b44e980552f3383acf637b12)
Signed-off-by: Andras Timar andras.ti...@collabora.com

diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index a7be42b..8364c86 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -122,6 +122,9 @@ void TextCharacterProperties::pushToPropMap( PropertyMap 
rPropMap, const XmlFil
 if( moBaseline.has() ) {
 rPropMap[ PROP_CharEscapement ] = sal_Int16(moBaseline.get( 0 ) / 
1000);
 rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(DFLT_ESC_PROP);
+} else {
+rPropMap[ PROP_CharEscapement ] = sal_Int16(0);
+rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(100); // 100%
 }
 
 if( !bUseOptional || moBold.has() ) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - oox/source

2014-06-26 Thread Muthu Subramanian
 oox/source/drawingml/textcharacterproperties.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit a9b019c66e1b492773a579135520d8a50b02f623
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 12 18:24:42 2013 +0530

n#828390: Reset charescapement.

Unless the value is reset - the escapement
seems to continue to the next set of textruns.

(cherry picked from commit fdf77f50ab825bd2b44e980552f3383acf637b12)

diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index a7be42b..8364c86 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -122,6 +122,9 @@ void TextCharacterProperties::pushToPropMap( PropertyMap 
rPropMap, const XmlFil
 if( moBaseline.has() ) {
 rPropMap[ PROP_CharEscapement ] = sal_Int16(moBaseline.get( 0 ) / 
1000);
 rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(DFLT_ESC_PROP);
+} else {
+rPropMap[ PROP_CharEscapement ] = sal_Int16(0);
+rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(100); // 100%
 }
 
 if( !bUseOptional || moBold.has() ) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sd/sdi sd/source sd/uiconfig

2014-05-25 Thread Muthu Subramanian
 sd/sdi/_docsh.sdi|   15 ++--
 sd/source/ui/docshell/docshel3.cxx   |  114 +++
 sd/source/ui/docshell/docshell.cxx   |6 +
 sd/uiconfig/sdraw/menubar/menubar.xml|2 
 sd/uiconfig/simpress/menubar/menubar.xml |2 
 5 files changed, 134 insertions(+), 5 deletions(-)

New commits:
commit 585077d4f681582386baa10acff53abdd280552b
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Apr 23 18:33:22 2014 +0530

fdo#64047: n#863021: Add set-all language menu.

Problems:
* Doesn't reset the spell error markers
* Modifies only at object level
* Currently has only setting for 'all text'
* Maybe provide a current slide only option?

Change-Id: I4695423fed3ed9422185b23803eedd12ef434bea
(cherry picked from commit 0833f4046a1afa77aeed97a131c5325c44be1bb3)
Signed-off-by: Andras Timar andras.ti...@collabora.com
Reviewed-on: https://gerrit.libreoffice.org/9314
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sd/sdi/_docsh.sdi b/sd/sdi/_docsh.sdi
index 075b60a..b087723 100644
--- a/sd/sdi/_docsh.sdi
+++ b/sd/sdi/_docsh.sdi
@@ -32,11 +32,16 @@ interface DrawDocument
 ExecMethod = Execute ;
 StateMethod = GetState ;
 ]
-SID_CHINESE_CONVERSION // ole : ?, status : ?
-[
-ExecMethod = Execute ;
-StateMethod = GetState ;
-]
+SID_CHINESE_CONVERSION // ole : ?, status : ?
+[
+ExecMethod = Execute ;
+StateMethod = GetState ;
+]
+SID_LANGUAGE_STATUS
+[
+ExecMethod = Execute ;
+StateMethod = GetState ;
+]
  // ?
 FID_SEARCH_NOW // ole : ?, status : ?
 [
diff --git a/sd/source/ui/docshell/docshel3.cxx 
b/sd/source/ui/docshell/docshel3.cxx
index d22f50a..cd45b39 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include Window.hxx
 #include DrawDocShell.hxx
 
 #include app.hrc
@@ -28,11 +29,18 @@
 #include svx/svxerr.hxx
 #include svx/dialmgr.hxx
 #include svl/srchitem.hxx
+#include svl/languageoptions.hxx
+#include svtools/langtab.hxx
 #include svx/srchdlg.hxx
 #include sfx2/request.hxx
+#include sfx2/sfxdlg.hxx
+#include vcl/abstdlg.hxx
+#include vcl/window.hxx
 #include svl/style.hxx
 #include svx/drawitem.hxx
 #include editeng/unolingu.hxx
+#include editeng/langitem.hxx
+#include editeng/eeitem.hxx
 #include com/sun/star/i18n/TextConversionOption.hpp
 
 #include strings.hrc
@@ -55,6 +63,68 @@ using namespace ::com::sun::star::uno;
 
 namespace sd {
 
+static void lcl_setLanguageForObj( SdrObject *pObj, LanguageType nLang, bool 
bLanguageNone = false )
+{
+const sal_uInt16 aLangWhichId_EE[3] =
+{
+EE_CHAR_LANGUAGE,
+EE_CHAR_LANGUAGE_CJK,
+EE_CHAR_LANGUAGE_CTL
+};
+
+if( bLanguageNone )
+nLang = LANGUAGE_NONE;
+
+if( nLang != LANGUAGE_DONTKNOW )
+{
+if( nLang == LANGUAGE_NONE )
+{
+for(sal_Int32 n = 0; n  3; n++ )
+pObj-SetMergedItem( SvxLanguageItem( nLang, 
aLangWhichId_EE[n] ) );
+}
+else
+{
+sal_uInt16 nLangWhichId = 0;
+sal_uInt16 nScriptType = 
SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
+switch (nScriptType)
+{
+case SCRIPTTYPE_LATIN :nLangWhichId = EE_CHAR_LANGUAGE; 
break;
+case SCRIPTTYPE_ASIAN :nLangWhichId = 
EE_CHAR_LANGUAGE_CJK; break;
+case SCRIPTTYPE_COMPLEX :  nLangWhichId = 
EE_CHAR_LANGUAGE_CTL; break;
+default:
+OSL_FAIL(unexpected case );
+return;
+}
+pObj-SetMergedItem( SvxLanguageItem( nLang, nLangWhichId ) );
+}
+}
+else// Reset to default
+{
+for( sal_Int32 n = 0; n  3; n++ )
+pObj-ClearMergedItem( aLangWhichId_EE[n] );
+}
+}
+
+
+static void lcl_setLanguage( const SdDrawDocument *pDoc, const OUString 
rLanguage, bool bLanguageNone = false )
+{
+LanguageType nLang = SvtLanguageTable().GetType( rLanguage );
+
+// Do it for SdDrawDocument-SetLanguage as well?
+
+sal_uInt16 nPageCount = pDoc-GetPageCount();   // Pick All Pages
+for( sal_uInt16 nPage = 0; nPage  nPageCount; nPage++ )
+{
+const SdrPage *pPage = pDoc-GetPage( nPage );
+sal_uIntPtr nObjCount = pPage-GetObjCount();
+for( sal_uInt16 nObj = 0; nObj  nObjCount; nObj++ )
+{
+SdrObject *pObj = pPage-GetObj( nObj );
+lcl_setLanguageForObj( pObj, nLang, bLanguageNone );
+}
+}
+}
+
 /**
  * Handles SFX-Requests
  */
@@ -201,6 +271,50 @@ void DrawDocShell::Execute( SfxRequest rReq )
 }
 }
 break;
+case

[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - oox/source

2014-05-21 Thread Muthu Subramanian
 oox/source/drawingml/textcharacterpropertiescontext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b8f4cacb4b8c5a9d7d05fe4979e048e237ed4426
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Mar 14 15:31:53 2014 +0530

n#862510: Ignore baseline attributes with zero.

Change-Id: I1adc46e62c82c23645ccad0e11d5a7cb07114539
(cherry picked from commit 19abfaffe74b925e4428943d14187a7008797982)
Signed-off-by: Andras Timar andras.ti...@collabora.com

diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx 
b/oox/source/drawingml/textcharacterpropertiescontext.cxx
index 6887cda..8217cac 100644
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -52,7 +52,7 @@ 
TextCharacterPropertiesContext::TextCharacterPropertiesContext(
 mrTextCharacterProperties.moUnderline = rAttribs.getToken( XML_u );
 if ( rAttribs.hasAttribute( XML_strike ) )
 mrTextCharacterProperties.moStrikeout = rAttribs.getToken( XML_strike 
);
-if ( rAttribs.hasAttribute( XML_baseline ) )
+if ( rAttribs.hasAttribute( XML_baseline )  rAttribs.getInteger( 
XML_baseline ).get() != 0 )
 mrTextCharacterProperties.moBaseline = rAttribs.getInteger( 
XML_baseline );
 
 if ( rAttribs.hasAttribute( XML_b ) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - include/oox oox/source

2014-05-11 Thread Muthu Subramanian
 include/oox/drawingml/textbodyproperties.hxx   |1 +
 oox/source/drawingml/textbodyproperties.cxx|4 ++--
 oox/source/drawingml/textbodypropertiescontext.cxx |4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 709f06eb261b3225cd4b56a7efb8e2d591909960
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Mar 26 16:13:08 2014 +0530

n#862510: anchorCtr controls the anchoring as well.

(cherry picked from commit c17eb67460293fbe72ffa8e80cd10743df493afa)
Signed-off-by: Andras Timar andras.ti...@collabora.com

Conflicts:
oox/source/drawingml/textbodypropertiescontext.cxx

Change-Id: Ib244d89a9f7d400b3891d477314cd5f0193552e0

diff --git a/include/oox/drawingml/textbodyproperties.hxx 
b/include/oox/drawingml/textbodyproperties.hxx
index 3fb0684..af68f20 100644
--- a/include/oox/drawingml/textbodyproperties.hxx
+++ b/include/oox/drawingml/textbodyproperties.hxx
@@ -34,6 +34,7 @@ struct TextBodyProperties
 {
 PropertyMap maPropertyMap;
 OptValue sal_Int32moRotation;
+boolmbAnchorCtr;
 OptValue sal_Int32moVert;
 boost::optional sal_Int32 moInsets[4];
 boost::optional sal_Int32 moTextOffX;
diff --git a/oox/source/drawingml/textbodyproperties.cxx 
b/oox/source/drawingml/textbodyproperties.cxx
index 36f39d9..9e53897 100644
--- a/oox/source/drawingml/textbodyproperties.cxx
+++ b/oox/source/drawingml/textbodyproperties.cxx
@@ -80,8 +80,8 @@ void TextBodyProperties::pushRotationAdjustments( sal_Int32 
nRotation )
 // Hack for n#760986
 // TODO: Preferred method would be to have a textbox on top
 // of the shape and the place it according to the (off,ext)
-if( nOff == 0  moTextOffX ) nVal = *moTextOffX;
-if( nOff == 1  moTextOffY ) nVal = *moTextOffY;
+if( nOff == 0  moTextOffX  mbAnchorCtr ) nVal = *moTextOffX;
+if( nOff == 1  moTextOffY  mbAnchorCtr ) nVal = *moTextOffY;
 if( nVal  0 ) nVal = 0;
 
 if( moInsets[i] )
diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx 
b/oox/source/drawingml/textbodypropertiescontext.cxx
index 358db9f..b580be3 100644
--- a/oox/source/drawingml/textbodypropertiescontext.cxx
+++ b/oox/source/drawingml/textbodypropertiescontext.cxx
@@ -56,9 +56,9 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( 
ContextHandler2Helper rPa
 mrTextBodyProp.moInsets[i] = GetCoordinate( sValue );
 }
 
-bool bAnchorCenter = rAttribs.getBool( XML_anchorCtr, false );
+mrTextBodyProp.mbAnchorCtr = rAttribs.getBool( XML_anchorCtr, false );
 if( rAttribs.hasAttribute( XML_anchorCtr ) ) {
-if( bAnchorCenter )
+if( mrTextBodyProp.mbAnchorCtr )
 mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] =
 TextHorizontalAdjust_CENTER;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - include/oox oox/source

2014-04-28 Thread Muthu Subramanian
 include/oox/drawingml/textcharacterproperties.hxx   |2 ++
 oox/source/drawingml/textcharacterproperties.cxx|3 +++
 oox/source/drawingml/textcharacterpropertiescontext.cxx |4 
 3 files changed, 9 insertions(+)

New commits:
commit ce609f477e488e9c701b2bfa893bcf01722d2a01
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Mar 28 17:24:45 2014 +0530

n#870234: Import gradfill for text colors.

Uses the first color from the gradfill list.
(Which is better than plain black!)

(cherry picked from commit cfc76de83e3c0a56abd30a8f3bd7c69d3500d223)
Signed-off-by: Andras Timar andras.ti...@collabora.com

Conflicts:
oox/source/drawingml/textcharacterproperties.cxx
oox/source/drawingml/textcharacterpropertiescontext.cxx

Change-Id: I4c1c0c4b031f3681c95b75b3c0683eb4de95bffb

diff --git a/include/oox/drawingml/textcharacterproperties.hxx 
b/include/oox/drawingml/textcharacterproperties.hxx
index c079015..d2335e1 100644
--- a/include/oox/drawingml/textcharacterproperties.hxx
+++ b/include/oox/drawingml/textcharacterproperties.hxx
@@ -24,6 +24,7 @@
 #include oox/helper/propertymap.hxx
 #include oox/drawingml/color.hxx
 #include oox/drawingml/textfont.hxx
+#include oox/drawingml/fillproperties.hxx
 
 namespace oox { class PropertySet; }
 
@@ -53,6 +54,7 @@ struct TextCharacterProperties
 OptValue bool moItalic;
 OptValue bool moUnderlineLineFollowText;
 OptValue bool moUnderlineFillFollowText;
+GradientFillProperties  maGradientProps; /// Properties for gradient 
text colors
 
 /** Overwrites all members that are explicitly set in rSourceProps. */
 voidassignUsed( const TextCharacterProperties 
rSourceProps );
diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index febb28c..a7be42b 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -60,6 +60,7 @@ void TextCharacterProperties::assignUsed( const 
TextCharacterProperties rSource
 moItalic.assignIfUsed( rSourceProps.moItalic );
 moUnderlineLineFollowText.assignIfUsed( 
rSourceProps.moUnderlineLineFollowText );
 moUnderlineFillFollowText.assignIfUsed( 
rSourceProps.moUnderlineFillFollowText );
+maGradientProps.assignUsed( rSourceProps.maGradientProps );
 }
 
 void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const 
XmlFilterBase rFilter, bool bUseOptional ) const
@@ -93,6 +94,8 @@ void TextCharacterProperties::pushToPropMap( PropertyMap 
rPropMap, const XmlFil
 
 if( maCharColor.isUsed() )
 rPropMap[ PROP_CharColor ] = maCharColor.getColor( 
rFilter.getGraphicHelper() );
+if( maGradientProps.maGradientStops.size()  0 )
+rPropMap[ PROP_CharColor ] = 
maGradientProps.maGradientStops.begin()-second.getColor( 
rFilter.getGraphicHelper() );
 
 if( moLang.has()  !moLang.get().isEmpty() )
 {
diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx 
b/oox/source/drawingml/textcharacterpropertiescontext.cxx
index e166e6d..6887cda 100644
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -132,6 +132,10 @@ ContextHandlerRef 
TextCharacterPropertiesContext::onCreateContext( sal_Int32 aEl
 case A_TOKEN( hlinkClick ): // CT_Hyperlink
 case A_TOKEN( hlinkMouseOver ): // CT_Hyperlink
 return new HyperLinkContext( *this, rAttribs,  
mrTextCharacterProperties.maHyperlinkPropertyMap );
+
+case A_TOKEN( gradFill ):
+return new GradientFillContext( *this, rAttribs, 
mrTextCharacterProperties.maGradientProps );
+
 }
 
 return this;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - oox/source

2014-04-28 Thread Muthu Subramanian
 oox/source/drawingml/transform2dcontext.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 66c01c7ba3882555642ce0c353ea3abf15bda2b5
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Mar 26 16:05:44 2014 +0530

n#862510: Fix text rotation.

Fix breaks document in n#783433 - the one there is
damaged - resaving it using mso 2010 should fix the problem there.

Change-Id: Ib2ee7ab20489d716dc189ac6810d705763a16476
(cherry picked from commit e3e12b1d1e36e1a0d4fc4c6423b584d677693897)
Signed-off-by: Andras Timar andras.ti...@collabora.com

diff --git a/oox/source/drawingml/transform2dcontext.cxx 
b/oox/source/drawingml/transform2dcontext.cxx
index 8b9040c..d3a7c4b 100644
--- a/oox/source/drawingml/transform2dcontext.cxx
+++ b/oox/source/drawingml/transform2dcontext.cxx
@@ -46,7 +46,8 @@ Transform2DContext::Transform2DContext( 
ContextHandler2Helper rParent, const At
 }
 else
 {
-mrShape.getTextBody()-getTextProperties().moRotation = 
rAttribs.getInteger( XML_rot );
+if( rAttribs.hasAttribute( XML_rot ) )
+mrShape.getTextBody()-getTextProperties().moRotation = 
-rAttribs.getInteger( XML_rot ).get();
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/sdi sd/source sd/uiconfig

2014-04-23 Thread Muthu Subramanian
 sd/sdi/_docsh.sdi|   15 ++--
 sd/source/ui/docshell/docshel3.cxx   |  114 +++
 sd/source/ui/docshell/docshell.cxx   |6 +
 sd/uiconfig/sdraw/menubar/menubar.xml|2 
 sd/uiconfig/simpress/menubar/menubar.xml |2 
 5 files changed, 134 insertions(+), 5 deletions(-)

New commits:
commit 0833f4046a1afa77aeed97a131c5325c44be1bb3
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Apr 23 18:33:22 2014 +0530

fdo#64047: n#863021: Add set-all language menu.

Problems:
* Doesn't reset the spell error markers
* Modifies only at object level
* Currently has only setting for 'all text'
* Maybe provide a current slide only option?

Change-Id: I4695423fed3ed9422185b23803eedd12ef434bea

diff --git a/sd/sdi/_docsh.sdi b/sd/sdi/_docsh.sdi
index 075b60a..b087723 100644
--- a/sd/sdi/_docsh.sdi
+++ b/sd/sdi/_docsh.sdi
@@ -32,11 +32,16 @@ interface DrawDocument
 ExecMethod = Execute ;
 StateMethod = GetState ;
 ]
-SID_CHINESE_CONVERSION // ole : ?, status : ?
-[
-ExecMethod = Execute ;
-StateMethod = GetState ;
-]
+SID_CHINESE_CONVERSION // ole : ?, status : ?
+[
+ExecMethod = Execute ;
+StateMethod = GetState ;
+]
+SID_LANGUAGE_STATUS
+[
+ExecMethod = Execute ;
+StateMethod = GetState ;
+]
  // ?
 FID_SEARCH_NOW // ole : ?, status : ?
 [
diff --git a/sd/source/ui/docshell/docshel3.cxx 
b/sd/source/ui/docshell/docshel3.cxx
index d22f50a..cd45b39 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include Window.hxx
 #include DrawDocShell.hxx
 
 #include app.hrc
@@ -28,11 +29,18 @@
 #include svx/svxerr.hxx
 #include svx/dialmgr.hxx
 #include svl/srchitem.hxx
+#include svl/languageoptions.hxx
+#include svtools/langtab.hxx
 #include svx/srchdlg.hxx
 #include sfx2/request.hxx
+#include sfx2/sfxdlg.hxx
+#include vcl/abstdlg.hxx
+#include vcl/window.hxx
 #include svl/style.hxx
 #include svx/drawitem.hxx
 #include editeng/unolingu.hxx
+#include editeng/langitem.hxx
+#include editeng/eeitem.hxx
 #include com/sun/star/i18n/TextConversionOption.hpp
 
 #include strings.hrc
@@ -55,6 +63,68 @@ using namespace ::com::sun::star::uno;
 
 namespace sd {
 
+static void lcl_setLanguageForObj( SdrObject *pObj, LanguageType nLang, bool 
bLanguageNone = false )
+{
+const sal_uInt16 aLangWhichId_EE[3] =
+{
+EE_CHAR_LANGUAGE,
+EE_CHAR_LANGUAGE_CJK,
+EE_CHAR_LANGUAGE_CTL
+};
+
+if( bLanguageNone )
+nLang = LANGUAGE_NONE;
+
+if( nLang != LANGUAGE_DONTKNOW )
+{
+if( nLang == LANGUAGE_NONE )
+{
+for(sal_Int32 n = 0; n  3; n++ )
+pObj-SetMergedItem( SvxLanguageItem( nLang, 
aLangWhichId_EE[n] ) );
+}
+else
+{
+sal_uInt16 nLangWhichId = 0;
+sal_uInt16 nScriptType = 
SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
+switch (nScriptType)
+{
+case SCRIPTTYPE_LATIN :nLangWhichId = EE_CHAR_LANGUAGE; 
break;
+case SCRIPTTYPE_ASIAN :nLangWhichId = 
EE_CHAR_LANGUAGE_CJK; break;
+case SCRIPTTYPE_COMPLEX :  nLangWhichId = 
EE_CHAR_LANGUAGE_CTL; break;
+default:
+OSL_FAIL(unexpected case );
+return;
+}
+pObj-SetMergedItem( SvxLanguageItem( nLang, nLangWhichId ) );
+}
+}
+else// Reset to default
+{
+for( sal_Int32 n = 0; n  3; n++ )
+pObj-ClearMergedItem( aLangWhichId_EE[n] );
+}
+}
+
+
+static void lcl_setLanguage( const SdDrawDocument *pDoc, const OUString 
rLanguage, bool bLanguageNone = false )
+{
+LanguageType nLang = SvtLanguageTable().GetType( rLanguage );
+
+// Do it for SdDrawDocument-SetLanguage as well?
+
+sal_uInt16 nPageCount = pDoc-GetPageCount();   // Pick All Pages
+for( sal_uInt16 nPage = 0; nPage  nPageCount; nPage++ )
+{
+const SdrPage *pPage = pDoc-GetPage( nPage );
+sal_uIntPtr nObjCount = pPage-GetObjCount();
+for( sal_uInt16 nObj = 0; nObj  nObjCount; nObj++ )
+{
+SdrObject *pObj = pPage-GetObj( nObj );
+lcl_setLanguageForObj( pObj, nLang, bLanguageNone );
+}
+}
+}
+
 /**
  * Handles SFX-Requests
  */
@@ -201,6 +271,50 @@ void DrawDocShell::Execute( SfxRequest rReq )
 }
 }
 break;
+case SID_LANGUAGE_STATUS:
+{
+OUString aNewLangTxt;
+SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, SID_LANGUAGE_STATUS , 
false );
+if (pItem)
+aNewLangTxt = pItem-GetValue();
+if (aNewLangTxt

[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - sd/sdi sd/source sd/uiconfig

2014-04-23 Thread Muthu Subramanian
 sd/sdi/_docsh.sdi|   15 ++--
 sd/source/ui/docshell/docshel3.cxx   |  114 +++
 sd/source/ui/docshell/docshell.cxx   |6 +
 sd/uiconfig/sdraw/menubar/menubar.xml|2 
 sd/uiconfig/simpress/menubar/menubar.xml |2 
 5 files changed, 134 insertions(+), 5 deletions(-)

New commits:
commit b80dc0ed7be65c448c7a286454c4304120b4c20e
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Apr 23 22:41:11 2014 +0530

fdo#64047: n#863021: Add set-all language menu.

Problems:
* Doesn't reset the spell error markers
* Modifies only at object level
* Currently has only setting for 'all text'
* Maybe provide a current slide only option?

Change-Id: Idcf8555bab9a5618362dfd2aa8773dd736cbdbb0

diff --git a/sd/sdi/_docsh.sdi b/sd/sdi/_docsh.sdi
index 075b60a..b087723 100644
--- a/sd/sdi/_docsh.sdi
+++ b/sd/sdi/_docsh.sdi
@@ -32,11 +32,16 @@ interface DrawDocument
 ExecMethod = Execute ;
 StateMethod = GetState ;
 ]
-SID_CHINESE_CONVERSION // ole : ?, status : ?
-[
-ExecMethod = Execute ;
-StateMethod = GetState ;
-]
+SID_CHINESE_CONVERSION // ole : ?, status : ?
+[
+ExecMethod = Execute ;
+StateMethod = GetState ;
+]
+SID_LANGUAGE_STATUS
+[
+ExecMethod = Execute ;
+StateMethod = GetState ;
+]
  // ?
 FID_SEARCH_NOW // ole : ?, status : ?
 [
diff --git a/sd/source/ui/docshell/docshel3.cxx 
b/sd/source/ui/docshell/docshel3.cxx
index d6fd37d..cf85086 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -18,6 +18,7 @@
  */
 
 
+#include Window.hxx
 #include DrawDocShell.hxx
 
 #include app.hrc
@@ -29,14 +30,21 @@
 #include svx/svxerr.hxx
 #include svx/dialmgr.hxx
 #include svl/srchitem.hxx
+#include svl/languageoptions.hxx
+#include svtools/langtab.hxx
 #include svx/srchdlg.hxx
 #ifdef _OUTLINER_HXX
 #include editeng/outliner.hxx
 #endif
 #include sfx2/request.hxx
+#include sfx2/sfxdlg.hxx
+#include vcl/abstdlg.hxx
+#include vcl/window.hxx
 #include svl/style.hxx
 #include svx/drawitem.hxx
 #include editeng/unolingu.hxx
+#include editeng/langitem.hxx
+#include editeng/eeitem.hxx
 #include com/sun/star/i18n/TextConversionOption.hpp
 
 
@@ -60,6 +68,68 @@ using namespace ::com::sun::star::uno;
 
 namespace sd {
 
+static void lcl_setLanguageForObj( SdrObject *pObj, LanguageType nLang, bool 
bLanguageNone = false )
+{
+const sal_uInt16 aLangWhichId_EE[3] =
+{
+EE_CHAR_LANGUAGE,
+EE_CHAR_LANGUAGE_CJK,
+EE_CHAR_LANGUAGE_CTL
+};
+
+if( bLanguageNone )
+nLang = LANGUAGE_NONE;
+
+if( nLang != LANGUAGE_DONTKNOW )
+{
+if( nLang == LANGUAGE_NONE )
+{
+for(sal_Int32 n = 0; n  3; n++ )
+pObj-SetMergedItem( SvxLanguageItem( nLang, 
aLangWhichId_EE[n] ) );
+}
+else
+{
+sal_uInt16 nLangWhichId = 0;
+sal_uInt16 nScriptType = 
SvtLanguageOptions::GetScriptTypeOfLanguage( nLang );
+switch (nScriptType)
+{
+case SCRIPTTYPE_LATIN :nLangWhichId = EE_CHAR_LANGUAGE; 
break;
+case SCRIPTTYPE_ASIAN :nLangWhichId = 
EE_CHAR_LANGUAGE_CJK; break;
+case SCRIPTTYPE_COMPLEX :  nLangWhichId = 
EE_CHAR_LANGUAGE_CTL; break;
+default:
+OSL_FAIL(unexpected case );
+return;
+}
+pObj-SetMergedItem( SvxLanguageItem( nLang, nLangWhichId ) );
+}
+}
+else// Reset to default
+{
+for( sal_Int32 n = 0; n  3; n++ )
+pObj-ClearMergedItem( aLangWhichId_EE[n] );
+}
+}
+
+
+static void lcl_setLanguage( const SdDrawDocument *pDoc, const OUString 
rLanguage, bool bLanguageNone = false )
+{
+LanguageType nLang = SvtLanguageTable().GetType( rLanguage );
+
+// Do it for SdDrawDocument-SetLanguage as well?
+
+sal_uInt16 nPageCount = pDoc-GetPageCount();   // Pick All Pages
+for( sal_uInt16 nPage = 0; nPage  nPageCount; nPage++ )
+{
+const SdrPage *pPage = pDoc-GetPage( nPage );
+sal_uIntPtr nObjCount = pPage-GetObjCount();
+for( sal_uInt16 nObj = 0; nObj  nObjCount; nObj++ )
+{
+SdrObject *pObj = pPage-GetObj( nObj );
+lcl_setLanguageForObj( pObj, nLang, bLanguageNone );
+}
+}
+}
+
 /*
 |*
 |* SFX-Requests bearbeiten
@@ -209,6 +279,50 @@ void DrawDocShell::Execute( SfxRequest rReq )
 }
 }
 break;
+case SID_LANGUAGE_STATUS:
+{
+OUString aNewLangTxt;
+SFX_REQUEST_ARG( rReq, pItem, SfxStringItem, SID_LANGUAGE_STATUS , 
false );
+if (pItem)
+aNewLangTxt = pItem-GetValue

[Libreoffice-commits] core.git: sd/source svl/source

2014-04-04 Thread Muthu Subramanian
 sd/source/core/stlpool.cxx  |2 ++
 svl/source/items/IndexedStyleSheets.cxx |4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit cb1384b324580f23f652a1d8b922e94a7a212f1e
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Apr 4 12:10:01 2014 +0530

cp#154: Avoid crashing.

Change-Id: Iedafa35cfedce1d56468774fcb6bbfa8e42612df

diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 8a7cc23..19f3031 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -655,6 +655,8 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool 
rSourcePool, SfxStyleFamily
  it != aSheetsWithFamily.end(); ++it )
 {
 rtl::Reference SfxStyleSheetBase  xSheet = 
GetStyleSheetByPositionInIndex( *it );
+if( !xSheet.is() )
+continue;
 rtl::OUString aName( xSheet-GetName() );
 
 // now check whether we already have a sheet with the same name
diff --git a/svl/source/items/IndexedStyleSheets.cxx 
b/svl/source/items/IndexedStyleSheets.cxx
index ca45b53..087f817 100644
--- a/svl/source/items/IndexedStyleSheets.cxx
+++ b/svl/source/items/IndexedStyleSheets.cxx
@@ -182,7 +182,9 @@ IndexedStyleSheets::HasStyleSheet(rtl::Reference 
SfxStyleSheetBase  style) con
 rtl::Reference SfxStyleSheetBase 
 IndexedStyleSheets::GetStyleSheetByPosition(unsigned pos)
 {
-return mStyleSheets.at(pos);
+if( pos  mStyleSheets.size() )
+return mStyleSheets.at(pos);
+return NULL;
 }
 
 void
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - sd/qa

2014-04-01 Thread Muthu Subramanian
 sd/qa/unit/import-tests.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit e4d78e1dd48f3cc80d64b8bb08b2f5f1cd7d29a5
Author: Muthu Subramanian sumu...@collabora.com
Date:   Tue Apr 1 16:53:37 2014 +0530

Disable unit test.

(Export framework is not available on the branch)

Change-Id: I3e432625008aab725d96796a5ac26c10ed63afa2

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 518b022..df99e92 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -213,6 +213,7 @@ void SdFiltersTest::testFdo64512()
 
 void SdFiltersTest::testFdo71961()
 {
+#if 0 // FIXME
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/fdo71961.odp));
 CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
 CPPUNIT_ASSERT_MESSAGE( not in destruction, 
!xDocShRef-IsInDestruction() );
@@ -242,6 +243,7 @@ void SdFiltersTest::testFdo71961()
 CPPUNIT_ASSERT_MESSAGE( no text object, pTxtObj != NULL);
 CPPUNIT_ASSERT_EQUAL( OUString( Custom shape wrapped text ), 
pTxtObj-GetOutlinerParaObject()-GetTextObject().GetText(0));
 CPPUNIT_ASSERT_EQUAL( true, (static_castconst 
SdrTextWordWrapItem(pTxtObj-GetMergedItem(SDRATTR_TEXT_WORDWRAP))).GetValue());
+#endif
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - 3 commits - oox/inc oox/source

2014-03-31 Thread Muthu Subramanian
 oox/inc/oox/drawingml/textbodyproperties.hxx|1 +
 oox/inc/oox/drawingml/textcharacterproperties.hxx   |2 ++
 oox/source/drawingml/textbodyproperties.cxx |4 ++--
 oox/source/drawingml/textbodypropertiescontext.cxx  |4 ++--
 oox/source/drawingml/textcharacterproperties.cxx|3 +++
 oox/source/drawingml/textcharacterpropertiescontext.cxx |4 
 oox/source/drawingml/transform2dcontext.cxx |3 ++-
 7 files changed, 16 insertions(+), 5 deletions(-)

New commits:
commit e05d649cbbafe9b22176a49fc316069e89926e70
Author: Muthu Subramanian sumu...@collabora.com
Date:   Mon Mar 31 15:13:51 2014 +0530

n#870234: Import gradfill for text colors.

Uses the first color from the gradfill list.
(Which is better than plain black!)

Ported from: cfc76de83e3c0a56abd30a8f3bd7c69d3500d223

Change-Id: I57a3a54a8053a8ce320acbd02940f10941165d1c

diff --git a/oox/inc/oox/drawingml/textcharacterproperties.hxx 
b/oox/inc/oox/drawingml/textcharacterproperties.hxx
index 1073fa6..35943da 100644
--- a/oox/inc/oox/drawingml/textcharacterproperties.hxx
+++ b/oox/inc/oox/drawingml/textcharacterproperties.hxx
@@ -24,6 +24,7 @@
 #include oox/helper/propertymap.hxx
 #include oox/drawingml/color.hxx
 #include oox/drawingml/textfont.hxx
+#include oox/drawingml/fillproperties.hxx
 
 namespace oox { class PropertySet; }
 
@@ -53,6 +54,7 @@ struct TextCharacterProperties
 OptValue bool moItalic;
 OptValue bool moUnderlineLineFollowText;
 OptValue bool moUnderlineFillFollowText;
+GradientFillProperties  maGradientProps; /// Properties for gradient 
text colors
 
 /** Overwrites all members that are explicitly set in rSourceProps. */
 voidassignUsed( const TextCharacterProperties 
rSourceProps );
diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index bc23204..4800630 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -60,6 +60,7 @@ void TextCharacterProperties::assignUsed( const 
TextCharacterProperties rSource
 moItalic.assignIfUsed( rSourceProps.moItalic );
 moUnderlineLineFollowText.assignIfUsed( 
rSourceProps.moUnderlineLineFollowText );
 moUnderlineFillFollowText.assignIfUsed( 
rSourceProps.moUnderlineFillFollowText );
+maGradientProps.assignUsed( rSourceProps.maGradientProps );
 }
 
 void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const 
XmlFilterBase rFilter, bool bUseOptional ) const
@@ -93,6 +94,8 @@ void TextCharacterProperties::pushToPropMap( PropertyMap 
rPropMap, const XmlFil
 
 if( maCharColor.isUsed() )
 rPropMap[ PROP_CharColor ] = maCharColor.getColor( 
rFilter.getGraphicHelper() );
+if( maGradientProps.maGradientStops.size()  0 )
+rPropMap[ PROP_CharColor ] = 
maGradientProps.maGradientStops.begin()-second.getColor( 
rFilter.getGraphicHelper() );
 
 if( moLang.has()  !moLang.get().isEmpty() )
 {
diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx 
b/oox/source/drawingml/textcharacterpropertiescontext.cxx
index 13af2cd..ec37a07 100644
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -161,6 +161,10 @@ Reference XFastContextHandler  
TextCharacterPropertiesContext::createFastChild
 case A_TOKEN( hlinkMouseOver ): // CT_Hyperlink
 xRet.set( new HyperLinkContext( *this, xAttributes,  
mrTextCharacterProperties.maHyperlinkPropertyMap ) );
 break;
+
+case A_TOKEN( gradFill ):
+xRet.set( new GradientFillContext( *this, xAttributes, 
mrTextCharacterProperties.maGradientProps ) );
+break;
 }
 if( !xRet.is() )
 xRet.set( this );
commit 193ecefaef948272695b0dd0a42a3bcc3256f631
Author: Muthu Subramanian sumu...@collabora.com
Date:   Mon Mar 31 15:04:31 2014 +0530

n#862510: anchorCtr controls the anchoring as well.

Ported from: c17eb67460293fbe72ffa8e80cd10743df493afa

Change-Id: I7b5885c3ac9ec30970bdb8b2c9318dc181dda5bd

diff --git a/oox/inc/oox/drawingml/textbodyproperties.hxx 
b/oox/inc/oox/drawingml/textbodyproperties.hxx
index f8800be..c026b4e 100644
--- a/oox/inc/oox/drawingml/textbodyproperties.hxx
+++ b/oox/inc/oox/drawingml/textbodyproperties.hxx
@@ -34,6 +34,7 @@ struct TextBodyProperties
 {
 PropertyMap maPropertyMap;
 OptValue sal_Int32moRotation;
+boolmbAnchorCtr;
 OptValue sal_Int32moVert;
 boost::optional sal_Int32 moInsets[4];
 boost::optional sal_Int32 moTextOffX;
diff --git a/oox/source/drawingml/textbodyproperties.cxx 
b/oox/source/drawingml/textbodyproperties.cxx
index 36f39d9

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - 3 commits - include/oox oox/source

2014-03-31 Thread Muthu Subramanian
 include/oox/drawingml/textbodyproperties.hxx|1 +
 include/oox/drawingml/textcharacterproperties.hxx   |2 ++
 oox/source/drawingml/textbodyproperties.cxx |4 ++--
 oox/source/drawingml/textbodypropertiescontext.cxx  |4 ++--
 oox/source/drawingml/textcharacterproperties.cxx|3 +++
 oox/source/drawingml/textcharacterpropertiescontext.cxx |4 
 oox/source/drawingml/transform2dcontext.cxx |3 ++-
 7 files changed, 16 insertions(+), 5 deletions(-)

New commits:
commit 426617d4c8e8aacf5487752ddd8e5090e5bb1dd7
Author: Muthu Subramanian sumu...@collabora.com
Date:   Mon Mar 31 15:36:51 2014 +0530

n#870234: Import gradfill for text colors.

Uses the first color from the gradfill list.
(Which is better than plain black!)

Ported from: cfc76de83e3c0a56abd30a8f3bd7c69d3500d223

Change-Id: I772274634c0e3ab13b7b03a5b676138999a4439a

diff --git a/include/oox/drawingml/textcharacterproperties.hxx 
b/include/oox/drawingml/textcharacterproperties.hxx
index 2e519c9..00ac8e7 100644
--- a/include/oox/drawingml/textcharacterproperties.hxx
+++ b/include/oox/drawingml/textcharacterproperties.hxx
@@ -24,6 +24,7 @@
 #include oox/helper/propertymap.hxx
 #include oox/drawingml/color.hxx
 #include oox/drawingml/textfont.hxx
+#include oox/drawingml/fillproperties.hxx
 
 namespace oox { class PropertySet; }
 
@@ -53,6 +54,7 @@ struct TextCharacterProperties
 OptValue bool moItalic;
 OptValue bool moUnderlineLineFollowText;
 OptValue bool moUnderlineFillFollowText;
+GradientFillProperties  maGradientProps; /// Properties for gradient 
text colors
 
 /** Overwrites all members that are explicitly set in rSourceProps. */
 voidassignUsed( const TextCharacterProperties 
rSourceProps );
diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index a5fe786..bbc9ca9 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -59,6 +59,7 @@ void TextCharacterProperties::assignUsed( const 
TextCharacterProperties rSource
 moItalic.assignIfUsed( rSourceProps.moItalic );
 moUnderlineLineFollowText.assignIfUsed( 
rSourceProps.moUnderlineLineFollowText );
 moUnderlineFillFollowText.assignIfUsed( 
rSourceProps.moUnderlineFillFollowText );
+maGradientProps.assignUsed( rSourceProps.maGradientProps );
 }
 
 void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const 
XmlFilterBase rFilter, bool bUseOptional ) const
@@ -92,6 +93,8 @@ void TextCharacterProperties::pushToPropMap( PropertyMap 
rPropMap, const XmlFil
 
 if( maCharColor.isUsed() )
 rPropMap[ PROP_CharColor ] = maCharColor.getColor( 
rFilter.getGraphicHelper() );
+if( maGradientProps.maGradientStops.size()  0 )
+rPropMap[ PROP_CharColor ] = 
maGradientProps.maGradientStops.begin()-second.getColor( 
rFilter.getGraphicHelper() );
 
 if( moLang.has()  !moLang.get().isEmpty() )
 {
diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx 
b/oox/source/drawingml/textcharacterpropertiescontext.cxx
index 6835149..f187a80 100644
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -151,6 +151,10 @@ Reference XFastContextHandler  
TextCharacterPropertiesContext::createFastChild
 case A_TOKEN( hlinkMouseOver ): // CT_Hyperlink
 xRet.set( new HyperLinkContext( *this, xAttributes,  
mrTextCharacterProperties.maHyperlinkPropertyMap ) );
 break;
+
+case A_TOKEN( gradFill ):
+xRet.set( new GradientFillContext( *this, xAttributes, 
mrTextCharacterProperties.maGradientProps ) );
+break;
 }
 if( !xRet.is() )
 xRet.set( this );
commit 855aaddc1926df00e680afb42983ffb948e212c9
Author: Muthu Subramanian sumu...@collabora.com
Date:   Mon Mar 31 15:04:31 2014 +0530

n#862510: anchorCtr controls the anchoring as well.

Ported from: c17eb67460293fbe72ffa8e80cd10743df493afa

Change-Id: I7b5885c3ac9ec30970bdb8b2c9318dc181dda5bd

diff --git a/include/oox/drawingml/textbodyproperties.hxx 
b/include/oox/drawingml/textbodyproperties.hxx
index f8800be..c026b4e 100644
--- a/include/oox/drawingml/textbodyproperties.hxx
+++ b/include/oox/drawingml/textbodyproperties.hxx
@@ -34,6 +34,7 @@ struct TextBodyProperties
 {
 PropertyMap maPropertyMap;
 OptValue sal_Int32moRotation;
+boolmbAnchorCtr;
 OptValue sal_Int32moVert;
 boost::optional sal_Int32 moInsets[4];
 boost::optional sal_Int32 moTextOffX;
diff --git a/oox/source/drawingml/textbodyproperties.cxx 
b/oox/source/drawingml/textbodyproperties.cxx
index 36f39d9

[Libreoffice-commits] core.git: 2 commits - include/oox oox/source sd/qa

2014-03-28 Thread Muthu Subramanian
 include/oox/drawingml/textcharacterproperties.hxx   |2 +
 oox/source/drawingml/textcharacterproperties.cxx|3 +
 oox/source/drawingml/textcharacterpropertiescontext.cxx |4 ++
 sd/qa/unit/data/pptx/n862510_4.pptx |binary
 sd/qa/unit/import-tests.cxx |   27 
 5 files changed, 36 insertions(+)

New commits:
commit 186b96dcfbd0ed87ef414246555e9f953927d692
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Mar 28 17:29:37 2014 +0530

Add unit test for text gradfill import.

Change-Id: I803238fd21d1c73aae8146966a5e62e62ad48c5c

diff --git a/sd/qa/unit/data/pptx/n862510_4.pptx 
b/sd/qa/unit/data/pptx/n862510_4.pptx
new file mode 100644
index 000..0a461ee
Binary files /dev/null and b/sd/qa/unit/data/pptx/n862510_4.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 81f6b8a..462e2ed 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -66,6 +66,7 @@ public:
 void testN862510_1();
 void testN862510_2();
 void testN862510_3();
+void testN862510_4();
 void testFdo71961();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
@@ -87,6 +88,7 @@ public:
 CPPUNIT_TEST(testN862510_1);
 CPPUNIT_TEST(testN862510_2);
 CPPUNIT_TEST(testN862510_3);
+CPPUNIT_TEST(testN862510_4);
 CPPUNIT_TEST(testFdo71961);
 
 CPPUNIT_TEST_SUITE_END();
@@ -308,6 +310,31 @@ void SdFiltersTest::testN862510_3()
 }
 }
 
+void SdFiltersTest::testN862510_4()
+{
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n862510_4.pptx) );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( in destruction, !xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage( 1 );
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+{
+std::vectorEECharAttrib rLst;
+SdrObject *pObj = pPage-GetObj( 0 );
+SdrTextObj *pTxtObj = dynamic_castSdrTextObj *( pObj );
+CPPUNIT_ASSERT( pTxtObj );
+const EditTextObject aEdit = 
pTxtObj-GetOutlinerParaObject()-GetTextObject();
+aEdit.GetCharAttribs( 0, rLst );
+for( std::vectorEECharAttrib::reverse_iterator it = rLst.rbegin(); 
it != rLst.rend(); ++it )
+{
+const SvxColorItem *pC = dynamic_castconst SvxColorItem *( 
(*it).pAttr );
+CPPUNIT_ASSERT_MESSAGE( gradfill for text color not handled!, !( 
pC  pC-GetValue().GetColor() == 0 ) );
+}
+}
+}
+
 void SdFiltersTest::testN828390()
 {
 bool bPassed = false;
commit cfc76de83e3c0a56abd30a8f3bd7c69d3500d223
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Mar 28 17:24:45 2014 +0530

n#870234: Import gradfill for text colors.

Uses the first color from the gradfill list.
(Which is better than plain black!)

Change-Id: I4c1c0c4b031f3681c95b75b3c0683eb4de95bffb

diff --git a/include/oox/drawingml/textcharacterproperties.hxx 
b/include/oox/drawingml/textcharacterproperties.hxx
index e51937f..4162c23 100644
--- a/include/oox/drawingml/textcharacterproperties.hxx
+++ b/include/oox/drawingml/textcharacterproperties.hxx
@@ -24,6 +24,7 @@
 #include oox/helper/propertymap.hxx
 #include oox/drawingml/color.hxx
 #include oox/drawingml/textfont.hxx
+#include oox/drawingml/fillproperties.hxx
 
 namespace oox { class PropertySet; }
 
@@ -56,6 +57,7 @@ struct TextCharacterProperties
 OptValue bool moItalic;
 OptValue bool moUnderlineLineFollowText;
 OptValue bool moUnderlineFillFollowText;
+GradientFillProperties  maGradientProps; /// Properties for gradient 
text colors
 
 std::vectorcss::beans::PropertyValue maTextEffectsProperties;
 
diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index 6f64f2a..5f7cf4f 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -65,6 +65,7 @@ void TextCharacterProperties::assignUsed( const 
TextCharacterProperties rSource
 moUnderlineFillFollowText.assignIfUsed( 
rSourceProps.moUnderlineFillFollowText );
 
 maTextEffectsProperties = rSourceProps.maTextEffectsProperties;
+maGradientProps.assignUsed( rSourceProps.maGradientProps );
 }
 
 void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const 
XmlFilterBase rFilter, bool bUseOptional ) const
@@ -108,6 +109,8 @@ void TextCharacterProperties::pushToPropMap( PropertyMap 
rPropMap, const XmlFil
 
 if( maCharColor.isUsed() )
 rPropMap.setProperty( PROP_CharColor, maCharColor.getColor( 
rFilter.getGraphicHelper() ));
+if( maGradientProps.maGradientStops.size()  0 )
+rPropMap[ PROP_CharColor ] = 
maGradientProps.maGradientStops.begin()-second.getColor

[Libreoffice-commits] core.git: oox/source

2014-03-28 Thread Muthu Subramanian
 oox/source/drawingml/textcharacterproperties.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7af3170c6bf1480610f3db46d2354769d42c43a4
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Mar 28 17:44:55 2014 +0530

Use setProperty instead of  operator

Change-Id: I2c553a41de430c200445d8c8e8300af13d0eaea0

diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index 5f7cf4f..3ade363 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -110,7 +110,7 @@ void TextCharacterProperties::pushToPropMap( PropertyMap 
rPropMap, const XmlFil
 if( maCharColor.isUsed() )
 rPropMap.setProperty( PROP_CharColor, maCharColor.getColor( 
rFilter.getGraphicHelper() ));
 if( maGradientProps.maGradientStops.size()  0 )
-rPropMap[ PROP_CharColor ] = 
maGradientProps.maGradientStops.begin()-second.getColor( 
rFilter.getGraphicHelper() );
+rPropMap.setProperty( PROP_CharColor, 
maGradientProps.maGradientStops.begin()-second.getColor( 
rFilter.getGraphicHelper() ));
 
 if( moLang.has()  !moLang.get().isEmpty() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 5 commits - include/oox oox/source sd/qa

2014-03-27 Thread Muthu Subramanian
 include/oox/drawingml/textbodyproperties.hxx   |1 
 oox/source/drawingml/textbodyproperties.cxx|4 -
 oox/source/drawingml/textbodypropertiescontext.cxx |   10 +---
 oox/source/drawingml/transform2dcontext.cxx|3 -
 sd/qa/unit/data/pptx/n862510_2.pptx|binary
 sd/qa/unit/data/pptx/n862510_3.pptx|binary
 sd/qa/unit/import-tests.cxx|   44 +
 7 files changed, 53 insertions(+), 9 deletions(-)

New commits:
commit b566aa7f16bf5ec389f27f4b7a9c9872fffc3d69
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Mar 26 16:28:23 2014 +0530

Add unit test for left spacing (anchorCtr)

Change-Id: I8fa347497c9509285c5f0422c618efcb360dbd34

diff --git a/sd/qa/unit/data/pptx/n862510_3.pptx 
b/sd/qa/unit/data/pptx/n862510_3.pptx
new file mode 100644
index 000..cf0b7b5
Binary files /dev/null and b/sd/qa/unit/data/pptx/n862510_3.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 30e5910..382fe69 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -19,6 +19,7 @@
 #include editeng/fontitem.hxx
 #include editeng/wghtitem.hxx
 #include editeng/numitem.hxx
+#include editeng/lrspitem.hxx
 #include rsc/rscsfx.hxx
 
 #include svx/svdotext.hxx
@@ -64,6 +65,7 @@ public:
 void testStrictOOXML();
 void testN862510_1();
 void testN862510_2();
+void testN862510_3();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
 CPPUNIT_TEST(testDocumentLayout);
@@ -83,6 +85,7 @@ public:
 CPPUNIT_TEST(testStrictOOXML);
 CPPUNIT_TEST(testN862510_1);
 CPPUNIT_TEST(testN862510_2);
+CPPUNIT_TEST(testN862510_3);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -284,6 +287,25 @@ void SdFiltersTest::testN862510_2()
 }
 }
 
+void SdFiltersTest::testN862510_3()
+{
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n862510_3.pptx) );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( in destruction, !xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage( 1 );
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+{
+SdrObjGroup *pGrpObj = dynamic_castSdrObjGroup *( pPage-GetObj( 1 ) 
);
+CPPUNIT_ASSERT( pGrpObj );
+SdrObjCustomShape *pObj = dynamic_castSdrObjCustomShape *( 
pGrpObj-GetSubList()-GetObj( 0 ) );
+CPPUNIT_ASSERT( pObj );
+CPPUNIT_ASSERT_MESSAGE( Left Spacing is wrong! check attribute 
anchorCtr, pObj-GetTextLeftDistance()  30);
+}
+}
+
 void SdFiltersTest::testN828390()
 {
 bool bPassed = false;
commit 31b8ce1153bb513613cc7b9cc755b2b4abe4852c
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Mar 26 16:26:08 2014 +0530

Add unit test for text rotation.

Change-Id: Iba4e002c461f00807f277e6032afcdaaf25ea4a2

diff --git a/sd/qa/unit/data/pptx/n862510_2.pptx 
b/sd/qa/unit/data/pptx/n862510_2.pptx
new file mode 100644
index 000..b46cea5
Binary files /dev/null and b/sd/qa/unit/data/pptx/n862510_2.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 8ea16b5..30e5910 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -23,6 +23,7 @@
 
 #include svx/svdotext.hxx
 #include svx/svdoashp.hxx
+#include svx/svdogrp.hxx
 #include animations/animationnodehelper.hxx
 
 #include com/sun/star/drawing/XDrawPage.hpp
@@ -62,6 +63,7 @@ public:
 void testFdo72998();
 void testStrictOOXML();
 void testN862510_1();
+void testN862510_2();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
 CPPUNIT_TEST(testDocumentLayout);
@@ -80,6 +82,7 @@ public:
 CPPUNIT_TEST(testFdo72998);
 CPPUNIT_TEST(testStrictOOXML);
 CPPUNIT_TEST(testN862510_1);
+CPPUNIT_TEST(testN862510_2);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -262,6 +265,25 @@ void SdFiltersTest::testN862510_1()
 }
 }
 
+void SdFiltersTest::testN862510_2()
+{
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n862510_2.pptx) );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( in destruction, !xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+{
+SdrObjGroup *pGrpObj = dynamic_castSdrObjGroup *( pPage-GetObj( 1 ) 
);
+CPPUNIT_ASSERT( pGrpObj );
+SdrObjCustomShape *pObj = dynamic_castSdrObjCustomShape *( 
pGrpObj-GetSubList()-GetObj( 0 ) );
+CPPUNIT_ASSERT( pObj );
+CPPUNIT_ASSERT_MESSAGE( Wrong Text Rotation!, 
pObj-GetExtraTextRotation( true ) == 90 );
+}
+}
+
 void SdFiltersTest::testN828390()
 {
 bool bPassed = false;
commit

[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - include/oox oox/source

2014-03-19 Thread Muthu Subramanian
 include/oox/drawingml/shapepropertymap.hxx |3 +++
 oox/source/drawingml/fillproperties.cxx|4 +++-
 oox/source/drawingml/shapepropertymap.cxx  |   16 +++-
 3 files changed, 21 insertions(+), 2 deletions(-)

New commits:
commit 012de8a0056bd75299ef97d03a95905c272cc26c
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Mar 12 16:44:10 2014 +0530

n#821567: Import PPTX background images with table-name.

Ported from 2ec4d410de5bd98527336a9dc49abb76656373df

Change-Id: I50693f7fea8de4f1d3668378aa2334539dd80c42
Reviewed-on: https://gerrit.libreoffice.org/8546
Reviewed-by: Andras Timar andras.ti...@collabora.com
Tested-by: Andras Timar andras.ti...@collabora.com

diff --git a/include/oox/drawingml/shapepropertymap.hxx 
b/include/oox/drawingml/shapepropertymap.hxx
index 8018752..a18276d 100644
--- a/include/oox/drawingml/shapepropertymap.hxx
+++ b/include/oox/drawingml/shapepropertymap.hxx
@@ -63,6 +63,7 @@ enum ShapePropertyId
 SHAPEPROP_FillBitmapRectanglePoint,
 SHAPEPROP_FillHatch,
 SHAPEPROP_ShadowXDistance,
+SHAPEPROP_FillBitmapNameFromUrl,
 SHAPEPROP_END
 };
 
@@ -128,6 +129,8 @@ private:
 boolsetGradientTrans( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue );
 /** Sets an explicit fill bitmap URL, or creates a named fill bitmap URL. 
*/
 boolsetFillBitmapUrl( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue );
+/** Sets an explicit fill bitmap URL and pushes the name to FillBitmapName 
*/
+boolsetFillBitmapNameFromUrl( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue );
 
 // not implemented, to prevent implicit conversion from enum to int
 ::com::sun::star::uno::Any operator[]( ShapePropertyId ePropId );
diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index d1d097f..389ef8a 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -376,7 +376,9 @@ void FillProperties::pushToPropMap( ShapePropertyMap 
rPropMap,
 
 OUString aGraphicUrl = rGraphicHelper.createGraphicObject( 
maBlipProps.mxGraphic );
 // push bitmap or named bitmap to property map
-if( !aGraphicUrl.isEmpty()  rPropMap.setProperty( 
SHAPEPROP_FillBitmapUrl, aGraphicUrl ) )
+if( !aGraphicUrl.isEmpty()  rPropMap.supportsProperty( 
SHAPEPROP_FillBitmapNameFromUrl )  rPropMap.setProperty( 
SHAPEPROP_FillBitmapNameFromUrl, aGraphicUrl ) )
+eFillStyle = FillStyle_BITMAP;
+else if( !aGraphicUrl.isEmpty()  rPropMap.setProperty( 
SHAPEPROP_FillBitmapUrl, aGraphicUrl ) )
 eFillStyle = FillStyle_BITMAP;
 
 // set other bitmap properties, if bitmap has been 
inserted into the map
diff --git a/oox/source/drawingml/shapepropertymap.cxx 
b/oox/source/drawingml/shapepropertymap.cxx
index ff02dd5..fe985db 100644
--- a/oox/source/drawingml/shapepropertymap.cxx
+++ b/oox/source/drawingml/shapepropertymap.cxx
@@ -47,7 +47,8 @@ static const sal_Int32 spnDefaultShapeIds[ SHAPEPROP_END ] =
 PROP_FillBitmapURL, PROP_FillBitmapMode, PROP_FillBitmapSizeX, 
PROP_FillBitmapSizeY,
 PROP_FillBitmapPositionOffsetX, PROP_FillBitmapPositionOffsetY, 
PROP_FillBitmapRectanglePoint,
 PROP_FillHatch,
-PROP_ShadowXDistance
+PROP_ShadowXDistance,
+PROP_FillBitmapName
 };
 
 } // namespace
@@ -108,6 +109,9 @@ bool ShapePropertyMap::setAnyProperty( ShapePropertyId 
ePropId, const Any rValu
 case SHAPEPROP_FillBitmapUrl:
 return setFillBitmapUrl( nPropId, rValue );
 
+case SHAPEPROP_FillBitmapNameFromUrl:
+return setFillBitmapNameFromUrl( nPropId, rValue );
+
 default:;   // suppress compiler warnings
 }
 
@@ -195,6 +199,16 @@ bool ShapePropertyMap::setFillBitmapUrl( sal_Int32 
nPropId, const Any rValue )
 return false;
 }
 
+bool ShapePropertyMap::setFillBitmapNameFromUrl( sal_Int32 /*nPropId*/, const 
Any rValue )
+{
+if( rValue.has OUString () )
+{
+OUString aBitmapUrlName = mrModelObjHelper.insertFillBitmapUrl( 
rValue.get OUString () );
+return !aBitmapUrlName.isEmpty()  setProperty( PROP_FillBitmapName, 
aBitmapUrlName );
+}
+return false;
+}
+
 // 
 
 } // namespace drawingml
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/qa

2014-03-17 Thread Muthu Subramanian
 sd/qa/unit/data/pptx/n862510_1.pptx |binary
 sd/qa/unit/import-tests.cxx |   27 +++
 2 files changed, 27 insertions(+)

New commits:
commit 2796aa203c563d45b12dd395a963724a1c0e42ed
Author: Muthu Subramanian sumu...@collabora.com
Date:   Mon Mar 17 14:06:34 2014 +0530

n#862510: Adding unit test case for baseline=0

Change-Id: Ia8281ddc31b653ecf47c6bb5030db74de75b2e8d

diff --git a/sd/qa/unit/data/pptx/n862510_1.pptx 
b/sd/qa/unit/data/pptx/n862510_1.pptx
new file mode 100644
index 000..2a16a4b
Binary files /dev/null and b/sd/qa/unit/data/pptx/n862510_1.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index eb3b56d..8ea16b5 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -61,6 +61,7 @@ public:
 void testFdo68594();
 void testFdo72998();
 void testStrictOOXML();
+void testN862510_1();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
 CPPUNIT_TEST(testDocumentLayout);
@@ -78,6 +79,7 @@ public:
 CPPUNIT_TEST(testFdo68594);
 CPPUNIT_TEST(testFdo72998);
 CPPUNIT_TEST(testStrictOOXML);
+CPPUNIT_TEST(testN862510_1);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -235,6 +237,31 @@ void SdFiltersTest::testN821567()
 CPPUNIT_ASSERT_MESSAGE(Slide Background is not exported properly, 
!bgImage.isEmpty());
 }
 
+void SdFiltersTest::testN862510_1()
+{
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n862510_1.pptx) );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( in destruction, !xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+{
+std::vectorEECharAttrib rLst;
+SdrObject *pObj = pPage-GetObj( 0 );
+SdrTextObj *pTxtObj = dynamic_castSdrTextObj *( pObj );
+CPPUNIT_ASSERT( pTxtObj );
+const EditTextObject aEdit = 
pTxtObj-GetOutlinerParaObject()-GetTextObject();
+aEdit.GetCharAttribs( 0, rLst );
+for( std::vectorEECharAttrib::reverse_iterator it = rLst.rbegin(); 
it!=rLst.rend(); ++it)
+{
+const SvxEscapementItem *pFontEscapement = dynamic_castconst 
SvxEscapementItem *( (*it).pAttr );
+CPPUNIT_ASSERT_MESSAGE( Baseline attribute not handled properly, 
!( pFontEscapement  pFontEscapement-GetProp() != 100 ) );
+}
+}
+}
+
 void SdFiltersTest::testN828390()
 {
 bool bPassed = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - include/oox oox/source svx/source

2014-03-17 Thread Muthu Subramanian
 include/oox/drawingml/shapepropertymap.hxx |3 +++
 oox/source/drawingml/fillproperties.cxx|4 +++-
 oox/source/drawingml/shapepropertymap.cxx  |   16 +++-
 svx/source/xoutdev/xattrbmp.cxx|4 +++-
 4 files changed, 24 insertions(+), 3 deletions(-)

New commits:
commit 43dae523edd6aede5009d72be73e3627726903f9
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Mar 12 16:29:56 2014 +0530

n#821567: Import PPTX background images with table-name.

Ported from 2ec4d410de5bd98527336a9dc49abb76656373df

Change-Id: I19cefa3097d8a7c2da057089efb52ec8fd45b2b0
Reviewed-on: https://gerrit.libreoffice.org/8544
Reviewed-by: Andras Timar andras.ti...@collabora.com
Tested-by: Andras Timar andras.ti...@collabora.com

diff --git a/include/oox/drawingml/shapepropertymap.hxx 
b/include/oox/drawingml/shapepropertymap.hxx
index 6a6628b..f2dc8ec 100644
--- a/include/oox/drawingml/shapepropertymap.hxx
+++ b/include/oox/drawingml/shapepropertymap.hxx
@@ -63,6 +63,7 @@ enum ShapePropertyId
 SHAPEPROP_FillBitmapRectanglePoint,
 SHAPEPROP_FillHatch,
 SHAPEPROP_ShadowXDistance,
+SHAPEPROP_FillBitmapNameFromUrl,
 SHAPEPROP_END
 };
 
@@ -128,6 +129,8 @@ private:
 boolsetGradientTrans( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue );
 /** Sets an explicit fill bitmap URL, or creates a named fill bitmap URL. 
*/
 boolsetFillBitmapUrl( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue );
+/** Sets an explicit fill bitmap URL and pushes the name to FillBitmapName 
*/
+boolsetFillBitmapNameFromUrl( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue );
 
 // not implemented, to prevent implicit conversion from enum to int
 ::com::sun::star::uno::Any operator[]( ShapePropertyId ePropId );
diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index 4e6d8e1..c96c77a 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -421,7 +421,9 @@ void FillProperties::pushToPropMap( ShapePropertyMap 
rPropMap,
 
 OUString aGraphicUrl = rGraphicHelper.createGraphicObject( 
xGraphic );
 // push bitmap or named bitmap to property map
-if( !aGraphicUrl.isEmpty()  rPropMap.setProperty( 
SHAPEPROP_FillBitmapUrl, aGraphicUrl ) )
+if( !aGraphicUrl.isEmpty()  rPropMap.supportsProperty( 
SHAPEPROP_FillBitmapNameFromUrl )  rPropMap.setProperty( 
SHAPEPROP_FillBitmapNameFromUrl, aGraphicUrl ) )
+eFillStyle = FillStyle_BITMAP;
+else if( !aGraphicUrl.isEmpty()  rPropMap.setProperty( 
SHAPEPROP_FillBitmapUrl, aGraphicUrl ) )
 eFillStyle = FillStyle_BITMAP;
 
 // set other bitmap properties, if bitmap has been 
inserted into the map
diff --git a/oox/source/drawingml/shapepropertymap.cxx 
b/oox/source/drawingml/shapepropertymap.cxx
index ff02dd5..fe985db 100644
--- a/oox/source/drawingml/shapepropertymap.cxx
+++ b/oox/source/drawingml/shapepropertymap.cxx
@@ -47,7 +47,8 @@ static const sal_Int32 spnDefaultShapeIds[ SHAPEPROP_END ] =
 PROP_FillBitmapURL, PROP_FillBitmapMode, PROP_FillBitmapSizeX, 
PROP_FillBitmapSizeY,
 PROP_FillBitmapPositionOffsetX, PROP_FillBitmapPositionOffsetY, 
PROP_FillBitmapRectanglePoint,
 PROP_FillHatch,
-PROP_ShadowXDistance
+PROP_ShadowXDistance,
+PROP_FillBitmapName
 };
 
 } // namespace
@@ -108,6 +109,9 @@ bool ShapePropertyMap::setAnyProperty( ShapePropertyId 
ePropId, const Any rValu
 case SHAPEPROP_FillBitmapUrl:
 return setFillBitmapUrl( nPropId, rValue );
 
+case SHAPEPROP_FillBitmapNameFromUrl:
+return setFillBitmapNameFromUrl( nPropId, rValue );
+
 default:;   // suppress compiler warnings
 }
 
@@ -195,6 +199,16 @@ bool ShapePropertyMap::setFillBitmapUrl( sal_Int32 
nPropId, const Any rValue )
 return false;
 }
 
+bool ShapePropertyMap::setFillBitmapNameFromUrl( sal_Int32 /*nPropId*/, const 
Any rValue )
+{
+if( rValue.has OUString () )
+{
+OUString aBitmapUrlName = mrModelObjHelper.insertFillBitmapUrl( 
rValue.get OUString () );
+return !aBitmapUrlName.isEmpty()  setProperty( PROP_FillBitmapName, 
aBitmapUrlName );
+}
+return false;
+}
+
 // 
 
 } // namespace drawingml
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index f8c53d7..cbd49df 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -513,7 +513,9 @@ bool XFillBitmapItem::PutValue( const 
::com::sun::star::uno::Any rVal, sal_uInt
 }
 if( bSetURL )
 {
-maGraphicObject  = GraphicObject::CreateGraphicObjectFromURL(aURL);
+GraphicObject aGraphicObject

[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - editeng/source include/editeng oox/source sd/source svx/source

2014-03-17 Thread Muthu Subramanian
 editeng/source/editeng/editattr.cxx |   17 +++-
 editeng/source/editeng/editattr.hxx |   12 +++
 editeng/source/editeng/editdoc.cxx  |9 
 editeng/source/editeng/editeng.cxx  |2 +
 editeng/source/editeng/eerdll.cxx   |   12 ++-
 editeng/source/uno/unofdesc.cxx |1 
 editeng/source/uno/unotext.cxx  |2 -
 include/editeng/eeitem.hxx  |   17 
 include/editeng/eeitemid.hxx|2 -
 include/editeng/unoprnms.hxx|1 
 include/editeng/unotext.hxx |1 
 oox/source/drawingml/textcharacterpropertiescontext.cxx |2 +
 sd/source/core/drawdoc4.cxx |2 +
 sd/source/core/stlpool.cxx  |5 
 sd/source/ui/view/drtxtob1.cxx  |7 ++
 svx/source/svdraw/svdotextdecomposition.cxx |5 ++--
 svx/source/tbxctrls/tbcontrl.cxx|6 +
 svx/source/unodraw/unoprov.cxx  |1 
 18 files changed, 86 insertions(+), 18 deletions(-)

New commits:
commit d58adfde297a840a65103a87bf09fb64f70803e1
Author: Muthu Subramanian sumu...@collabora.com
Date:   Tue Feb 4 18:24:03 2014 +0530

cp#125: Import casemaps from pptx.

(Ported from: 887bc4dd3e62fe6dd19dc9d1c3ba273a5b21b5ec
and 9dbcb79782d6a5b80c21a0c093537d18425b826f)

Change-Id: I211491e06273aedf5c8ddbd0ca3fc35f3d168aaa
Reviewed-on: https://gerrit.libreoffice.org/7848
Reviewed-by: Andras Timar andras.ti...@collabora.com
Tested-by: Andras Timar andras.ti...@collabora.com

diff --git a/editeng/source/editeng/editattr.cxx 
b/editeng/source/editeng/editattr.cxx
index de847d6..b437e9b 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -43,6 +43,7 @@
 #include editeng/emphasismarkitem.hxx
 #include editeng/charscaleitem.hxx
 #include editeng/charreliefitem.hxx
+#include editeng/cmapitem.hxx
 
 #include editattr.hxx
 
@@ -185,7 +186,7 @@ void EditCharAttribFontWidth::SetFont( SvxFont /*rFont*/, 
OutputDevice* )
 EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem 
rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
 : EditCharAttrib( rAttr, _nStart, _nEnd )
 {
-DBG_ASSERT( rAttr.Which() == EE_CHAR_STRIKEOUT, Not a Size attribute! );
+DBG_ASSERT( rAttr.Which() == EE_CHAR_STRIKEOUT, Not a Strikeout 
attribute! );
 }
 
 void EditCharAttribStrikeout::SetFont( SvxFont rFont, OutputDevice* )
@@ -194,6 +195,20 @@ void EditCharAttribStrikeout::SetFont( SvxFont rFont, 
OutputDevice* )
 }
 
 // -
+// class EditCharAttribCaseMap
+// -
+EditCharAttribCaseMap::EditCharAttribCaseMap( const SvxCaseMapItem rAttr, 
sal_uInt16 _nStart, sal_uInt16 _nEnd )
+: EditCharAttrib( rAttr, _nStart, _nEnd )
+{
+DBG_ASSERT( rAttr.Which() == EE_CHAR_CASEMAP, Not a CaseMap Item! );
+}
+
+void EditCharAttribCaseMap::SetFont( SvxFont rFont, OutputDevice* )
+{
+rFont.SetCaseMap( ((const SvxCaseMapItem*)GetItem())-GetCaseMap() );
+}
+
+// -
 // class EditCharAttribColor
 // -
 EditCharAttribColor::EditCharAttribColor( const SvxColorItem rAttr, 
sal_uInt16 _nStart, sal_uInt16 _nEnd )
diff --git a/editeng/source/editeng/editattr.hxx 
b/editeng/source/editeng/editattr.hxx
index 4fb657c..3917427 100644
--- a/editeng/source/editeng/editattr.hxx
+++ b/editeng/source/editeng/editattr.hxx
@@ -47,6 +47,7 @@ class SvxEmphasisMarkItem;
 class SvxCharReliefItem;
 class SfxVoidItem;
 class OutputDevice;
+class SvxCaseMapItem;
 
 #define CH_FEATURE_OLD  (sal_uInt8) 0xFF
 #define CH_FEATURE  (sal_Unicode)   0x01
@@ -219,6 +220,17 @@ public:
 };
 
 // -
+// class EditCharAttribCaseMap
+// -
+class EditCharAttribCaseMap : public EditCharAttrib
+{
+public:
+EditCharAttribCaseMap( const SvxCaseMapItem rAttr, sal_uInt16 nStart, 
sal_uInt16 nEnd );
+
+virtual voidSetFont( SvxFont rFont, OutputDevice* pOutDev );
+};
+
+// -
 // class EditCharAttribUnderline
 // -
 class EditCharAttribUnderline : public EditCharAttrib
diff --git a/editeng/source/editeng/editdoc.cxx 
b/editeng/source/editeng/editdoc.cxx
index 26c2b24..f02990b 100644
--- a/editeng/source/editeng

[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - oox/source

2014-03-16 Thread Muthu Subramanian
 oox/source/export/drawingml.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 3f16ae0233442bd2b8f2f0ebde9a2741a41ef6c4
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Dec 18 19:56:28 2013 +0530

fdo#73627 n#828390: Explictly export font properties.

Seems like the status is returned as default,
but the font properties needs to be still exported.

(cherry picked from commit 33b796eb1484b9a3fc11a189faddb7fc36509856)
Signed-off-by: Andras Timar andras.ti...@collabora.com

Change-Id: I65619d10f44ad54ab79874c718e47677049a2ff8

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 7526741..75bfc56 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -699,14 +699,14 @@ void DrawingML::WriteRunProperties( Reference 
XPropertySet  rRun, sal_Bool bIs
 sal_Int32 nSize = 1800;
 sal_Int32 nCharEscapement = 0;
 
-if( GETAD( CharHeight ) )
+if( GETA( CharHeight ) )
 nSize = (sal_Int32) (100*(*((float*) mAny.getValue(;
 
-if ( ( bComplex  GETAD( CharWeightComplex ) ) || GETAD( CharWeight ) )
+if ( ( bComplex  GETA( CharWeightComplex ) ) || GETA( CharWeight ) )
 if ( *((float*) mAny.getValue()) = awt::FontWeight::SEMIBOLD )
 bold = 1;
 
-if ( ( bComplex  GETAD( CharPostureComplex ) ) || GETAD( CharPosture ) )
+if ( ( bComplex  GETA( CharPostureComplex ) ) || GETA( CharPosture ) )
 switch ( *((awt::FontSlant*) mAny.getValue()) )
 {
 case awt::FontSlant_OBLIQUE :
@@ -815,7 +815,7 @@ void DrawingML::WriteRunProperties( Reference XPropertySet 
 rRun, sal_Bool bIs
 WriteSolidFill( color );
 }
 
-if( GETAD( CharFontName ) ) {
+if( GETA( CharFontName ) ) {
 const char* pitch = NULL;
 const char* charset = NULL;
 OUString usTypeface;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - oox/source

2014-03-16 Thread Muthu Subramanian
 oox/source/export/drawingml.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f4d59251a4ef911d794c4d01edbec64310fc8676
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 19 16:48:20 2013 +0530

n#828390: Bullet sizes set wrong.

(cherry picked from commit e5cd547846663c69bd66aa1ba94e3b4dcce30a89)
Signed-off-by: Andras Timar andras.ti...@collabora.com

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 75bfc56..a8c5741 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1118,7 +1118,7 @@ void DrawingML::WriteParagraphNumbering( Reference 
XPropertySet  rXPropSet, sa
 } else {
 if( nBulletRelSize  nBulletRelSize != 100 )
 mpFS-singleElementNS( XML_a, XML_buSzPct,
-   XML_val, IS( std::min( 
(sal_Int32)25000, std::max( (sal_Int32)40, 1000*( (sal_Int32)nBulletRelSize 
) ) ) ), FSEND );
+   XML_val, IS( std::max( 
(sal_Int32)25000, std::min( (sal_Int32)40, 1000*( (sal_Int32)nBulletRelSize 
) ) ) ), FSEND );
 if( bHasFontDesc )
 mpFS-singleElementNS( XML_a, XML_buFont,
XML_typeface, 
OUStringToOString( aFontDesc.Name, RTL_TEXTENCODING_UTF8 ).getStr(),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: oox/source

2014-03-14 Thread Muthu Subramanian
 oox/source/drawingml/textcharacterpropertiescontext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 19abfaffe74b925e4428943d14187a7008797982
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Mar 14 15:31:53 2014 +0530

n#862510: Ignore baseline attributes with zero.

Change-Id: I1adc46e62c82c23645ccad0e11d5a7cb07114539

diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx 
b/oox/source/drawingml/textcharacterpropertiescontext.cxx
index b432c80..5bb800c 100644
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -53,7 +53,7 @@ 
TextCharacterPropertiesContext::TextCharacterPropertiesContext(
 mrTextCharacterProperties.moUnderline = rAttribs.getToken( XML_u );
 if ( rAttribs.hasAttribute( XML_strike ) )
 mrTextCharacterProperties.moStrikeout = rAttribs.getToken( XML_strike 
);
-if ( rAttribs.hasAttribute( XML_baseline ) )
+if ( rAttribs.hasAttribute( XML_baseline )  rAttribs.getInteger( 
XML_baseline ).get() != 0 )
 mrTextCharacterProperties.moBaseline = rAttribs.getInteger( 
XML_baseline );
 
 if ( rAttribs.hasAttribute( XML_b ) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - oox/source

2014-03-14 Thread Muthu Subramanian
 oox/source/drawingml/textcharacterpropertiescontext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit df861737beaa883ccd2b11bfa896cd546dd51b6f
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Mar 14 20:03:45 2014 +0530

n#862510: Ignore baseline attributes with zero.

Ported from 19abfaffe74b925e4428943d14187a7008797982

Change-Id: I5447c16193f7c3e619ce10658c9696014d3d5a22

diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx 
b/oox/source/drawingml/textcharacterpropertiescontext.cxx
index 2119dc6..13af2cd 100644
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -56,7 +56,7 @@ 
TextCharacterPropertiesContext::TextCharacterPropertiesContext(
 mrTextCharacterProperties.moUnderline = aAttribs.getToken( XML_u );
 if ( aAttribs.hasAttribute( XML_strike ) )
 mrTextCharacterProperties.moStrikeout = aAttribs.getToken( XML_strike 
);
-if ( aAttribs.hasAttribute( XML_baseline ) )
+if ( aAttribs.hasAttribute( XML_baseline )  aAttribs.getInteger( 
XML_baseline ).get() != 0 )
 mrTextCharacterProperties.moBaseline = aAttribs.getInteger( 
XML_baseline );
 
 //  mrTextCharacterProperties.moCaseMap = aAttribs.getToken( XML_cap );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - oox/source

2014-03-14 Thread Muthu Subramanian
 oox/source/drawingml/textcharacterpropertiescontext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 88faa076da606e8611aea4c4b2d10fee694943a5
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Mar 14 20:03:45 2014 +0530

n#862510: Ignore baseline attributes with zero.

Ported from 19abfaffe74b925e4428943d14187a7008797982

Change-Id: I5447c16193f7c3e619ce10658c9696014d3d5a22

diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx 
b/oox/source/drawingml/textcharacterpropertiescontext.cxx
index 19b54c6..6835149 100644
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -55,7 +55,7 @@ 
TextCharacterPropertiesContext::TextCharacterPropertiesContext(
 mrTextCharacterProperties.moUnderline = aAttribs.getToken( XML_u );
 if ( aAttribs.hasAttribute( XML_strike ) )
 mrTextCharacterProperties.moStrikeout = aAttribs.getToken( XML_strike 
);
-if ( aAttribs.hasAttribute( XML_baseline ) )
+if ( aAttribs.hasAttribute( XML_baseline )  aAttribs.getInteger( 
XML_baseline ).get() != 0 )
 mrTextCharacterProperties.moBaseline = aAttribs.getInteger( 
XML_baseline );
 if( aAttribs.hasAttribute( XML_cap ) )
 mrTextCharacterProperties.moCaseMap = aAttribs.getToken( XML_cap );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/source

2014-03-12 Thread Muthu Subramanian
 sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 4c7de23f97134a0ce1cf11d944f170eaceb0838e
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Mar 12 12:31:52 2014 +0530

n#862516: Remember slides sorter view setting.

Keep the number of slides per row when moving across tabs.

Change-Id: I316dac87c9dc8c88149b510f93be88940d91d98c

diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx 
b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 1d78541..87ef407 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -603,6 +603,8 @@ void SlideSorterViewShell::Activate (sal_Bool 
bIsMDIActivate)
 
 void SlideSorterViewShell::Deactivate (sal_Bool /*bIsMDIActivate*/)
 {
+// Save Settings - Specifically SlidesPerRow to retrieve it later
+WriteFrameViewData();
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - sd/source

2014-03-12 Thread Muthu Subramanian
 sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 1a0e824ea96d325e728677802c38973d1b0689ef
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Mar 12 12:31:52 2014 +0530

n#862516: Remember slides sorter view setting.

Keep the number of slides per row when moving across tabs.

Change-Id: I316dac87c9dc8c88149b510f93be88940d91d98c

diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx 
b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index b32b4a2..6667c6c 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -593,6 +593,8 @@ void SlideSorterViewShell::Activate (sal_Bool 
bIsMDIActivate)
 
 void SlideSorterViewShell::Deactivate (sal_Bool /*bIsMDIActivate*/)
 {
+// Save Settings - Specifically SlidesPerRow to retrieve it later
+WriteFrameViewData();
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sd/source

2014-03-12 Thread Muthu Subramanian
 sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 87a376ce619c54abef5d5abf19039ff43ba998b8
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Mar 12 12:31:52 2014 +0530

n#862516: Remember slides sorter view setting.

Keep the number of slides per row when moving across tabs.

Change-Id: I316dac87c9dc8c88149b510f93be88940d91d98c
Reviewed-on: https://gerrit.libreoffice.org/8545
Reviewed-by: Andras Timar andras.ti...@collabora.com
Tested-by: Andras Timar andras.ti...@collabora.com

diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx 
b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 319371b..0c948bd 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -590,6 +590,8 @@ void SlideSorterViewShell::Activate (sal_Bool 
bIsMDIActivate)
 
 void SlideSorterViewShell::Deactivate (sal_Bool /*bIsMDIActivate*/)
 {
+// Save Settings - Specifically SlidesPerRow to retrieve it later
+WriteFrameViewData();
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sd/source

2014-03-12 Thread Muthu Subramanian
 sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 2166db00d1d639b3a5032f1866a6c5cd7275e57d
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Mar 12 12:31:52 2014 +0530

n#862516: Remember slides sorter view setting.

Keep the number of slides per row when moving across tabs.

Change-Id: I316dac87c9dc8c88149b510f93be88940d91d98c
Reviewed-on: https://gerrit.libreoffice.org/8542
Reviewed-by: Andras Timar andras.ti...@collabora.com
Tested-by: Andras Timar andras.ti...@collabora.com

diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx 
b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index b32b4a2..6667c6c 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -593,6 +593,8 @@ void SlideSorterViewShell::Activate (sal_Bool 
bIsMDIActivate)
 
 void SlideSorterViewShell::Deactivate (sal_Bool /*bIsMDIActivate*/)
 {
+// Save Settings - Specifically SlidesPerRow to retrieve it later
+WriteFrameViewData();
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - svx/source

2014-03-12 Thread Muthu Subramanian
 svx/source/xoutdev/xattrbmp.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 910716696fa7bd0b87381121b10668dcb7953661
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Mar 12 16:46:50 2014 +0530

n#821567: Use BitmapURL only if its valid.

Ported from: bf2ff0468e06770f9320c652a2332f7ec137d061

Change-Id: I7464fcba352798a686fc0563dd023feac5234dbf
Reviewed-on: https://gerrit.libreoffice.org/8547
Reviewed-by: Norbert Thiebaud nthieb...@gmail.com
Tested-by: Norbert Thiebaud nthieb...@gmail.com

diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index d2a5566..a24fce6 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -605,7 +605,9 @@ bool XFillBitmapItem::PutValue( const 
::com::sun::star::uno::Any rVal, sal_uInt
 }
 if( bSetURL )
 {
-maGraphicObject  = GraphicObject::CreateGraphicObjectFromURL(aURL);
+GraphicObject aGraphicObject  = 
GraphicObject::CreateGraphicObjectFromURL(aURL);
+if( aGraphicObject.GetType() != GRAPHIC_NONE )
+maGraphicObject = aGraphicObject;
 }
 if( bSetBitmap )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - 2 commits - oox/inc oox/source svx/source

2014-03-07 Thread Muthu Subramanian
 oox/inc/oox/drawingml/shapepropertymap.hxx |3 +++
 oox/source/drawingml/fillproperties.cxx|4 +++-
 oox/source/drawingml/shapepropertymap.cxx  |   16 +++-
 svx/source/xoutdev/xattrbmp.cxx|7 +--
 4 files changed, 26 insertions(+), 4 deletions(-)

New commits:
commit 6b22520691a997bd14d14eba3a3e7a92ecea41b3
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Mar 7 13:36:50 2014 +0530

n#821567: Use BitmapURL only if its valid.

Ported from bf2ff0468e06770f9320c652a2332f7ec137d061

diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index 6f6fe94..77db862 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -720,8 +720,11 @@ bool XFillBitmapItem::PutValue( const 
::com::sun::star::uno::Any rVal, sal_uInt
 if( bSetURL )
 {
 GraphicObject aGrafObj( GraphicObject::CreateGraphicObjectFromURL( 
aURL ) );
-XOBitmap aBMP( aGrafObj );
-SetBitmapValue( aBMP );
+if( aGrafObj.GetType() != GRAPHIC_NONE )
+{
+XOBitmap aBMP( aGrafObj );
+SetBitmapValue( aBMP );
+}
 }
 if( bSetBitmap )
 {
commit fe69621b0005a3399c278971806940a09958848a
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Mar 7 13:30:43 2014 +0530

n#821567: Import PPTX background images with table-name.

Ported from 2ec4d410de5bd98527336a9dc49abb76656373df

diff --git a/oox/inc/oox/drawingml/shapepropertymap.hxx 
b/oox/inc/oox/drawingml/shapepropertymap.hxx
index 00f8c4d..8b5e4d7 100644
--- a/oox/inc/oox/drawingml/shapepropertymap.hxx
+++ b/oox/inc/oox/drawingml/shapepropertymap.hxx
@@ -63,6 +63,7 @@ enum ShapePropertyId
 SHAPEPROP_FillBitmapRectanglePoint,
 SHAPEPROP_FillHatch,
 SHAPEPROP_ShadowXDistance,
+SHAPEPROP_FillBitmapNameFromUrl,
 SHAPEPROP_END
 };
 
@@ -128,6 +129,8 @@ private:
 boolsetGradientTrans( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue );
 /** Sets an explicit fill bitmap URL, or creates a named fill bitmap URL. 
*/
 boolsetFillBitmapUrl( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue );
+/** Sets an explicit fill bitmap URL and pushes the name to FillBitmapName 
*/
+boolsetFillBitmapNameFromUrl( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue );
 
 // not implemented, to prevent implicit conversion from enum to int
 ::com::sun::star::uno::Any operator[]( ShapePropertyId ePropId );
diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index c4f58a8..5051932 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -393,7 +393,9 @@ void FillProperties::pushToPropMap( ShapePropertyMap 
rPropMap,
 
 OUString aGraphicUrl = rGraphicHelper.createGraphicObject( 
xGraphic );
 // push bitmap or named bitmap to property map
-if( !aGraphicUrl.isEmpty()  rPropMap.setProperty( 
SHAPEPROP_FillBitmapUrl, aGraphicUrl ) )
+if( !aGraphicUrl.isEmpty()  rPropMap.supportsProperty( 
SHAPEPROP_FillBitmapNameFromUrl )  rPropMap.setProperty( 
SHAPEPROP_FillBitmapNameFromUrl, aGraphicUrl ) )
+eFillStyle = FillStyle_BITMAP;
+else if( !aGraphicUrl.isEmpty()  rPropMap.setProperty( 
SHAPEPROP_FillBitmapUrl, aGraphicUrl ) )
 eFillStyle = FillStyle_BITMAP;
 
 // set other bitmap properties, if bitmap has been 
inserted into the map
diff --git a/oox/source/drawingml/shapepropertymap.cxx 
b/oox/source/drawingml/shapepropertymap.cxx
index c945a53..eb8a5b4 100644
--- a/oox/source/drawingml/shapepropertymap.cxx
+++ b/oox/source/drawingml/shapepropertymap.cxx
@@ -49,7 +49,8 @@ static const sal_Int32 spnDefaultShapeIds[ SHAPEPROP_END ] =
 PROP_FillBitmapURL, PROP_FillBitmapMode, PROP_FillBitmapSizeX, 
PROP_FillBitmapSizeY,
 PROP_FillBitmapPositionOffsetX, PROP_FillBitmapPositionOffsetY, 
PROP_FillBitmapRectanglePoint,
 PROP_FillHatch,
-PROP_ShadowXDistance
+PROP_ShadowXDistance,
+PROP_FillBitmapName
 };
 
 } // namespace
@@ -110,6 +111,9 @@ bool ShapePropertyMap::setAnyProperty( ShapePropertyId 
ePropId, const Any rValu
 case SHAPEPROP_FillBitmapUrl:
 return setFillBitmapUrl( nPropId, rValue );
 
+case SHAPEPROP_FillBitmapNameFromUrl:
+return setFillBitmapNameFromUrl( nPropId, rValue );
+
 default:;   // suppress compiler warnings
 }
 
@@ -197,6 +201,16 @@ bool ShapePropertyMap::setFillBitmapUrl( sal_Int32 
nPropId, const Any rValue )
 return false;
 }
 
+bool ShapePropertyMap::setFillBitmapNameFromUrl( sal_Int32 /*nPropId*/, const 
Any rValue )
+{
+if( rValue.has OUString () )
+{
+OUString aBitmapUrlName = mrModelObjHelper.insertFillBitmapUrl( 
rValue.get OUString

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - svx/source

2014-03-07 Thread Muthu Subramanian
 svx/source/svdraw/svdobj.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5d033741b5e5d1b2c7eec91bc5fe24e5db18eb40
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Mar 7 21:24:39 2014 +0530

Use GetData() instead of GetBuffer()

Change-Id: I82717c53b0ed1eb14ab6cc6cc037d991cce42984

diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index c3f3d42..c7297f9 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1796,7 +1796,7 @@ OString SdrObject::stringify() const
 SfxItemSet aSet(GetMergedItemSet());
 aSet.InvalidateDefaultItems();
 aSet.Store(aStream, true);
-aString.append((const char *)aStream.GetBuffer(), aStream.GetEndOfData());
+aString.append((const char *)aStream.GetData(), aStream.GetEndOfData());
 
 return aString.makeStringAndClear();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 3 commits - include/oox oox/source sd/qa svx/source

2014-03-06 Thread Muthu Subramanian
 include/oox/drawingml/shapepropertymap.hxx |3 +++
 oox/source/drawingml/fillproperties.cxx|4 +++-
 oox/source/drawingml/shapepropertymap.cxx  |   14 ++
 sd/qa/unit/data/pptx/n821567.pptx  |binary
 sd/qa/unit/import-tests.cxx|   29 +
 svx/source/xoutdev/xattrbmp.cxx|4 +++-
 6 files changed, 52 insertions(+), 2 deletions(-)

New commits:
commit e8c00c409123e1d99f71c8e6cf8d672e96fb0c91
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Mar 6 15:57:43 2014 +0530

n#821567: Add unit test case.

diff --git a/sd/qa/unit/data/pptx/n821567.pptx 
b/sd/qa/unit/data/pptx/n821567.pptx
new file mode 100644
index 000..9f365ad
Binary files /dev/null and b/sd/qa/unit/data/pptx/n821567.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 486f7f3..0f5732c 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -57,6 +57,7 @@ public:
 void testN828390_3();
 void testN828390_4();
 void testN828390_5();
+void testN821567();
 void testFdo68594();
 void testFdo72998();
 
@@ -72,6 +73,7 @@ public:
 CPPUNIT_TEST(testN828390_3);
 CPPUNIT_TEST(testN828390_4);
 CPPUNIT_TEST(testN828390_5);
+CPPUNIT_TEST(testN821567);
 CPPUNIT_TEST(testFdo68594);
 CPPUNIT_TEST(testFdo72998);
 
@@ -204,6 +206,33 @@ void SdFiltersTest::testN759180()
 }
 }
 
+void SdFiltersTest::testN821567()
+{
+OUString bgImage;
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n821567.pptx) );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+
+xDocShRef = saveAndReload( xDocShRef, ODP );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( in destruction, !xDocShRef-IsInDestruction() );
+uno::Reference drawing::XDrawPagesSupplier  xDoc(
+xDocShRef-GetDoc()-getUnoModel(), uno::UNO_QUERY_THROW );
+CPPUNIT_ASSERT_MESSAGE( not exactly one page, 
xDoc-getDrawPages()-getCount() == 1 );
+uno::Reference drawing::XDrawPage  xPage(
+xDoc-getDrawPages()-getByIndex(0), uno::UNO_QUERY_THROW );
+
+uno::Reference beans::XPropertySet  xPropSet( xPage, uno::UNO_QUERY );
+uno::Any aAny = xPropSet-getPropertyValue( OUString(Background) );
+if(aAny.hasValue())
+{
+uno::Reference beans::XPropertySet  aXBackgroundPropSet;
+aAny = aXBackgroundPropSet;
+aAny = aXBackgroundPropSet-getPropertyValue( 
OUString(FillBitmapName));
+aAny = bgImage;
+}
+CPPUNIT_ASSERT_MESSAGE(Slide Background is not exported properly, 
!bgImage.isEmpty());
+}
+
 void SdFiltersTest::testN828390()
 {
 bool bPassed = false;
commit bf2ff0468e06770f9320c652a2332f7ec137d061
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Mar 6 15:53:07 2014 +0530

n#821567: Use BitmapURL only if its valid.

diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index 797e089..674f8f6 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -513,7 +513,9 @@ bool XFillBitmapItem::PutValue( const 
::com::sun::star::uno::Any rVal, sal_uInt
 }
 if( bSetURL )
 {
-maGraphicObject  = GraphicObject::CreateGraphicObjectFromURL(aURL);
+GraphicObject aGraphicObject  = 
GraphicObject::CreateGraphicObjectFromURL(aURL);
+if( aGraphicObject.GetType() != GRAPHIC_NONE )
+maGraphicObject = aGraphicObject;
 
 // #121194# Prefer GraphicObject over bitmap object if both are 
provided
 if(bSetBitmap  GRAPHIC_NONE != maGraphicObject.GetType())
commit 2ec4d410de5bd98527336a9dc49abb76656373df
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Mar 6 15:52:24 2014 +0530

n#821567: Import PPTX background images with table-name.

Seems like using the URL directly causes ODP export
to ignore the background image.
Probaby ODP Export requires updation as well?

diff --git a/include/oox/drawingml/shapepropertymap.hxx 
b/include/oox/drawingml/shapepropertymap.hxx
index 29b0ba2..f451cc0 100644
--- a/include/oox/drawingml/shapepropertymap.hxx
+++ b/include/oox/drawingml/shapepropertymap.hxx
@@ -65,6 +65,7 @@ enum ShapePropertyId
 SHAPEPROP_FillBitmapRectanglePoint,
 SHAPEPROP_FillHatch,
 SHAPEPROP_ShadowXDistance,
+SHAPEPROP_FillBitmapNameFromUrl,
 SHAPEPROP_END
 };
 
@@ -129,6 +130,8 @@ private:
 boolsetGradientTrans( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue );
 /** Sets an explicit fill bitmap URL, or creates a named fill bitmap URL. 
*/
 boolsetFillBitmapUrl( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue );
+/** Sets an explicit fill bitmap URL and pushes the name to FillBitmapName 
*/
+boolsetFillBitmapNameFromUrl( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue

[Libreoffice-commits] core.git: sw/qa

2014-03-06 Thread Muthu Subramanian
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f8062328bc9c455b8e0cb406455b3af8f5ca6d11
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Mar 6 17:59:26 2014 +0530

Disable unit-test BackGraphicURL test temporarily.

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index c51b58a..28a8bfd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2116,7 +2116,7 @@ DECLARE_OOXMLEXPORT_TEST(testTextBoxPictureFill, 
textbox_picturefill.docx)
 {
 uno::Referencebeans::XPropertySet xFrame(getShape(1), uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, 
getPropertydrawing::FillStyle(xFrame, FillStyle));
-
CPPUNIT_ASSERT(!(getPropertyOUString(xFrame,BackGraphicURL)).isEmpty());
+
//CPPUNIT_ASSERT(!(getPropertyOUString(xFrame,BackGraphicURL)).isEmpty());
 }
 
 DECLARE_OOXMLEXPORT_TEST(testFDO73034, FDO73034.docx)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - include/oox oox/source sw/qa

2014-03-06 Thread Muthu Subramanian
 include/oox/helper/modelobjecthelper.hxx |4 
 oox/source/drawingml/shape.cxx   |7 +++
 oox/source/helper/modelobjecthelper.cxx  |   15 +++
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx |2 +-
 4 files changed, 27 insertions(+), 1 deletion(-)

New commits:
commit f1d1c9a6529d575ba3f65872e5ae9e7ac381c6b7
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Mar 6 21:21:43 2014 +0530

n#821567: Fix TextFrame background import for sw.

TextFrame in sw unfortunately doesn't seem to
support nametable!

diff --git a/include/oox/helper/modelobjecthelper.hxx 
b/include/oox/helper/modelobjecthelper.hxx
index e57e014..2ced973 100644
--- a/include/oox/helper/modelobjecthelper.hxx
+++ b/include/oox/helper/modelobjecthelper.hxx
@@ -48,6 +48,8 @@ public:
 /** Returns true, if the object with the passed name exists in the 
container. */
 boolhasObject( const OUString rObjName ) const;
 
+::com::sun::star::uno::Any getObject( const OUString rObjName ) const;
+
 /** Inserts the passed object into the container, returns its final name. 
*/
 OUString insertObject(
 const OUString rObjName,
@@ -104,6 +106,8 @@ public:
 an internal constant name with a new unused index appended. */
 OUString insertFillBitmapUrl( const OUString rGraphicUrl );
 
+OUString getFillBitmapUrl( const OUString rGraphicName );
+
 private:
 ObjectContainer maMarkerContainer;  /// Contains all named line 
markers (line end polygons).
 ObjectContainer maDashContainer;/// Contains all named line 
dsahes.
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 883d76f..7d3b0dc 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -35,6 +35,7 @@
 #include oox/core/xmlfilterbase.hxx
 #include oox/helper/graphichelper.hxx
 #include oox/helper/propertyset.hxx
+#include oox/helper/modelobjecthelper.hxx
 
 #include tools/gen.hxx
 #include tools/mapunit.hxx
@@ -691,6 +692,12 @@ Reference XShape  Shape::createAndInsert(
 aShapeProps.setProperty(PROP_BackGraphicURL, 
aShapeProps.getProperty(PROP_FillBitmapURL));
 aShapeProps.erase(PROP_FillBitmapURL);
 }
+if (aShapeProps.hasProperty(PROP_FillBitmapName))
+{
+uno::Any aAny = aShapeProps[PROP_FillBitmapName];
+aShapeProps.setProperty(PROP_BackGraphicURL, 
rFilterBase.getModelObjectHelper().getFillBitmapUrl( aAny.getOUString() ));
+// aShapeProps.erase(PROP_FillBitmapName);  // Maybe, 
leave the name as well
+}
 // And no LineColor property; individual borders can have 
colors
 if (aShapeProps.hasProperty(PROP_LineColor))
 {
diff --git a/oox/source/helper/modelobjecthelper.cxx 
b/oox/source/helper/modelobjecthelper.cxx
index 5a966fe..1ec45af 100644
--- a/oox/source/helper/modelobjecthelper.cxx
+++ b/oox/source/helper/modelobjecthelper.cxx
@@ -56,6 +56,13 @@ bool ObjectContainer::hasObject( const OUString rObjName ) 
const
 return mxContainer.is()  mxContainer-hasByName( rObjName );
 }
 
+Any ObjectContainer::getObject( const OUString rObjName ) const
+{
+if( hasObject( rObjName ) )
+return mxContainer-getByName( rObjName );
+return Any();
+}
+
 OUString ObjectContainer::insertObject( const OUString rObjName, const Any 
rObj, bool bInsertByUnusedName )
 {
 createContainer();
@@ -132,6 +139,14 @@ OUString ModelObjectHelper::insertFillBitmapUrl( const 
OUString rGraphicUrl )
 return OUString();
 }
 
+OUString ModelObjectHelper::getFillBitmapUrl( const OUString rGraphicName )
+{
+Any aAny = maBitmapUrlContainer.getObject( rGraphicName );
+if( aAny.hasValue() )
+return aAny.getOUString();
+return OUString();
+}
+
 
 
 } // namespace oox
commit ad737e7ff4bf12d8b66ceb2001aebf54ff5badba
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Mar 6 18:16:46 2014 +0530

Re-enable the unit test (BackGraphicURL).

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 28a8bfd..c51b58a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2116,7 +2116,7 @@ DECLARE_OOXMLEXPORT_TEST(testTextBoxPictureFill, 
textbox_picturefill.docx)
 {
 uno::Referencebeans::XPropertySet xFrame(getShape(1), uno::UNO_QUERY);
 CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, 
getPropertydrawing::FillStyle(xFrame, FillStyle));
-
//CPPUNIT_ASSERT(!(getPropertyOUString(xFrame,BackGraphicURL)).isEmpty());
+
CPPUNIT_ASSERT(!(getPropertyOUString(xFrame,BackGraphicURL)).isEmpty());
 }
 
 DECLARE_OOXMLEXPORT_TEST(testFDO73034, FDO73034.docx)
___
Libreoffice-commits mailing list
libreoffice-comm

[Libreoffice-commits] core.git: oox/source

2014-03-06 Thread Muthu Subramanian
 oox/source/drawingml/shape.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 72a029dd2e6aad242ed53c56b891aa593e2db33f
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Mar 6 21:38:44 2014 +0530

Replace [] with getProperty()

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 7d3b0dc..3487b31 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -694,7 +694,7 @@ Reference XShape  Shape::createAndInsert(
 }
 if (aShapeProps.hasProperty(PROP_FillBitmapName))
 {
-uno::Any aAny = aShapeProps[PROP_FillBitmapName];
+uno::Any aAny = 
aShapeProps.getProperty(PROP_FillBitmapName);
 aShapeProps.setProperty(PROP_BackGraphicURL, 
rFilterBase.getModelObjectHelper().getFillBitmapUrl( aAny.getOUString() ));
 // aShapeProps.erase(PROP_FillBitmapName);  // Maybe, 
leave the name as well
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - 2 commits - include/oox oox/source svx/source

2014-03-06 Thread Muthu Subramanian
 include/oox/drawingml/shapepropertymap.hxx |3 +++
 oox/source/drawingml/fillproperties.cxx|4 +++-
 oox/source/drawingml/shapepropertymap.cxx  |   16 +++-
 svx/source/xoutdev/xattrbmp.cxx|4 +++-
 4 files changed, 24 insertions(+), 3 deletions(-)

New commits:
commit a678e5d76af54eaefb883c5ef95d3b8adf3c943a
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Mar 7 13:03:46 2014 +0530

n#821567: Use BitmapURL only if its valid.

Ported bf2ff0468e06770f9320c652a2332f7ec137d061

diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index d2a5566..a24fce6 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -605,7 +605,9 @@ bool XFillBitmapItem::PutValue( const 
::com::sun::star::uno::Any rVal, sal_uInt
 }
 if( bSetURL )
 {
-maGraphicObject  = GraphicObject::CreateGraphicObjectFromURL(aURL);
+GraphicObject aGraphicObject  = 
GraphicObject::CreateGraphicObjectFromURL(aURL);
+if( aGraphicObject.GetType() != GRAPHIC_NONE )
+maGraphicObject = aGraphicObject;
 }
 if( bSetBitmap )
 {
commit 56ca700e8304dd78a1b1dcbd9f3440d7247dd955
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Mar 7 13:00:06 2014 +0530

n#821567: Import PPTX background images with table-name.

Ported 2ec4d410de5bd98527336a9dc49abb76656373df

diff --git a/include/oox/drawingml/shapepropertymap.hxx 
b/include/oox/drawingml/shapepropertymap.hxx
index 8018752..a18276d 100644
--- a/include/oox/drawingml/shapepropertymap.hxx
+++ b/include/oox/drawingml/shapepropertymap.hxx
@@ -63,6 +63,7 @@ enum ShapePropertyId
 SHAPEPROP_FillBitmapRectanglePoint,
 SHAPEPROP_FillHatch,
 SHAPEPROP_ShadowXDistance,
+SHAPEPROP_FillBitmapNameFromUrl,
 SHAPEPROP_END
 };
 
@@ -128,6 +129,8 @@ private:
 boolsetGradientTrans( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue );
 /** Sets an explicit fill bitmap URL, or creates a named fill bitmap URL. 
*/
 boolsetFillBitmapUrl( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue );
+/** Sets an explicit fill bitmap URL and pushes the name to FillBitmapName 
*/
+boolsetFillBitmapNameFromUrl( sal_Int32 nPropId, const 
::com::sun::star::uno::Any rValue );
 
 // not implemented, to prevent implicit conversion from enum to int
 ::com::sun::star::uno::Any operator[]( ShapePropertyId ePropId );
diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index bdc2c2f..d64c195 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -421,7 +421,9 @@ void FillProperties::pushToPropMap( ShapePropertyMap 
rPropMap,
 
 OUString aGraphicUrl = rGraphicHelper.createGraphicObject( 
xGraphic );
 // push bitmap or named bitmap to property map
-if( !aGraphicUrl.isEmpty()  rPropMap.setProperty( 
SHAPEPROP_FillBitmapUrl, aGraphicUrl ) )
+if( !aGraphicUrl.isEmpty()  rPropMap.supportsProperty( 
SHAPEPROP_FillBitmapNameFromUrl )  rPropMap.setProperty( 
SHAPEPROP_FillBitmapNameFromUrl, aGraphicUrl ) )
+eFillStyle = FillStyle_BITMAP;
+else if( !aGraphicUrl.isEmpty()  rPropMap.setProperty( 
SHAPEPROP_FillBitmapUrl, aGraphicUrl ) )
 eFillStyle = FillStyle_BITMAP;
 
 // set other bitmap properties, if bitmap has been 
inserted into the map
diff --git a/oox/source/drawingml/shapepropertymap.cxx 
b/oox/source/drawingml/shapepropertymap.cxx
index ff02dd5..fe985db 100644
--- a/oox/source/drawingml/shapepropertymap.cxx
+++ b/oox/source/drawingml/shapepropertymap.cxx
@@ -47,7 +47,8 @@ static const sal_Int32 spnDefaultShapeIds[ SHAPEPROP_END ] =
 PROP_FillBitmapURL, PROP_FillBitmapMode, PROP_FillBitmapSizeX, 
PROP_FillBitmapSizeY,
 PROP_FillBitmapPositionOffsetX, PROP_FillBitmapPositionOffsetY, 
PROP_FillBitmapRectanglePoint,
 PROP_FillHatch,
-PROP_ShadowXDistance
+PROP_ShadowXDistance,
+PROP_FillBitmapName
 };
 
 } // namespace
@@ -108,6 +109,9 @@ bool ShapePropertyMap::setAnyProperty( ShapePropertyId 
ePropId, const Any rValu
 case SHAPEPROP_FillBitmapUrl:
 return setFillBitmapUrl( nPropId, rValue );
 
+case SHAPEPROP_FillBitmapNameFromUrl:
+return setFillBitmapNameFromUrl( nPropId, rValue );
+
 default:;   // suppress compiler warnings
 }
 
@@ -195,6 +199,16 @@ bool ShapePropertyMap::setFillBitmapUrl( sal_Int32 
nPropId, const Any rValue )
 return false;
 }
 
+bool ShapePropertyMap::setFillBitmapNameFromUrl( sal_Int32 /*nPropId*/, const 
Any rValue )
+{
+if( rValue.has OUString () )
+{
+OUString aBitmapUrlName = mrModelObjHelper.insertFillBitmapUrl( 
rValue.get OUString () );
+return

[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source

2014-02-24 Thread Muthu Subramanian
 oox/source/drawingml/chart/axisconverter.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit cc3f81394007f3ebc5cc2452a2fe0f7131881bcd
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Sep 11 21:41:43 2013 +0530

n#834720: Labels wrongly interpreted as dates.

If the numFormat is available we should probably use that.

diff --git a/oox/source/drawingml/chart/axisconverter.cxx 
b/oox/source/drawingml/chart/axisconverter.cxx
index 1f725d6..886b252 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -310,10 +310,8 @@ void AxisConverter::convertFromModel( const Reference 
XCoordinateSystem  rxCo
 {
 bool bPercent = false;
 if( mrModel.maNumberFormat.maFormatCode.indexOf('%') = 0)
-{
-mrModel.maNumberFormat.mbSourceLinked = false;
 bPercent = true;
-}
+mrModel.maNumberFormat.mbSourceLinked = false;
 getFormatter().convertNumberFormat( aAxisProp, 
mrModel.maNumberFormat, bPercent );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Fwd: Re: [Libreoffice-commits] core.git: Move string hash function into String class.

2014-02-18 Thread Muthu Subramanian

On 02/18/2014 05:53 PM, Stephan Bergmann wrote:


While a well-designed interface between a base class and its 
derivations (of which virtual functions are a part) is desirable, a 
virtual function carries a relatively high maintenance cost.  So 
please never declare functions as virtual until they actually need to be.

ah...makes sense.


Just pushed 
http://cgit.freedesktop.org/libreoffice/core/commit/?id=042725a5dadc9f2c6368ca451b6d20046129b8af 
Stick to a single O[U]String hash function based on what we 
discussed here.  Hope it still matches the requirements of 
SfxItemSet::getHash and SdPage::getHash (where I must confess that I 
don't understand what those requirements are) as well as the 
requirements of the svl::SharedStringPool clients (see the commit 
message for details).

Thank you!
It seems fine from what I checked - I will do check it in detail 
sometime this week - I don't see any problems though.


Thank you so much!
Muthu Subramanian



Stephan


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: include/rtl sal/util

2014-02-17 Thread Muthu Subramanian
 include/rtl/string.hxx  |2 ++
 include/rtl/ustring.hxx |   15 +++
 sal/util/sal.map|7 ++-
 3 files changed, 23 insertions(+), 1 deletion(-)

New commits:
commit 4cf0d8edaf1581c42949ad2cbb40183a2f657ddd
Author: Muthu Subramanian sumu...@collabora.com
Date:   Mon Feb 17 16:12:57 2014 +0530

String cleanups.

Change-Id: Ibebf394d69ed4845d91176727f291187ba35ed34

diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index 24bb980..5eb4fcf 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -898,6 +898,8 @@ public:
   @return   a hash code value of the string data
 
   @see hashCode() for simple hashes
+
+  @since LibreOffice 4.3
 */
 sal_uInt64 hashCode64() const SAL_THROW(())
 {
diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx
index f1a5f4a..9f9a956 100644
--- a/include/rtl/ustring.hxx
+++ b/include/rtl/ustring.hxx
@@ -1227,6 +1227,21 @@ public:
 }
 
 /**
+  Returns a 64bit hash of the string data.
+  This hashes the entire data, while hashCode would do sampling for larger 
string sizes.
+
+  @return   a hash code value of the string data
+
+  @see hashCode() for simple hashes
+
+  @since LibreOffice 4.3
+*/
+sal_uInt64 hashCode64() const SAL_THROW(())
+{
+return rtl_ustr_hashCode64_WithLength( pData-buffer, pData-length );
+}
+
+/**
   Returns a hashcode for this string.
 
   @return   a hash code value for this object.
diff --git a/sal/util/sal.map b/sal/util/sal.map
index 470da31..074eb7b 100644
--- a/sal/util/sal.map
+++ b/sal/util/sal.map
@@ -221,7 +221,6 @@ UDK_3_0_0 {
 rtl_str_shortenedCompareIgnoreAsciiCase_WithLength;
 rtl_str_hashCode;
 rtl_str_hashCode_WithLength;
-rtl_str_hashCode64_WithLength;
 rtl_str_indexOfChar;
 rtl_str_indexOfChar_WithLength;
 rtl_str_indexOfStr;
@@ -671,6 +670,12 @@ LIBO_UDK_4.2 { # symbols available in = LibO 4.2
 rtl_ustr_toUInt32;
 } LIBO_UDK_4.1;
 
+LIBO_UDK_4.3 { #symbols available in = LibO 4.3
+global:
+ rtl_str_hashCode64_WithLength;
+ rtl_ustr_hashCode64_WithLength;
+} LIBO_UDK_4.2;
+
 PRIVATE_1.0 {
 global:
 osl_detail_ObjectRegistry_storeAddresses;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - sal/inc sal/util

2014-02-17 Thread Muthu Subramanian
 sal/inc/rtl/string.hxx  |2 ++
 sal/inc/rtl/ustring.hxx |   15 +++
 sal/util/sal.map|7 ++-
 3 files changed, 23 insertions(+), 1 deletion(-)

New commits:
commit fb2c25a7b82f38fb286c25cb33fcbc5247008d26
Author: Muthu Subramanian sumu...@collabora.com
Date:   Tue Feb 18 12:49:05 2014 +0530

String cleanups.

Change-Id: Ia4a9630822678a7b9ea6e5af87e58cfd0ebacff3

diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 4b7b072..e9a9342 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -872,6 +872,8 @@ public:
   @return   a hash code value of the string data
 
   @see hashCode() for simple hashes
+
+  @since LibreOffice 4.3
 */
 sal_uInt64 hashCode64() const SAL_THROW(())
 {
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx
index 36295116..1f75101 100644
--- a/sal/inc/rtl/ustring.hxx
+++ b/sal/inc/rtl/ustring.hxx
@@ -1168,6 +1168,21 @@ public:
 }
 
 /**
+  Returns a 64bit hash of the string data.
+  This hashes the entire data, while hashCode would do sampling for larger 
string sizes.
+
+  @return   a hash code value of the string data
+
+  @see hashCode() for simple hashes
+
+  @since LibreOffice 4.3
+*/
+sal_uInt64 hashCode64() const SAL_THROW(())
+{
+return rtl_ustr_hashCode64_WithLength( pData-buffer, pData-length );
+}
+
+/**
   Returns a hashcode for this string.
 
   @return   a hash code value for this object.
diff --git a/sal/util/sal.map b/sal/util/sal.map
index 83d824c..7ab421f 100644
--- a/sal/util/sal.map
+++ b/sal/util/sal.map
@@ -221,7 +221,6 @@ UDK_3_0_0 {
 rtl_str_shortenedCompareIgnoreAsciiCase_WithLength;
 rtl_str_hashCode;
 rtl_str_hashCode_WithLength;
-rtl_str_hashCode64_WithLength;
 rtl_str_indexOfChar;
 rtl_str_indexOfChar_WithLength;
 rtl_str_indexOfStr;
@@ -653,6 +652,12 @@ LIBO_UDK_4.0 { # symbols available in = LibO 4.0
 rtl_uString_newReplaceAllFromIndex;
 } LIBO_UDK_3.6;
 
+LIBO_UDK_4.3 { #symbols available in = LibO 4.3
+global:
+ rtl_str_hashCode64_WithLength;
+ rtl_ustr_hashCode64_WithLength;
+} LIBO_UDK_4.2;
+
 PRIVATE_1.0 {
 global:
 osl_detail_ObjectRegistry_storeAddresses;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Fwd: Re: [Libreoffice-commits] core.git: Move string hash function into String class.

2014-02-14 Thread Muthu Subramanian

Hi Stephan,

a) Not sure what other things depend on hashCode - I assumed the 
functions which call that

 are ok with sampling based hash and needs it quick?
b) argh :( I added the rtl parts, I guess I missed the helper part - 
will do.

c) Oops will change that
d) Will add this as well
e) this one as well.

I will do the changes depending on (a) - what would you prefer, please? 
Should I just fix hashCode()?
There is specific code there to do the sampling - I thought that was 
intended?

If you ask me, I would prefer to do it separately - like I have done it now.

64bit vs 32bit: I guess its a matter of choice and 64bit is better 
indeed, but not sure about the value addition :(

Maybe, 32bit is sufficient.
(Btw, the intended use of this function is to actually hash many (or 
most) of the objects)


PS: I am CC'ing the list for complicity - please feel free to drop it 
while replying.


Thanks!
Muthu Subramanian

On 02/14/2014 02:59 PM, Stephan Bergmann wrote:

Ach, meant to send this to you instead of the mailing list...

 Original Message 
Subject: Re: [Libreoffice-commits] core.git: Move string hash function 
into String class.

Date: Fri, 14 Feb 2014 10:12:38 +0100
From: Stephan Bergmann sberg...@redhat.com
To: libreoffice@lists.freedesktop.org

Hi Muthu,

tried to reach you on IRC yesterday:

Feb 13 11:03:42 sberg muthusuba, 
8f8bc0dcf3bc253ae49159d52db049767f476ced is broken: (a) the general 
O[U]String::hashCode does sampling-only by design; if that's not 
considered good these days we should change the implementation rather 
than add another function (is 64-bit vs. 32-bit hash code of any 
added value? doubt it given most hash maps will not be too big, 
anyway); (b) adding OString::hashCode64 but not OUString::hashCode64? 
(c) rtl_str_hashCode64_WithLength must
Feb 13 11:03:42 sberg go into a LIBO_UDK_4.3 section in sal.map, 
not UDK_3_0_0; (d) rtl_ustr_hashCode64_WithLength missing from 
sal.map; (e) missing @since tags


Stephan



___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Fwd: Re: [Libreoffice-commits] core.git: Move string hash function into String class.

2014-02-14 Thread Muthu Subramanian


On 02/14/2014 06:39 PM, Stephan Bergmann wrote:


O(1) sampling was apparently considered state of the art when the rtl 
string classes were first created, closely copying java.lang.String, 
which at that time demanded sampling for hashCode(), too---but never 
sampling more than 15 characters, with the obvious (in hindsight, at 
least) performance catastrophes, so they changed it to O(n) somewhere 
along the way.


Based on that, I wouldn't mind changing the rtl string classes' 
hashCode behavior, too.  However, what I very much want to avoid is to 
needlessly enlarge the URE stable interface---i.e., I think we should 
stay with a single, general-purpose hashCode function per class.
If we can have the hashCode do the hash on the entire string - I would 
prefer that too.


Also, given the usage in SdPage::getHash (sd/source/core/sdpage2.cxx), 
I see that the input strings are potentially long and too similar to 
each other for sampling to work well.  However, wouldn't it be better 
anyway to get rid of the stringify function there that builds up a 
long string only to have it reduced to a hash value?
How else would we build a hash value without too much work? I have added 
a hash for SfxItemSet as well recently. (Next step would be to reuse 
that hash in SdPage, of course).


Thanks!
Muthu Subramanian


Stephan


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Fwd: Re: [Libreoffice-commits] core.git: Move string hash function into String class.

2014-02-14 Thread Muthu Subramanian

On 02/14/2014 08:07 PM, Stephan Bergmann wrote:

On 02/14/2014 03:24 PM, Muthu Subramanian wrote:

How else would we build a hash value without too much work?


If you have a structure consisting of multiple parts, compute hash 
values for the individual parts and fold them into a single hash value 
via some suitable function, like f(x, y) = px + y for some prime p.
Ah...that's what I meant by reusing the hash. Even in which case, there 
might be places where we might need large strings (may not make sense to 
break them smaller).
(E.g. SfxItemSet - its nicer to handle it as a group rather than 
individual Items)





I have added a hash for SfxItemSet as well recently. (Next step would
be to reuse that hash in SdPage, of course).


...which I had just identified as dead code.  ;)  Please never 
introduce unused code.  (And those stringify/hashCode functions 
apparently also don't need to be virtual.)
Which one, please? Maybe we are referring to different parts of the 
code? I am not aware of dead code per se :(
hmm... I thought I marked them virtual - maybe not for SdPage - I didn't 
think SdPage required virtual?


Thanks!
Muthu Subramanian



Stephan


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Fwd: Re: [Libreoffice-commits] core.git: Move string hash function into String class.

2014-02-14 Thread Muthu Subramanian

On 02/14/2014 09:39 PM, Stephan Bergmann wrote:


Sure, but how exactly rtl::O[U]String::hashCode should behave is 
somewhat orthogonal to the point that the current design of 
SdPage::getHash is needlessly resource-hungry.  And, as I wrote, I 
wouldn't mind changing the rtl string classes' hashCode behavior.



Then I guess I didn't understand your view point completely :(
I do agree that SdPage::getHash is resource hungry - currently.
It would hopefully reduce its resource hungriness as we progress. Then 
again, it also depends on which resource ;)




SfxItemSet::getHash and SfxItemSet::stringify
Na...these are used... And that is the reason why I moved the hashCode 
out to O[U]String





That's my point---none of the getHash/stringify functions in SdPage, 
SdrObject, nor SfxItemSet should be virtual.
If its allowed to be inherited, its good to be virtual? Especially if we 
are looking at hash folding?


I'll do what best I understood from this conversation (I hope I 
understood right!) and leave the rest to you? Hope that's fine, please?


Thanks!
Muthu Subramanian


Stephan


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: include/svl sd/inc sd/source svl/source

2014-02-13 Thread Muthu Subramanian
 include/svl/itemset.hxx  |2 
 sd/inc/stlpool.hxx   |5 ++
 sd/source/core/drawdoc3.cxx  |   40 ++
 sd/source/core/stlpool.cxx   |   93 ++-
 svl/source/items/itemset.cxx |   23 ++
 5 files changed, 161 insertions(+), 2 deletions(-)

New commits:
commit a4cd841541a729d7b8126d27d91fa28e30b01403
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Feb 13 16:10:47 2014 +0530

n#757432: Styles (rename ) copy to different decks.

While copying slides to different slide decks,
styles were not being copied if there is already one
with the same name. This patch renames and copies those
to keep the formatting intact.

Change-Id: I66f71493f1fd658eed43e39aa7ae7ee7b5463b34

diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx
index 7157ecf..2284281 100644
--- a/include/svl/itemset.hxx
+++ b/include/svl/itemset.hxx
@@ -144,6 +144,8 @@ public:
 virtual SvStream   Store( SvStream , bool bDirect = false ) 
const;
 
 booloperator==(const SfxItemSet ) const;
+virtual sal_uInt64  getHash() const;
+virtual OString stringify() const;
 };
 
 inline void SfxItemSet::SetParent( const SfxItemSet* pNew )
diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx
index 3d2cdc9..8c0e993 100644
--- a/sd/inc/stlpool.hxx
+++ b/sd/inc/stlpool.hxx
@@ -82,6 +82,8 @@ public:
 voidCopyTableStyles(SdStyleSheetPool rSourcePool);
 voidCopyGraphicSheets(SdStyleSheetPool rSourcePool, 
SdStyleSheetVector rCreatedSheets);
 voidCopyCellSheets(SdStyleSheetPool rSourcePool, 
SdStyleSheetVector rCreatedSheets);
+voidRenameAndCopyGraphicSheets(SdStyleSheetPool 
rSourcePool, OUString rRenameSuffix);
+voidRenameAndCopyGraphicSheets(SdStyleSheetPool 
rSourcePool, SdStyleSheetVector rCreatedSheets, OUString rRenameSuffix);
 
 voidCreatePseudosIfNecessary();
 voidUpdateStdNames();
@@ -122,8 +124,11 @@ public:
 virtual void SAL_CALL acquire (void) throw ();
 virtual void SAL_CALL release (void) throw ();
 protected:
+void RenameAndCopySheets(SdStyleSheetPool rSourcePool, SfxStyleFamily 
eFamily, SdStyleSheetVector rCreatedSheets, OUString rRenameSuffix);
+void RenameAndCopySheets(SdStyleSheetPool rSourcePool, SfxStyleFamily 
eFamily, OUString rRenameSuffix);
 void CopySheets(SdStyleSheetPool rSourcePool, SfxStyleFamily eFamily );
 void CopySheets(SdStyleSheetPool rSourcePool, SfxStyleFamily eFamily, 
SdStyleSheetVector rCreatedSheets );
+void CopySheets(SdStyleSheetPool rSourcePool, SfxStyleFamily eFamily, 
SdStyleSheetVector rCreatedSheets, OUString rRenameSuffix );
 
 virtual SfxStyleSheetBase* Create(const OUString rName, SfxStyleFamily 
eFamily, sal_uInt16 nMask);
 virtual SfxStyleSheetBase* Create(const SdStyleSheet rStyle);
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 2622122..03c0cfd 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -357,6 +357,16 @@ lcl_removeUnusedStyles(SfxStyleSheetBasePool* const 
pStyleSheetPool, SdStyleShee
 rStyles = aUsedStyles;
 }
 
+SfxStyleSheet *lcl_findStyle(SdStyleSheetVector rStyles, OUString aStyleName)
+{
+for(SdStyleSheetVector::const_iterator aIt(rStyles.begin()), 
aLast(rStyles.end()); aIt != aLast; ++aIt)
+{
+if((*aIt)-GetName().startsWith(aStyleName))
+return (*aIt).get();
+}
+return NULL;
+}
+
 }
 
 sal_Bool SdDrawDocument::InsertBookmarkAsPage(
@@ -510,7 +520,10 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
 // are then removed at the end of the function, where we also create
 // undo records for the inserted styles.
 SdStyleSheetVector aNewGraphicStyles;
-pStyleSheetPool-CopyGraphicSheets(*pBookmarkStyleSheetPool, 
aNewGraphicStyles);
+OUString aRenameStr;
+if(!bReplace  !bNoDialogs)
+aRenameStr = OUString(_);
+pStyleSheetPool-RenameAndCopyGraphicSheets(*pBookmarkStyleSheetPool, 
aNewGraphicStyles, aRenameStr);
 SdStyleSheetVector aNewCellStyles;
 pStyleSheetPool-CopyCellSheets(*pBookmarkStyleSheetPool, aNewCellStyles);
 
@@ -910,6 +923,31 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
 // Make absolutely sure no double masterpages are there
 RemoveUnnecessaryMasterPages(NULL, sal_True, sal_True);
 
+// Rename object styles if necessary
+if(!aRenameStr.isEmpty())
+{
+try
+{
+for(sal_uInt32 p = nInsertPos; p  (nInsertPos + nBMSdPageCount); 
p++)
+{
+SdPage *pPg = (SdPage *) GetPage(p);
+for(sal_uIntPtr i = 0; i  pPg-GetObjCount(); i++)
+{
+if(pPg-GetObj(i)-GetStyleSheet())
+{
+OUString aStyleName = 
pPg-GetObj(i)-GetStyleSheet

[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - include/oox oox/source

2014-02-13 Thread Muthu Subramanian
 include/oox/core/contexthandler2.hxx |2 ++
 oox/source/drawingml/textbodycontext.cxx |1 +
 2 files changed, 3 insertions(+)

New commits:
commit 4334044106af01290d649ac788a89b81e8a75029
Author: Muthu Subramanian sumu...@collabora.com
Date:   Tue Dec 10 16:56:25 2013 +0530

fdo#73860 n#828390: New line is dropped while importing text.

(cherry picked from commit 840f4fc4d677740fc4b0ebcb658f4a828e184dad)
Signed-off-by: David Tardon dtar...@redhat.com

Change-Id: Id36181f64bd154d271446ef27a124a81af5c8620

diff --git a/include/oox/core/contexthandler2.hxx 
b/include/oox/core/contexthandler2.hxx
index d60cf38..48edd9a 100644
--- a/include/oox/core/contexthandler2.hxx
+++ b/include/oox/core/contexthandler2.hxx
@@ -206,6 +206,8 @@ private:
 
 ContextStackRef mxContextStack; /// Stack of all processed 
elements.
 size_t  mnRootStackSize;/// Stack size on construction 
time.
+
+protected:
 boolmbEnableTrimSpace;  /// True = trim whitespace in 
characters().
 };
 
diff --git a/oox/source/drawingml/textbodycontext.cxx 
b/oox/source/drawingml/textbodycontext.cxx
index 80e5657..ff23c24 100644
--- a/oox/source/drawingml/textbodycontext.cxx
+++ b/oox/source/drawingml/textbodycontext.cxx
@@ -52,6 +52,7 @@ TextParagraphContext::TextParagraphContext( 
ContextHandler2Helper rParent, Text
 : ContextHandler2( rParent )
 , mrParagraph( rPara )
 {
+mbEnableTrimSpace = false;
 }
 
 // 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - 2 commits - sal/inc sal/rtl sal/util sd/inc sd/source svl/inc svl/source

2014-02-13 Thread Muthu Subramanian
 sal/inc/rtl/string.h |   18 
 sal/inc/rtl/string.hxx   |   13 ++
 sal/inc/rtl/ustring.h|   18 
 sal/rtl/source/strtmpl.cxx   |   13 ++
 sal/util/sal.map |1 
 sd/inc/stlpool.hxx   |5 ++
 sd/source/core/drawdoc3.cxx  |   40 ++
 sd/source/core/sdpage2.cxx   |   12 -
 sd/source/core/stlpool.cxx   |   93 ++-
 svl/inc/svl/itemset.hxx  |2 
 svl/source/items/itemset.cxx |   23 ++
 11 files changed, 225 insertions(+), 13 deletions(-)

New commits:
commit 9f8baf0ed263889e3e77ea12ccb908020fee05a8
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Feb 13 21:54:19 2014 +0530

n#757432: Styles (rename ) copy to different decks.

Ported from: a4cd841541a729d7b8126d27d91fa28e30b01403

Change-Id: I73ebaec651a195afbf60f5338c487c7750298fef

diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx
index 4833dd8..e5f374f 100644
--- a/sd/inc/stlpool.hxx
+++ b/sd/inc/stlpool.hxx
@@ -82,6 +82,8 @@ public:
 voidCopyTableStyles(SdStyleSheetPool rSourcePool);
 voidCopyGraphicSheets(SdStyleSheetPool rSourcePool, 
SdStyleSheetVector rCreatedSheets);
 voidCopyCellSheets(SdStyleSheetPool rSourcePool, 
SdStyleSheetVector rCreatedSheets);
+voidRenameAndCopyGraphicSheets(SdStyleSheetPool 
rSourcePool, OUString rRenameSuffix);
+voidRenameAndCopyGraphicSheets(SdStyleSheetPool 
rSourcePool, SdStyleSheetVector rCreatedSheets, OUString rRenameSuffix);
 
 voidCreatePseudosIfNecessary();
 voidUpdateStdNames();
@@ -122,8 +124,11 @@ public:
 virtual void SAL_CALL acquire (void) throw ();
 virtual void SAL_CALL release (void) throw ();
 protected:
+void RenameAndCopySheets(SdStyleSheetPool rSourcePool, SfxStyleFamily 
eFamily, SdStyleSheetVector rCreatedSheets, OUString rRenameSuffix);
+void RenameAndCopySheets(SdStyleSheetPool rSourcePool, SfxStyleFamily 
eFamily, OUString rRenameSuffix);
 void CopySheets(SdStyleSheetPool rSourcePool, SfxStyleFamily eFamily );
 void CopySheets(SdStyleSheetPool rSourcePool, SfxStyleFamily eFamily, 
SdStyleSheetVector rCreatedSheets );
+void CopySheets(SdStyleSheetPool rSourcePool, SfxStyleFamily eFamily, 
SdStyleSheetVector rCreatedSheets, OUString rRenameSuffix );
 
 virtual SfxStyleSheetBase* Create(const String rName, SfxStyleFamily 
eFamily, sal_uInt16 nMask);
 virtual SfxStyleSheetBase* Create(const SdStyleSheet rStyle);
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 7f493d8..38663eb 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -385,6 +385,16 @@ lcl_removeUnusedStyles(SfxStyleSheetBasePool* const 
pStyleSheetPool, SdStyleShee
 rStyles = aUsedStyles;
 }
 
+SfxStyleSheet *lcl_findStyle(SdStyleSheetVector rStyles, OUString aStyleName)
+{
+for(SdStyleSheetVector::const_iterator aIt(rStyles.begin()), 
aLast(rStyles.end()); aIt != aLast; ++aIt)
+{
+if(OUString((*aIt)-GetName()).startsWith(aStyleName))
+return (*aIt).get();
+}
+return NULL;
+}
+
 }
 
 sal_Bool SdDrawDocument::InsertBookmarkAsPage(
@@ -545,7 +555,10 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
 // are then removed at the end of the function, where we also create
 // undo records for the inserted styles.
 SdStyleSheetVector aNewGraphicStyles;
-pStyleSheetPool-CopyGraphicSheets(*pBookmarkStyleSheetPool, 
aNewGraphicStyles);
+OUString aRenameStr;
+if(!bReplace  !bNoDialogs)
+aRenameStr = OUString(_);
+pStyleSheetPool-RenameAndCopyGraphicSheets(*pBookmarkStyleSheetPool, 
aNewGraphicStyles, aRenameStr);
 SdStyleSheetVector aNewCellStyles;
 pStyleSheetPool-CopyCellSheets(*pBookmarkStyleSheetPool, aNewCellStyles);
 
@@ -952,6 +965,31 @@ sal_Bool SdDrawDocument::InsertBookmarkAsPage(
 // Make absolutely sure no double masterpages are there
 RemoveUnnecessaryMasterPages(NULL, sal_True, sal_True);
 
+// Rename object styles if necessary
+if(!aRenameStr.isEmpty())
+{
+try
+{
+for(sal_uInt32 p = nInsertPos; p  (nInsertPos + nBMSdPageCount); 
p++)
+{
+SdPage *pPg = (SdPage *) GetPage(p);
+for(sal_uIntPtr i = 0; i  pPg-GetObjCount(); i++)
+{
+if(pPg-GetObj(i)-GetStyleSheet())
+{
+OUString aStyleName = 
pPg-GetObj(i)-GetStyleSheet()-GetName();
+SfxStyleSheet *pSheet = 
lcl_findStyle(aNewGraphicStyles, aStyleName + aRenameStr);
+if(pSheet != NULL)
+pPg-GetObj(i)-SetStyleSheet(pSheet, true);
+}
+}
+}
+}
+catch(...)
+{
+OSL_FAIL(Exception while

[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sd/qa

2014-02-13 Thread Muthu Subramanian
 sd/qa/unit/data/xml/n819614_0.xml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9ee8df7b702a7d4b0f679d18deda30fbbad27f50
Author: Muthu Subramanian sumu...@collabora.com
Date:   Tue Dec 10 21:57:11 2013 +0530

Fix unit test case.

This would test for white spaces in text import.

(cherry picked from commit a850e62cd26a58a6ee9f3a2c8faa75ab10e96f8f)
Signed-off-by: David Tardon dtar...@redhat.com

diff --git a/sd/qa/unit/data/xml/n819614_0.xml 
b/sd/qa/unit/data/xml/n819614_0.xml
index 713ad74..6a834be 100644
--- a/sd/qa/unit/data/xml/n819614_0.xml
+++ b/sd/qa/unit/data/xml/n819614_0.xml
@@ -3418,7 +3418,7 @@
  /PropertyValue
 /CustomShapeGeometry
/XShape
-   XShape positionX=182 positionY=4529 sizeX=2743 sizeY=1244 
type=com.sun.star.drawing.CustomShape text=A fontHeight=18.00 
fontColor= textAutoGrowHeight=false textAutoGrowWidth=false 
textContourFrame=false textFitToSize=NONE textHorizontalAdjust=BLOCK 
textVerticalAdjust=CENTER textLeftDistance=12 textRightDistance=12 
textUpperDistance=12 textLowerDistance=12 textMaximumFrameHeight=0 
textMaximumFrameWidth=0 textMinimumFrameHeight=0 textMinimumFrameWidth=0 
textAnimationAmount=0 textAnimationCount=0 textAnimationDelay=0 
textAnimationDirection=LEFT textAnimationKind=NONE 
textAnimationStartInside=false textAnimationStopInside=false 
textWritingMode=LR_TB fillStyle=GRADIENT fillColor=729fcf 
fillTransparence=0 fillTransparenceGradientName=
+   XShape positionX=182 positionY=4529 sizeX=2743 sizeY=1244 
type=com.sun.star.drawing.CustomShape text=A  fontHeight=18.00 
fontColor= textAutoGrowHeight=false textAutoGrowWidth=false 
textContourFrame=false textFitToSize=NONE textHorizontalAdjust=BLOCK 
textVerticalAdjust=CENTER textLeftDistance=12 textRightDistance=12 
textUpperDistance=12 textLowerDistance=12 textMaximumFrameHeight=0 
textMaximumFrameWidth=0 textMinimumFrameHeight=0 textMinimumFrameWidth=0 
textAnimationAmount=0 textAnimationCount=0 textAnimationDelay=0 
textAnimationDirection=LEFT textAnimationKind=NONE 
textAnimationStartInside=false textAnimationStopInside=false 
textWritingMode=LR_TB fillStyle=GRADIENT fillColor=729fcf 
fillTransparence=0 fillTransparenceGradientName=
 FillTransparenceGradient style=LINEAR startColor=00 
endColor=ff angle=0 border=0 xOffset=50 yOffset=50 
startIntensity=100 endIntensity=100 stepCount=0/
 FillGradient style=AXIAL startColor=ff endColor=ff 
angle=1800 border=0 xOffset=0 yOffset=0 startIntensity=100 
endIntensity=100 stepCount=0/
 FillHatch style=SINGLE color=3465a4 distance=20 angle=0/
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/rtl sal/rtl sal/util sd/source

2014-02-12 Thread Muthu Subramanian
 include/rtl/string.h   |   18 ++
 include/rtl/string.hxx |   13 +
 include/rtl/ustring.h  |   18 ++
 sal/rtl/strtmpl.cxx|   13 +
 sal/util/sal.map   |1 +
 sd/source/core/sdpage2.cxx |   12 +---
 6 files changed, 64 insertions(+), 11 deletions(-)

New commits:
commit 8f8bc0dcf3bc253ae49159d52db049767f476ced
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Feb 13 13:13:53 2014 +0530

Move string hash function into String class.

hashCode() seems to do sampling while creating the hash.
hashCode64() will not.

Change-Id: Id30f5a2a774cf5244dbc00da9649e95a532484be

diff --git a/include/rtl/string.h b/include/rtl/string.h
index 32344bf..71e0955 100644
--- a/include/rtl/string.h
+++ b/include/rtl/string.h
@@ -277,6 +277,24 @@ SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_hashCode(
 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_str_hashCode_WithLength(
 const sal_Char * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
 
+/** Return a hash code (64bit) for a string.
+
+It is not allowed to store the hash code persistently, because later
+versions could return other hash codes.
+
+@param str
+a string.  Need not be null-terminated, but must be at least as long as
+the specified len.
+
+@param len
+the length of the string.
+
+@return
+a hash code for the given string.
+ */
+SAL_DLLPUBLIC sal_uInt64 SAL_CALL rtl_str_hashCode64_WithLength(
+const sal_Char * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
+
 /** Search for the first occurrence of a character within a string.
 
 The string must be null-terminated.
diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx
index fb7283b..24bb980 100644
--- a/include/rtl/string.hxx
+++ b/include/rtl/string.hxx
@@ -892,6 +892,19 @@ public:
 }
 
 /**
+  Returns a 64bit hash of the string data.
+  This hashes the entire data, while hashCode would do sampling for larger 
string sizes.
+
+  @return   a hash code value of the string data
+
+  @see hashCode() for simple hashes
+*/
+sal_uInt64 hashCode64() const SAL_THROW(())
+{
+return rtl_str_hashCode64_WithLength( pData-buffer, pData-length );
+}
+
+/**
   Returns a hashcode for this string.
 
   @return   a hash code value for this object.
diff --git a/include/rtl/ustring.h b/include/rtl/ustring.h
index 80c6bcc..2069899 100644
--- a/include/rtl/ustring.h
+++ b/include/rtl/ustring.h
@@ -551,6 +551,24 @@ SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_ustr_hashCode(
 SAL_DLLPUBLIC sal_Int32 SAL_CALL rtl_ustr_hashCode_WithLength(
 const sal_Unicode * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
 
+/** Return a hash code (64bit) for a string.
+
+It is not allowed to store the hash code persistently, because later
+versions could return other hash codes.
+
+@param str
+a string.  Need not be null-terminated, but must be at least as long as
+the specified len.
+
+@param len
+the length of the string.
+
+@return
+a hash code for the given string.
+ */
+SAL_DLLPUBLIC sal_uInt64 SAL_CALL rtl_ustr_hashCode64_WithLength(
+const sal_Unicode * str, sal_Int32 len ) SAL_THROW_EXTERN_C();
+
 /** Search for the first occurrence of a character within a string.
 
 The string must be null-terminated.
diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx
index fc618d3..f2eac10 100644
--- a/sal/rtl/strtmpl.cxx
+++ b/sal/rtl/strtmpl.cxx
@@ -252,6 +252,19 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( hashCode )( const 
IMPL_RTL_STRCODE* pStr )
 
 /* --- */
 
+sal_uInt64 SAL_CALL IMPL_RTL_STRNAME( hashCode64_WithLength )( const 
IMPL_RTL_STRCODE* pStr,
+   sal_Int32 nLen )
+SAL_THROW_EXTERN_C()
+{
+sal_uInt64 nHash = 0;
+
+for( sal_Int32 i = 0; i  nLen; i++ )
+nHash = (nHash  5) - nHash + *pStr++;
+return nHash;
+}
+
+/* --- */
+
 sal_Int32 SAL_CALL IMPL_RTL_STRNAME( hashCode_WithLength )( const 
IMPL_RTL_STRCODE* pStr,
 sal_Int32 nLen )
 SAL_THROW_EXTERN_C()
diff --git a/sal/util/sal.map b/sal/util/sal.map
index 1456d6d..470da31 100644
--- a/sal/util/sal.map
+++ b/sal/util/sal.map
@@ -221,6 +221,7 @@ UDK_3_0_0 {
 rtl_str_shortenedCompareIgnoreAsciiCase_WithLength;
 rtl_str_hashCode;
 rtl_str_hashCode_WithLength;
+rtl_str_hashCode64_WithLength;
 rtl_str_indexOfChar;
 rtl_str_indexOfChar_WithLength;
 rtl_str_indexOfStr;
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 0f7f7cf..a870895 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -54,16 +54,6 @@ using namespace ::com::sun::star::office;
 
 extern void

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - oox/source sd/qa

2014-02-04 Thread Muthu Subramanian
 oox/source/drawingml/customshapeproperties.cxx |6 ++
 sd/qa/unit/data/xml/n762695_0.xml  |2 +-
 sd/qa/unit/data/xml/n762695_1.xml  |4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit d08422551128967bdabcd4a844c8598df129f2e5
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Dec 27 19:59:22 2013 +0530

fdo#72998: Custom shapes have improper size.

diff --git a/oox/source/drawingml/customshapeproperties.cxx 
b/oox/source/drawingml/customshapeproperties.cxx
index d83b3e3..c54a021 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -213,7 +213,13 @@ void CustomShapeProperties::pushToPropSet( const 
::oox::core::FilterBase /* rFi
 aPropertyMap[ PROP_Type ] = OUString( ooxml-non-primitive );
 aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX );
 aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY );
+// Note 1: If Equations are defined - they are processed using 
internal div by 360 coordinates
+// while if they are not, standard ooxml coordinates are used.
+// This size specifically affects scaling.
+// Note 2: Width and Height are set to 0 to force scaling to 1.
 awt::Rectangle aViewBox( 0, 0, aSize.Width, aSize.Height );
+if( maGuideList.size() )
+aViewBox = awt::Rectangle( 0, 0, 0, 0 );
 aPropertyMap[ PROP_ViewBox ] = aViewBox;
 
 Sequence EnhancedCustomShapeAdjustmentValue  aAdjustmentValues( 
maAdjustmentGuideList.size() );
diff --git a/sd/qa/unit/data/xml/n762695_0.xml 
b/sd/qa/unit/data/xml/n762695_0.xml
index 68b99ab..a2eba94 100644
--- a/sd/qa/unit/data/xml/n762695_0.xml
+++ b/sd/qa/unit/data/xml/n762695_0.xml
@@ -82,7 +82,7 @@
/PropertyValue
PropertyValue name=Type value=ooxml-non-primitive handle=0 
propertyState=DIRECT_VALUE/
PropertyValue name=ViewBox
-ViewBox x=0 y=0 width=4820911 height=3908235/
+ViewBox x=0 y=0 width=0 height=0/
/PropertyValue
   /CustomShapeGeometry
  /XShape
diff --git a/sd/qa/unit/data/xml/n762695_1.xml 
b/sd/qa/unit/data/xml/n762695_1.xml
index b5293ab..8d7b6fa 100644
--- a/sd/qa/unit/data/xml/n762695_1.xml
+++ b/sd/qa/unit/data/xml/n762695_1.xml
@@ -82,7 +82,7 @@
/PropertyValue
PropertyValue name=Type value=ooxml-non-primitive handle=0 
propertyState=DIRECT_VALUE/
PropertyValue name=ViewBox
-ViewBox x=0 y=0 width=6477000 height=2743200/
+ViewBox x=0 y=0 width=0 height=0/
/PropertyValue
   /CustomShapeGeometry
  /XShape
@@ -168,7 +168,7 @@
/PropertyValue
PropertyValue name=Type value=ooxml-non-primitive handle=0 
propertyState=DIRECT_VALUE/
PropertyValue name=ViewBox
-ViewBox x=0 y=0 width=6365875 height=3430587/
+ViewBox x=0 y=0 width=0 height=0/
/PropertyValue
   /CustomShapeGeometry
  /XShape
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: editeng/source include/editeng oox/source sd/source svx/source

2014-01-27 Thread Muthu Subramanian
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |1 
 editeng/source/editeng/editattr.cxx |   17 +++-
 editeng/source/editeng/editattr.hxx |   12 
 editeng/source/editeng/editdoc.cxx  |9 ++
 editeng/source/editeng/editeng.cxx  |2 +
 editeng/source/editeng/eerdll.cxx   |   10 ---
 editeng/source/uno/unofdesc.cxx |1 
 editeng/source/uno/unotext.cxx  |2 -
 include/editeng/eeitem.hxx  |   17 ++--
 include/editeng/eeitemid.hxx|2 -
 include/editeng/unoprnms.hxx|1 
 include/editeng/unotext.hxx |1 
 oox/source/drawingml/textcharacterpropertiescontext.cxx |2 +
 sd/source/core/drawdoc4.cxx |2 +
 sd/source/core/stlpool.cxx  |5 +++
 sd/source/ui/view/drtxtob1.cxx  |7 
 svx/source/svdraw/svdotextdecomposition.cxx |5 ++-
 svx/source/tbxctrls/tbcontrl.cxx|6 
 svx/source/unodraw/unoprov.cxx  |1 
 19 files changed, 86 insertions(+), 17 deletions(-)

New commits:
commit 887bc4dd3e62fe6dd19dc9d1c3ba273a5b21b5ec
Author: Muthu Subramanian sumu...@collabora.com
Date:   Mon Jan 27 16:23:44 2014 +0530

cp#125: Import casemaps from pptx.

Note: This only imports it and it may not be
even possible to export (even to othe formats).

Change-Id: I8e104f1bc3a95c42ac932b6ab58365dc113fb2e0

diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx 
b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 75dce25..1cf13e0 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -885,6 +885,7 @@ namespace accessibility
 STR(CharPosture);
 STR(CharShadowed);
 STR(CharStrikeout);
+STR(CharCaseMap);
 STR(CharUnderline);
 STR(CharUnderlineColor);
 STR(CharWeight);
diff --git a/editeng/source/editeng/editattr.cxx 
b/editeng/source/editeng/editattr.cxx
index 1014424..d5e7e23 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -43,6 +43,7 @@
 #include editeng/emphasismarkitem.hxx
 #include editeng/charscaleitem.hxx
 #include editeng/charreliefitem.hxx
+#include editeng/cmapitem.hxx
 
 #include editattr.hxx
 
@@ -182,7 +183,7 @@ void EditCharAttribFontWidth::SetFont( SvxFont /*rFont*/, 
OutputDevice* )
 EditCharAttribStrikeout::EditCharAttribStrikeout( const SvxCrossedOutItem 
rAttr, sal_uInt16 _nStart, sal_uInt16 _nEnd )
 : EditCharAttrib( rAttr, _nStart, _nEnd )
 {
-DBG_ASSERT( rAttr.Which() == EE_CHAR_STRIKEOUT, Not a Size attribute! );
+DBG_ASSERT( rAttr.Which() == EE_CHAR_STRIKEOUT, Not a Strikeout 
attribute! );
 }
 
 void EditCharAttribStrikeout::SetFont( SvxFont rFont, OutputDevice* )
@@ -191,6 +192,20 @@ void EditCharAttribStrikeout::SetFont( SvxFont rFont, 
OutputDevice* )
 }
 
 // -
+// class EditCharAttribCaseMap
+// -
+EditCharAttribCaseMap::EditCharAttribCaseMap( const SvxCaseMapItem rAttr, 
sal_uInt16 _nStart, sal_uInt16 _nEnd )
+: EditCharAttrib( rAttr, _nStart, _nEnd )
+{
+DBG_ASSERT( rAttr.Which() == EE_CHAR_CASEMAP, Not a CaseMap Item! );
+}
+
+void EditCharAttribCaseMap::SetFont( SvxFont rFont, OutputDevice* )
+{
+rFont.SetCaseMap( ((const SvxCaseMapItem*)GetItem())-GetCaseMap() );
+}
+
+// -
 // class EditCharAttribColor
 // -
 EditCharAttribColor::EditCharAttribColor( const SvxColorItem rAttr, 
sal_uInt16 _nStart, sal_uInt16 _nEnd )
diff --git a/editeng/source/editeng/editattr.hxx 
b/editeng/source/editeng/editattr.hxx
index 4fb657c..3917427 100644
--- a/editeng/source/editeng/editattr.hxx
+++ b/editeng/source/editeng/editattr.hxx
@@ -47,6 +47,7 @@ class SvxEmphasisMarkItem;
 class SvxCharReliefItem;
 class SfxVoidItem;
 class OutputDevice;
+class SvxCaseMapItem;
 
 #define CH_FEATURE_OLD  (sal_uInt8) 0xFF
 #define CH_FEATURE  (sal_Unicode)   0x01
@@ -219,6 +220,17 @@ public:
 };
 
 // -
+// class EditCharAttribCaseMap
+// -
+class EditCharAttribCaseMap : public EditCharAttrib
+{
+public:
+EditCharAttribCaseMap( const

[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source

2014-01-08 Thread Muthu Subramanian
 oox/source/drawingml/chart/seriesconverter.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e8ac85752a2e07ceacb3b2f3e4eab3bc35a45c3d
Author: Muthu Subramanian sumu...@collabora.com
Date:   Tue Oct 22 15:13:41 2013 +0530

n#839727 / rhbz#1038176 Crash fix

(cherry picked from commit e5f24e0c7c8f4799223c19359f4228f0b1a71461)

Change-Id: I8d733afbbc05900c68217ead44de798c1263ca84
Reviewed-on: https://gerrit.libreoffice.org/7309
Reviewed-by: Andras Timar andras.ti...@collabora.com
Tested-by: Andras Timar andras.ti...@collabora.com

diff --git a/oox/source/drawingml/chart/seriesconverter.cxx 
b/oox/source/drawingml/chart/seriesconverter.cxx
index 9ef1f3f..020b141 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -632,7 +632,8 @@ Reference XDataSeries  SeriesConverter::createDataSeries( 
const TypeGroupConve
 {
 // Use number format code from Value series
 DataSourceModel* pValues = mrModel.maSources.get( 
SeriesModel::VALUES ).get();
-xLabels-maNumberFormat.maFormatCode = 
pValues-mxDataSeq-maFormatCode;
+if( pValues )
+xLabels-maNumberFormat.maFormatCode = 
pValues-mxDataSeq-maFormatCode;
 }
 DataLabelsConverter aLabelsConv( *this, *xLabels );
 aLabelsConv.convertFromModel( xDataSeries, rTypeGroup );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - oox/source sd/qa

2014-01-07 Thread Muthu Subramanian
 oox/source/drawingml/customshapeproperties.cxx |6 ++
 sd/qa/unit/data/xml/n762695_0.xml  |2 +-
 sd/qa/unit/data/xml/n762695_1.xml  |4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit bec40dcd4f36bf774f6bc2d805a646ba2232175c
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Dec 27 19:59:22 2013 +0530

fdo#72998: Custom shapes have improper size.

Change-Id: I4f8b7f80f89ad713e274acf6fc93bb415e660baf

diff --git a/oox/source/drawingml/customshapeproperties.cxx 
b/oox/source/drawingml/customshapeproperties.cxx
index 48ace8b..247e8cf 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -213,7 +213,13 @@ void CustomShapeProperties::pushToPropSet( const 
::oox::core::FilterBase /* rFi
 aPropertyMap[ PROP_Type ] = OUString( ooxml-non-primitive );
 aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX );
 aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY );
+// Note 1: If Equations are defined - they are processed using 
internal div by 360 coordinates
+// while if they are not, standard ooxml coordinates are used.
+// This size specifically affects scaling.
+// Note 2: Width and Height are set to 0 to force scaling to 1.
 awt::Rectangle aViewBox( 0, 0, aSize.Width, aSize.Height );
+if( maGuideList.size() )
+aViewBox = awt::Rectangle( 0, 0, 0, 0 );
 aPropertyMap[ PROP_ViewBox ] = aViewBox;
 
 Sequence EnhancedCustomShapeAdjustmentValue  aAdjustmentValues( 
maAdjustmentGuideList.size() );
diff --git a/sd/qa/unit/data/xml/n762695_0.xml 
b/sd/qa/unit/data/xml/n762695_0.xml
index 5f3080f..d55c979 100644
--- a/sd/qa/unit/data/xml/n762695_0.xml
+++ b/sd/qa/unit/data/xml/n762695_0.xml
@@ -83,7 +83,7 @@
/PropertyValue
PropertyValue name=Type value=ooxml-non-primitive handle=0 
propertyState=DIRECT_VALUE/
PropertyValue name=ViewBox
-ViewBox x=0 y=0 width=4820911 height=3908235/
+ViewBox x=0 y=0 width=0 height=0/
/PropertyValue
   /CustomShapeGeometry
  /XShape
diff --git a/sd/qa/unit/data/xml/n762695_1.xml 
b/sd/qa/unit/data/xml/n762695_1.xml
index d746783..fb24ba08 100644
--- a/sd/qa/unit/data/xml/n762695_1.xml
+++ b/sd/qa/unit/data/xml/n762695_1.xml
@@ -83,7 +83,7 @@
/PropertyValue
PropertyValue name=Type value=ooxml-non-primitive handle=0 
propertyState=DIRECT_VALUE/
PropertyValue name=ViewBox
-ViewBox x=0 y=0 width=6477000 height=2743200/
+ViewBox x=0 y=0 width=0 height=0/
/PropertyValue
   /CustomShapeGeometry
  /XShape
@@ -170,7 +170,7 @@
/PropertyValue
PropertyValue name=Type value=ooxml-non-primitive handle=0 
propertyState=DIRECT_VALUE/
PropertyValue name=ViewBox
-ViewBox x=0 y=0 width=6365875 height=3430587/
+ViewBox x=0 y=0 width=0 height=0/
/PropertyValue
   /CustomShapeGeometry
  /XShape
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.0' - 10 commits - oox/inc oox/source sal/inc sd/inc sd/source svl/inc svl/source svx/inc svx/source

2014-01-03 Thread Muthu Subramanian
 oox/inc/oox/core/contexthandler2.hxx|2 
 oox/inc/oox/drawingml/textcharacterproperties.hxx   |1 
 oox/source/drawingml/textcharacterproperties.cxx|   10 
 oox/source/drawingml/textcharacterpropertiescontext.cxx |2 
 oox/source/export/drawingml.cxx |   10 ++--
 sal/inc/rtl/strbuf.hxx  |   17 ++
 sd/inc/sdpage.hxx   |3 +
 sd/source/core/drawdoc3.cxx |   22 ++--
 sd/source/core/sdpage2.cxx  |   37 ++
 svl/inc/svl/itemset.hxx |1 
 svl/source/items/itemset.cxx|   16 ++
 svx/inc/svx/svdobj.hxx  |2 
 svx/source/svdraw/svdobj.cxx|   40 
 13 files changed, 152 insertions(+), 11 deletions(-)

New commits:
commit ac139769216942c409d7c5d40163ad29cadadf5a
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Jan 2 14:03:22 2014 +0530

Fix compilation problems.

diff --git a/oox/source/drawingml/textbodycontext.cxx 
b/oox/source/drawingml/textbodycontext.cxx
index a8b3d64..7bc29a0 100644
--- a/oox/source/drawingml/textbodycontext.cxx
+++ b/oox/source/drawingml/textbodycontext.cxx
@@ -54,7 +54,6 @@ TextParagraphContext::TextParagraphContext( ContextHandler 
rParent, TextParagra
 : ContextHandler( rParent )
 , mrParagraph( rPara )
 {
-mbEnableTrimSpace = false;
 }
 
 // 
diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index c531bc1..bc23204 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -21,7 +21,7 @@
 #include com/sun/star/lang/Locale.hpp
 #include com/sun/star/awt/FontSlant.hpp
 #include com/sun/star/awt/FontWeight.hpp
-#include editeng/escapementitem.hxx
+#include editeng/escpitem.hxx
 #include oox/helper/helper.hxx
 #include oox/helper/propertyset.hxx
 #include oox/core/xmlfilterbase.hxx
commit e5cd547846663c69bd66aa1ba94e3b4dcce30a89
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 19 16:48:20 2013 +0530

n#828390: Bullet sizes set wrong.

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index ff3f62a..3986989 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1102,7 +1102,7 @@ void DrawingML::WriteParagraphNumbering( Reference 
XPropertySet  rXPropSet, sa
 } else {
 if( nBulletRelSize  nBulletRelSize != 100 )
 mpFS-singleElementNS( XML_a, XML_buSzPct,
-   XML_val, IS( std::min( 
(sal_Int32)25000, std::max( (sal_Int32)40, 1000*( (sal_Int32)nBulletRelSize 
) ) ) ), FSEND );
+   XML_val, IS( std::max( 
(sal_Int32)25000, std::min( (sal_Int32)40, 1000*( (sal_Int32)nBulletRelSize 
) ) ) ), FSEND );
 if( bHasFontDesc )
 mpFS-singleElementNS( XML_a, XML_buFont,
XML_typeface, 
OUStringToOString( aFontDesc.Name, RTL_TEXTENCODING_UTF8 ).getStr(),
commit c8f4d9b98228d241d3798ce839b3553a2708c36b
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 12 18:24:42 2013 +0530

n#828390: Reset charescapement.

Unless the value is reset - the escapement
seems to continue to the next set of textruns.

diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index 4230148..c531bc1 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -129,6 +129,9 @@ void TextCharacterProperties::pushToPropMap( PropertyMap 
rPropMap, const XmlFil
 if( moBaseline.has() ) {
 rPropMap[ PROP_CharEscapement ] = sal_Int16(moBaseline.get( 0 ) / 
1000);
 rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(DFLT_ESC_PROP);
+} else {
+rPropMap[ PROP_CharEscapement ] = sal_Int16(0);
+rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(100); // 100%
 }
 
 if( !bUseOptional || moBold.has() ) {
commit cd793642b76d69155e581f3d7df049c08a4195ee
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Dec 18 20:19:48 2013 +0530

Fix fdo#70220 Superscript not imported from pptx.

Ported from: 840a8573c8cebe67ddd3c9fe106c7dbd789bb334
(Original Author: Thorsten)

diff --git a/oox/inc/oox/drawingml/textcharacterproperties.hxx 
b/oox/inc/oox/drawingml/textcharacterproperties.hxx
index 3dc4062..1073fa6 100644
--- a/oox/inc/oox/drawingml/textcharacterproperties.hxx
+++ b/oox/inc/oox/drawingml/textcharacterproperties.hxx
@@ -46,6 +46,7

[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - oox/source

2014-01-02 Thread Muthu Subramanian
 oox/source/drawingml/textbodycontext.cxx |1 -
 oox/source/drawingml/textcharacterproperties.cxx |2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 950de3b92fbab4eee931973bb95170e205b16a4b
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Jan 2 14:03:22 2014 +0530

Fix compilation problems.

diff --git a/oox/source/drawingml/textbodycontext.cxx 
b/oox/source/drawingml/textbodycontext.cxx
index a8b3d64..7bc29a0 100644
--- a/oox/source/drawingml/textbodycontext.cxx
+++ b/oox/source/drawingml/textbodycontext.cxx
@@ -54,7 +54,6 @@ TextParagraphContext::TextParagraphContext( ContextHandler 
rParent, TextParagra
 : ContextHandler( rParent )
 , mrParagraph( rPara )
 {
-mbEnableTrimSpace = false;
 }
 
 // 
diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index c531bc1..bc23204 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -21,7 +21,7 @@
 #include com/sun/star/lang/Locale.hpp
 #include com/sun/star/awt/FontSlant.hpp
 #include com/sun/star/awt/FontWeight.hpp
-#include editeng/escapementitem.hxx
+#include editeng/escpitem.hxx
 #include oox/helper/helper.hxx
 #include oox/helper/propertyset.hxx
 #include oox/core/xmlfilterbase.hxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/qa

2013-12-30 Thread Muthu Subramanian
 sd/qa/unit/data/pptx/cshapes.pptx |binary
 sd/qa/unit/import-tests.cxx   |   26 ++
 2 files changed, 26 insertions(+)

New commits:
commit ee6eadfc617a1ce3bc2b489523ac713b99482404
Author: Muthu Subramanian sumu...@collabora.com
Date:   Mon Dec 30 18:05:48 2013 +0530

fdo#72998: Add unit test case.

diff --git a/sd/qa/unit/data/pptx/cshapes.pptx 
b/sd/qa/unit/data/pptx/cshapes.pptx
new file mode 100644
index 000..b546206
Binary files /dev/null and b/sd/qa/unit/data/pptx/cshapes.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index cd6f9b0..015b6e1 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -22,6 +22,7 @@
 #include rsc/rscsfx.hxx
 
 #include svx/svdotext.hxx
+#include svx/svdoashp.hxx
 #include animations/animationnodehelper.hxx
 
 #include com/sun/star/drawing/XDrawPage.hpp
@@ -57,6 +58,7 @@ public:
 void testN828390_4();
 void testN828390_5();
 void testFdo68594();
+void testFdo72998();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
 CPPUNIT_TEST(testDocumentLayout);
@@ -71,6 +73,7 @@ public:
 CPPUNIT_TEST(testN828390_4);
 CPPUNIT_TEST(testN828390_5);
 CPPUNIT_TEST(testFdo68594);
+CPPUNIT_TEST(testFdo72998);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -389,6 +392,29 @@ void SdFiltersTest::testFdo68594()
 CPPUNIT_ASSERT_MESSAGE( Placeholder color mismatch, 
pC-GetValue().GetColor() == 0);
 }
 
+void SdFiltersTest::testFdo72998()
+{
+::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/cshapes.pptx));
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( not in destruction, 
!xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+{
+SdrObjCustomShape *pObj = dynamic_castSdrObjCustomShape 
*(pPage-GetObj(2));
+const SdrCustomShapeGeometryItem rGeometryItem = (const 
SdrCustomShapeGeometryItem)pObj-GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY );
+CPPUNIT_ASSERT_MESSAGE( not a custom shape, pObj );
+const ::com::sun::star::uno::Any* pViewBox = 
((SdrCustomShapeGeometryItem)rGeometryItem).GetPropertyValueByName( OUString( 
ViewBox ) );
+CPPUNIT_ASSERT_MESSAGE( Missing ViewBox, pViewBox );
+com::sun::star::awt::Rectangle aViewBox;
+CPPUNIT_ASSERT( (*pViewBox = aViewBox ) );
+CPPUNIT_ASSERT_MESSAGE( Width should be zero - for forcing scale to 
1, !aViewBox.Width );
+CPPUNIT_ASSERT_MESSAGE( Height should be zero - for forcing scale to 
1, !aViewBox.Height );
+}
+}
+
 void SdFiltersTest::testFdo64512()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/fdo64512.odp));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: oox/source sd/qa

2013-12-27 Thread Muthu Subramanian
 oox/source/drawingml/customshapeproperties.cxx |6 ++
 sd/qa/unit/data/xml/n762695_0.xml  |2 +-
 sd/qa/unit/data/xml/n762695_1.xml  |4 ++--
 3 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit beba4603ee8e603fff2599bee7f157d90872cb99
Author: Muthu Subramanian sumu...@collabora.com
Date:   Fri Dec 27 19:59:22 2013 +0530

fdo#72998: Custom shapes have improper size.

diff --git a/oox/source/drawingml/customshapeproperties.cxx 
b/oox/source/drawingml/customshapeproperties.cxx
index 48ace8b..247e8cf 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -213,7 +213,13 @@ void CustomShapeProperties::pushToPropSet( const 
::oox::core::FilterBase /* rFi
 aPropertyMap[ PROP_Type ] = OUString( ooxml-non-primitive );
 aPropertyMap[ PROP_MirroredX ] = Any( mbMirroredX );
 aPropertyMap[ PROP_MirroredY ] = Any( mbMirroredY );
+// Note 1: If Equations are defined - they are processed using 
internal div by 360 coordinates
+// while if they are not, standard ooxml coordinates are used.
+// This size specifically affects scaling.
+// Note 2: Width and Height are set to 0 to force scaling to 1.
 awt::Rectangle aViewBox( 0, 0, aSize.Width, aSize.Height );
+if( maGuideList.size() )
+aViewBox = awt::Rectangle( 0, 0, 0, 0 );
 aPropertyMap[ PROP_ViewBox ] = aViewBox;
 
 Sequence EnhancedCustomShapeAdjustmentValue  aAdjustmentValues( 
maAdjustmentGuideList.size() );
diff --git a/sd/qa/unit/data/xml/n762695_0.xml 
b/sd/qa/unit/data/xml/n762695_0.xml
index 5f3080f..d55c979 100644
--- a/sd/qa/unit/data/xml/n762695_0.xml
+++ b/sd/qa/unit/data/xml/n762695_0.xml
@@ -83,7 +83,7 @@
/PropertyValue
PropertyValue name=Type value=ooxml-non-primitive handle=0 
propertyState=DIRECT_VALUE/
PropertyValue name=ViewBox
-ViewBox x=0 y=0 width=4820911 height=3908235/
+ViewBox x=0 y=0 width=0 height=0/
/PropertyValue
   /CustomShapeGeometry
  /XShape
diff --git a/sd/qa/unit/data/xml/n762695_1.xml 
b/sd/qa/unit/data/xml/n762695_1.xml
index d746783..fb24ba08 100644
--- a/sd/qa/unit/data/xml/n762695_1.xml
+++ b/sd/qa/unit/data/xml/n762695_1.xml
@@ -83,7 +83,7 @@
/PropertyValue
PropertyValue name=Type value=ooxml-non-primitive handle=0 
propertyState=DIRECT_VALUE/
PropertyValue name=ViewBox
-ViewBox x=0 y=0 width=6477000 height=2743200/
+ViewBox x=0 y=0 width=0 height=0/
/PropertyValue
   /CustomShapeGeometry
  /XShape
@@ -170,7 +170,7 @@
/PropertyValue
PropertyValue name=Type value=ooxml-non-primitive handle=0 
propertyState=DIRECT_VALUE/
PropertyValue name=ViewBox
-ViewBox x=0 y=0 width=6365875 height=3430587/
+ViewBox x=0 y=0 width=0 height=0/
/PropertyValue
   /CustomShapeGeometry
  /XShape
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: oox/source

2013-12-19 Thread Muthu Subramanian
 oox/source/export/drawingml.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 05bf939a5855a973ab6f5c70c44c210daa280908
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 19 16:48:20 2013 +0530

n#828390: Bullet sizes set wrong.

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 6a0d65b..a338170 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1130,7 +1130,7 @@ void DrawingML::WriteParagraphNumbering( Reference 
XPropertySet  rXPropSet, sa
 } else {
 if( nBulletRelSize  nBulletRelSize != 100 )
 mpFS-singleElementNS( XML_a, XML_buSzPct,
-   XML_val, IS( std::min( 
(sal_Int32)25000, std::max( (sal_Int32)40, 1000*( (sal_Int32)nBulletRelSize 
) ) ) ), FSEND );
+   XML_val, IS( std::max( 
(sal_Int32)25000, std::min( (sal_Int32)40, 1000*( (sal_Int32)nBulletRelSize 
) ) ) ), FSEND );
 if( bHasFontDesc )
 mpFS-singleElementNS( XML_a, XML_buFont,
XML_typeface, 
OUStringToOString( aFontDesc.Name, RTL_TEXTENCODING_UTF8 ).getStr(),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - oox/source

2013-12-19 Thread Muthu Subramanian
 oox/source/export/drawingml.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8f0f3b0154f915cd2e9eea2907dcc1e117854760
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 19 16:48:20 2013 +0530

n#828390: Bullet sizes set wrong.

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index ff3f62a..3986989 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1102,7 +1102,7 @@ void DrawingML::WriteParagraphNumbering( Reference 
XPropertySet  rXPropSet, sa
 } else {
 if( nBulletRelSize  nBulletRelSize != 100 )
 mpFS-singleElementNS( XML_a, XML_buSzPct,
-   XML_val, IS( std::min( 
(sal_Int32)25000, std::max( (sal_Int32)40, 1000*( (sal_Int32)nBulletRelSize 
) ) ) ), FSEND );
+   XML_val, IS( std::max( 
(sal_Int32)25000, std::min( (sal_Int32)40, 1000*( (sal_Int32)nBulletRelSize 
) ) ) ), FSEND );
 if( bHasFontDesc )
 mpFS-singleElementNS( XML_a, XML_buFont,
XML_typeface, 
OUStringToOString( aFontDesc.Name, RTL_TEXTENCODING_UTF8 ).getStr(),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/qa

2013-12-19 Thread Muthu Subramanian
 sd/qa/unit/data/n828390_5.odp |binary
 sd/qa/unit/import-tests.cxx   |   26 ++
 2 files changed, 26 insertions(+)

New commits:
commit 3b9b2e2d98ee3eb10dfdcbc27c5ead40f0335cb7
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 19 18:14:47 2013 +0530

n#828390: Unit test for bullet's relative size.

diff --git a/sd/qa/unit/data/n828390_5.odp b/sd/qa/unit/data/n828390_5.odp
new file mode 100644
index 000..29cb8af
Binary files /dev/null and b/sd/qa/unit/data/n828390_5.odp differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 31b9e7b..cd6f9b0 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -18,6 +18,7 @@
 #include editeng/colritem.hxx
 #include editeng/fontitem.hxx
 #include editeng/wghtitem.hxx
+#include editeng/numitem.hxx
 #include rsc/rscsfx.hxx
 
 #include svx/svdotext.hxx
@@ -54,6 +55,7 @@ public:
 void testN828390_2();
 void testN828390_3();
 void testN828390_4();
+void testN828390_5();
 void testFdo68594();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
@@ -67,6 +69,7 @@ public:
 CPPUNIT_TEST(testN828390_2);
 CPPUNIT_TEST(testN828390_3);
 CPPUNIT_TEST(testN828390_4);
+CPPUNIT_TEST(testN828390_5);
 CPPUNIT_TEST(testFdo68594);
 
 CPPUNIT_TEST_SUITE_END();
@@ -326,6 +329,29 @@ void SdFiltersTest::testN828390_4()
 CPPUNIT_ASSERT(bPassed);
 }
 
+void SdFiltersTest::testN828390_5()
+{
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/n828390_5.odp) );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+
+xDocShRef = saveAndReload( xDocShRef, PPTX );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( not in destruction, 
!xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+{
+SdrObject *pObj = pPage-GetObj(0);
+SdrTextObj *pTxtObj = dynamic_castSdrTextObj *( pObj );
+const EditTextObject aEdit = 
pTxtObj-GetOutlinerParaObject()-GetTextObject();
+const SvxNumBulletItem *pNumFmt = dynamic_castconst SvxNumBulletItem 
*(aEdit.GetPool()-GetItem2(EE_PARA_NUMBULLET, 5));
+CPPUNIT_ASSERT( pNumFmt );
+CPPUNIT_ASSERT_MESSAGE( Bullet's relative size is wrong!, 
pNumFmt-GetNumRule()-GetLevel(1).GetBulletRelSize() == 75 ); // != 25
+}
+}
+
 void SdFiltersTest::testN778859()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/n778859.pptx));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - oox/source sd/qa

2013-12-18 Thread Muthu Subramanian
 oox/source/export/drawingml.cxx |8 +++
 sd/qa/unit/data/n828390_4.odp   |binary
 sd/qa/unit/import-tests.cxx |   43 
 3 files changed, 47 insertions(+), 4 deletions(-)

New commits:
commit 33b59c555755283edbcb3bb50a44db153cb1c23f
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Dec 18 20:01:11 2013 +0530

n#828390: Add unit test for font properties export.

diff --git a/sd/qa/unit/data/n828390_4.odp b/sd/qa/unit/data/n828390_4.odp
new file mode 100644
index 000..888611c
Binary files /dev/null and b/sd/qa/unit/data/n828390_4.odp differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 630891c..31b9e7b 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -16,6 +16,8 @@
 #include editeng/fhgtitem.hxx
 #include editeng/escapementitem.hxx
 #include editeng/colritem.hxx
+#include editeng/fontitem.hxx
+#include editeng/wghtitem.hxx
 #include rsc/rscsfx.hxx
 
 #include svx/svdotext.hxx
@@ -51,6 +53,7 @@ public:
 void testN828390();
 void testN828390_2();
 void testN828390_3();
+void testN828390_4();
 void testFdo68594();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
@@ -63,6 +66,7 @@ public:
 CPPUNIT_TEST(testN828390);
 CPPUNIT_TEST(testN828390_2);
 CPPUNIT_TEST(testN828390_3);
+CPPUNIT_TEST(testN828390_4);
 CPPUNIT_TEST(testFdo68594);
 
 CPPUNIT_TEST_SUITE_END();
@@ -283,6 +287,45 @@ void SdFiltersTest::testN828390_3()
 CPPUNIT_ASSERT_MESSAGE(CharEscapment not imported properly, bPassed);
 }
 
+void SdFiltersTest::testN828390_4()
+{
+bool bPassed = false;
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/n828390_4.odp) );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+
+xDocShRef = saveAndReload( xDocShRef, PPTX );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( not in destruction, 
!xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+{
+std::vectorEECharAttrib rLst;
+SdrObject *pObj = pPage-GetObj(0);
+SdrTextObj *pTxtObj = dynamic_castSdrTextObj *( pObj );
+const EditTextObject aEdit = 
pTxtObj-GetOutlinerParaObject()-GetTextObject();
+aEdit.GetCharAttribs(1, rLst);
+for( std::vectorEECharAttrib::reverse_iterator it = rLst.rbegin(); 
it!=rLst.rend(); ++it)
+{
+const SvxFontHeightItem * pFontHeight = dynamic_castconst 
SvxFontHeightItem *((*it).pAttr);
+if( pFontHeight )
+CPPUNIT_ASSERT_MESSAGE( Font height is wrong, 
pFontHeight-GetHeight() == 1129 );
+const SvxFontItem *pFont = dynamic_castconst SvxFontItem 
*((*it).pAttr);
+if( pFont )
+{
+CPPUNIT_ASSERT_MESSAGE( Font is wrong, 
pFont-GetFamilyName().equalsAscii(Arial));
+bPassed = true;
+}
+const SvxWeightItem *pWeight = dynamic_castconst SvxWeightItem 
*((*it).pAttr);
+if( pWeight )
+CPPUNIT_ASSERT_MESSAGE( Font Weight is wrong, 
pWeight-GetWeight() == WEIGHT_BOLD);
+}
+}
+CPPUNIT_ASSERT(bPassed);
+}
+
 void SdFiltersTest::testN778859()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/n778859.pptx));
commit 33b796eb1484b9a3fc11a189faddb7fc36509856
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Dec 18 19:56:28 2013 +0530

n#828390: Explictly export font properties.

Seems like the status is returned as default,
but the font properties needs to be still exported.

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 0e8db87..6a0d65b 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -711,14 +711,14 @@ void DrawingML::WriteRunProperties( Reference 
XPropertySet  rRun, sal_Bool bIs
 sal_Int32 nSize = 1800;
 sal_Int32 nCharEscapement = 0;
 
-if( GETAD( CharHeight ) )
+if( GETA( CharHeight ) )
 nSize = (sal_Int32) (100*(*((float*) mAny.getValue(;
 
-if ( ( bComplex  GETAD( CharWeightComplex ) ) || GETAD( CharWeight ) )
+if ( ( bComplex  GETA( CharWeightComplex ) ) || GETA( CharWeight ) )
 if ( *((float*) mAny.getValue()) = awt::FontWeight::SEMIBOLD )
 bold = 1;
 
-if ( ( bComplex  GETAD( CharPostureComplex ) ) || GETAD( CharPosture ) )
+if ( ( bComplex  GETA( CharPostureComplex ) ) || GETA( CharPosture ) )
 switch ( *((awt::FontSlant*) mAny.getValue()) )
 {
 case awt::FontSlant_OBLIQUE :
@@ -827,7 +827,7 @@ void DrawingML::WriteRunProperties( Reference XPropertySet 
 rRun, sal_Bool bIs
 WriteSolidFill( color );
 }
 
-if( GETAD( CharFontName

[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - 3 commits - oox/inc oox/source

2013-12-18 Thread Muthu Subramanian
 oox/inc/oox/drawingml/textcharacterproperties.hxx   |1 +
 oox/source/drawingml/textcharacterproperties.cxx|   10 ++
 oox/source/drawingml/textcharacterpropertiescontext.cxx |2 ++
 oox/source/export/drawingml.cxx |8 
 4 files changed, 17 insertions(+), 4 deletions(-)

New commits:
commit c0dd1682420f0e9e18a74a0ec5fd02b029573c80
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 12 18:24:42 2013 +0530

n#828390: Reset charescapement.

Unless the value is reset - the escapement
seems to continue to the next set of textruns.

diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index 4230148..c531bc1 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -129,6 +129,9 @@ void TextCharacterProperties::pushToPropMap( PropertyMap 
rPropMap, const XmlFil
 if( moBaseline.has() ) {
 rPropMap[ PROP_CharEscapement ] = sal_Int16(moBaseline.get( 0 ) / 
1000);
 rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(DFLT_ESC_PROP);
+} else {
+rPropMap[ PROP_CharEscapement ] = sal_Int16(0);
+rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(100); // 100%
 }
 
 if( !bUseOptional || moBold.has() ) {
commit 1d42520a36bb2a3131330e03e7f25d4ae5a99241
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Dec 18 20:19:48 2013 +0530

Fix fdo#70220 Superscript not imported from pptx.

Ported from: 840a8573c8cebe67ddd3c9fe106c7dbd789bb334
(Original Author: Thorsten)

diff --git a/oox/inc/oox/drawingml/textcharacterproperties.hxx 
b/oox/inc/oox/drawingml/textcharacterproperties.hxx
index 3dc4062..1073fa6 100644
--- a/oox/inc/oox/drawingml/textcharacterproperties.hxx
+++ b/oox/inc/oox/drawingml/textcharacterproperties.hxx
@@ -46,6 +46,7 @@ struct TextCharacterProperties
 OptValue sal_Int32  moHeight;
 OptValue sal_Int32  moSpacing;
 OptValue sal_Int32  moUnderline;
+OptValue sal_Int32  moBaseline;
 OptValue sal_Int32  moStrikeout;
 OptValue sal_Int32  moCaseMap;
 OptValue bool moBold;
diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index 0163f82..4230148 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -21,6 +21,7 @@
 #include com/sun/star/lang/Locale.hpp
 #include com/sun/star/awt/FontSlant.hpp
 #include com/sun/star/awt/FontWeight.hpp
+#include editeng/escapementitem.hxx
 #include oox/helper/helper.hxx
 #include oox/helper/propertyset.hxx
 #include oox/core/xmlfilterbase.hxx
@@ -52,6 +53,7 @@ void TextCharacterProperties::assignUsed( const 
TextCharacterProperties rSource
 moHeight.assignIfUsed( rSourceProps.moHeight );
 moSpacing.assignIfUsed( rSourceProps.moSpacing );
 moUnderline.assignIfUsed( rSourceProps.moUnderline );
+moBaseline.assignIfUsed( rSourceProps.moBaseline );
 moStrikeout.assignIfUsed( rSourceProps.moStrikeout );
 moCaseMap.assignIfUsed( rSourceProps.moCaseMap );
 moBold.assignIfUsed( rSourceProps.moBold );
@@ -124,6 +126,11 @@ void TextCharacterProperties::pushToPropMap( PropertyMap 
rPropMap, const XmlFil
 rPropMap[ PROP_CharStrikeout ] = GetFontStrikeout( moStrikeout.get( 
XML_noStrike ) );
 rPropMap[ PROP_CharCaseMap ] = GetCaseMap( moCaseMap.get( XML_none ) );
 
+if( moBaseline.has() ) {
+rPropMap[ PROP_CharEscapement ] = sal_Int16(moBaseline.get( 0 ) / 
1000);
+rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(DFLT_ESC_PROP);
+}
+
 if( !bUseOptional || moBold.has() ) {
 float fWeight = moBold.get( false ) ? awt::FontWeight::BOLD : 
awt::FontWeight::NORMAL;
 rPropMap[ PROP_CharWeight ] = fWeight;
diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx 
b/oox/source/drawingml/textcharacterpropertiescontext.cxx
index 605ebb0..2119dc6 100644
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -56,6 +56,8 @@ 
TextCharacterPropertiesContext::TextCharacterPropertiesContext(
 mrTextCharacterProperties.moUnderline = aAttribs.getToken( XML_u );
 if ( aAttribs.hasAttribute( XML_strike ) )
 mrTextCharacterProperties.moStrikeout = aAttribs.getToken( XML_strike 
);
+if ( aAttribs.hasAttribute( XML_baseline ) )
+mrTextCharacterProperties.moBaseline = aAttribs.getInteger( 
XML_baseline );
 
 //  mrTextCharacterProperties.moCaseMap = aAttribs.getToken( XML_cap );
 if ( aAttribs.hasAttribute( XML_b ) )
commit 4d4fb2a6f8afd525bffbc465779a6bf95e5debd9
Author: Muthu Subramanian sumu...@collabora.com
Date:   Wed Dec 18 20:08:41 2013 +0530

n#828390: Explictly export font properties.

Seems like the status is returned as default,
but the font properties needs to be still

[Libreoffice-commits] core.git: oox/source

2013-12-12 Thread Muthu Subramanian
 oox/source/drawingml/textcharacterproperties.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit fdf77f50ab825bd2b44e980552f3383acf637b12
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 12 18:24:42 2013 +0530

n#828390: Reset charescapement.

Unless the value is reset - the escapement
seems to continue to the next set of textruns.

diff --git a/oox/source/drawingml/textcharacterproperties.cxx 
b/oox/source/drawingml/textcharacterproperties.cxx
index febb28c..c99a44a 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -119,6 +119,9 @@ void TextCharacterProperties::pushToPropMap( PropertyMap 
rPropMap, const XmlFil
 if( moBaseline.has() ) {
 rPropMap[ PROP_CharEscapement ] = sal_Int16(moBaseline.get( 0 ) / 
1000);
 rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(DFLT_ESC_PROP);
+} else {
+rPropMap[ PROP_CharEscapement ] = sal_Int16(0);
+rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(100); // 100%
 }
 
 if( !bUseOptional || moBold.has() ) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/qa

2013-12-12 Thread Muthu Subramanian
 sd/qa/unit/data/pptx/n828390_3.pptx |binary
 sd/qa/unit/import-tests.cxx |   35 +++
 2 files changed, 35 insertions(+)

New commits:
commit eea8c671e42b91c8486e3796869d140d70b1a7eb
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 12 18:54:00 2013 +0530

n#828390: Unit test for resetting char escapement.

diff --git a/sd/qa/unit/data/pptx/n828390_3.pptx 
b/sd/qa/unit/data/pptx/n828390_3.pptx
new file mode 100644
index 000..ad95758
Binary files /dev/null and b/sd/qa/unit/data/pptx/n828390_3.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index f912d11..630891c 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -50,6 +50,7 @@ public:
 void testFdo71075();
 void testN828390();
 void testN828390_2();
+void testN828390_3();
 void testFdo68594();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
@@ -61,6 +62,7 @@ public:
 CPPUNIT_TEST(testFdo71075);
 CPPUNIT_TEST(testN828390);
 CPPUNIT_TEST(testN828390_2);
+CPPUNIT_TEST(testN828390_3);
 CPPUNIT_TEST(testFdo68594);
 
 CPPUNIT_TEST_SUITE_END();
@@ -248,6 +250,39 @@ void SdFiltersTest::testN828390_2()
 CPPUNIT_ASSERT(aEdit.GetText(1) == OUString(Standard Platform));
 }
 
+void SdFiltersTest::testN828390_3()
+{
+bool bPassed = true;
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n828390_3.pptx) );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( not in destruction, 
!xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+
+SdrObject *pObj = pPage-GetObj(0);
+SdrTextObj *pTxtObj = dynamic_castSdrTextObj *( pObj );
+const EditTextObject aEdit = 
pTxtObj-GetOutlinerParaObject()-GetTextObject();
+std::vectorEECharAttrib rLst;
+aEdit.GetCharAttribs(1, rLst);
+for( std::vectorEECharAttrib::reverse_iterator it = rLst.rbegin(); 
it!=rLst.rend(); ++it)
+{
+const SvxEscapementItem *pFontEscapement = dynamic_castconst 
SvxEscapementItem *((*it).pAttr);
+if(pFontEscapement)
+{
+if( pFontEscapement-GetEsc() != 0 )
+{
+bPassed = false;
+break;
+}
+}
+}
+CPPUNIT_ASSERT_MESSAGE(CharEscapment not imported properly, bPassed);
+}
+
 void SdFiltersTest::testN778859()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/n778859.pptx));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - 4 commits - sal/inc sd/inc sd/source svl/inc svl/source svx/inc svx/source

2013-12-11 Thread Muthu Subramanian
 sal/inc/rtl/strbuf.hxx   |   17 +
 sd/inc/sdpage.hxx|3 +++
 sd/source/core/drawdoc3.cxx  |   22 --
 sd/source/core/sdpage2.cxx   |   37 +
 svl/inc/svl/itemset.hxx  |1 +
 svl/source/items/itemset.cxx |   16 
 svx/inc/svx/svdobj.hxx   |2 ++
 svx/source/svdraw/svdobj.cxx |   40 
 8 files changed, 132 insertions(+), 6 deletions(-)

New commits:
commit c67cbc42ec5f0d37f70aeda4e11e3dd90edad892
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 12 12:57:02 2013 +0530

Force int16 as int32

diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 2aceba9..f61cab0 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -599,8 +599,8 @@ OString SdPage::stringify() const
  /*append(OUStringToOString(maCreatedPageName, 
RTL_TEXTENCODING_UTF8)).
  append(OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)).*/
  append(OUStringToOString(maBookmarkName, RTL_TEXTENCODING_UTF8)).
- 
append(mbScaleObjects).append(mbBackgroundFullSize).append((sal_Int32)meCharSet).append(mnPaperBin).
- 
append((sal_Int32)meOrientation).append(mnTransitionType).append(mnTransitionSubtype).append(mbTransitionDirection).
+ 
append(mbScaleObjects).append(mbBackgroundFullSize).append((sal_Int32)meCharSet).append((sal_Int32)mnPaperBin).
+ 
append((sal_Int32)meOrientation).append((sal_Int32)mnTransitionType).append((sal_Int32)mnTransitionSubtype).append(mbTransitionDirection).
  
append(mnTransitionFadeColor).append(mfTransitionDuration);//.append(mbIsPrecious);
 
 sal_Int32 n = GetObjCount();
commit 3c16c85a8766aa6f4b4e292a9d1700e1a35366c1
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 12 12:55:39 2013 +0530

Force enums as ints - to avoid warning/errors.

diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 9f621fd..2aceba9 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -592,15 +592,15 @@ void SdPage::setTransitionDuration ( double 
fTranstionDuration )
 OString SdPage::stringify() const
 {
 OStringBuffer aString(100);
-
aString.append(mePageKind).append(meAutoLayout).append(mbSelected).append(mePresChange).append(mbSoundOn).append(mbExcluded).
+
aString.append((sal_Int32)mePageKind).append((sal_Int32)meAutoLayout).append(mbSelected).append((sal_Int32)mePresChange).append(mbSoundOn).append(mbExcluded).
  append(OUStringToOString( maLayoutName, RTL_TEXTENCODING_UTF8 )).
  append(OUStringToOString(maSoundFile, RTL_TEXTENCODING_UTF8 )).
  append(mbLoopSound).append(mbStopSound).
  /*append(OUStringToOString(maCreatedPageName, 
RTL_TEXTENCODING_UTF8)).
  append(OUStringToOString(maFileName, RTL_TEXTENCODING_UTF8)).*/
  append(OUStringToOString(maBookmarkName, RTL_TEXTENCODING_UTF8)).
- 
append(mbScaleObjects).append(mbBackgroundFullSize).append(meCharSet).append(mnPaperBin).
- 
append(meOrientation).append(mnTransitionType).append(mnTransitionSubtype).append(mbTransitionDirection).
+ 
append(mbScaleObjects).append(mbBackgroundFullSize).append((sal_Int32)meCharSet).append(mnPaperBin).
+ 
append((sal_Int32)meOrientation).append(mnTransitionType).append(mnTransitionSubtype).append(mbTransitionDirection).
  
append(mnTransitionFadeColor).append(mfTransitionDuration);//.append(mbIsPrecious);
 
 sal_Int32 n = GetObjCount();
commit a3e222581b3ded07285a5e1ad18f5a5abb5d95b9
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 12 12:53:55 2013 +0530

Add append(bool) to OStringBuffer.

diff --git a/sal/inc/rtl/strbuf.hxx b/sal/inc/rtl/strbuf.hxx
index ed627ce..d8112ea 100644
--- a/sal/inc/rtl/strbuf.hxx
+++ b/sal/inc/rtl/strbuf.hxx
@@ -510,6 +510,23 @@ public:
 }
 
 /**
+Appends the string representation of the codebool/code
+argument to the string buffer.
+
+The argument is converted to a string as if by the method
+codeString.valueOf/code, and the characters of that
+string are then appended to this string buffer.
+
+@param   b   a codebool/code.
+@return  this string buffer.
+ */
+OStringBuffer  append(bool b)
+{
+sal_Char sz[RTL_STR_MAX_VALUEOFBOOLEAN];
+return append( sz, rtl_str_valueOfBoolean( sz, b ) );
+}
+
+/**
 Appends the string representation of the codechar/code
 argument to this string buffer.
 
commit 4e09cb4645e1b8b0393acf956c325150fe1c52fc
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 12 12:50:13 2013 +0530

n#753460: Copying slides having same master page name.

diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index f62b2ae..0c99930 100644
--- a/sd/inc

[Libreoffice-commits] core.git: sd/qa

2013-12-11 Thread Muthu Subramanian
 sd/qa/unit/data/pptx/n828390_2.pptx |binary
 sd/qa/unit/import-tests.cxx |   21 +
 2 files changed, 21 insertions(+)

New commits:
commit 0b578e51cd1eabbbe375e25927df86fac7552641
Author: Muthu Subramanian sumu...@collabora.com
Date:   Thu Dec 12 13:19:36 2013 +0530

n#828390: Add unit test for new line import.

diff --git a/sd/qa/unit/data/pptx/n828390_2.pptx 
b/sd/qa/unit/data/pptx/n828390_2.pptx
new file mode 100644
index 000..e30948f
Binary files /dev/null and b/sd/qa/unit/data/pptx/n828390_2.pptx differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 9b00403..f912d11 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -49,6 +49,7 @@ public:
 void testFdo64512();
 void testFdo71075();
 void testN828390();
+void testN828390_2();
 void testFdo68594();
 
 CPPUNIT_TEST_SUITE(SdFiltersTest);
@@ -59,6 +60,7 @@ public:
 CPPUNIT_TEST(testFdo64512);
 CPPUNIT_TEST(testFdo71075);
 CPPUNIT_TEST(testN828390);
+CPPUNIT_TEST(testN828390_2);
 CPPUNIT_TEST(testFdo68594);
 
 CPPUNIT_TEST_SUITE_END();
@@ -227,6 +229,25 @@ void SdFiltersTest::testN828390()
 CPPUNIT_ASSERT_MESSAGE(Subscript not exported properly, bPassed);
 }
 
+void SdFiltersTest::testN828390_2()
+{
+::sd::DrawDocShellRef xDocShRef = loadURL( 
getURLFromSrc(/sd/qa/unit/data/pptx/n828390_2.pptx) );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( failed to load, xDocShRef.Is() );
+CPPUNIT_ASSERT_MESSAGE( not in destruction, 
!xDocShRef-IsInDestruction() );
+
+SdDrawDocument *pDoc = xDocShRef-GetDoc();
+CPPUNIT_ASSERT_MESSAGE( no document, pDoc != NULL );
+const SdrPage *pPage = pDoc-GetPage(1);
+CPPUNIT_ASSERT_MESSAGE( no page, pPage != NULL );
+
+SdrObject *pObj = pPage-GetObj(0);
+SdrTextObj *pTxtObj = dynamic_castSdrTextObj *( pObj );
+const EditTextObject aEdit = 
pTxtObj-GetOutlinerParaObject()-GetTextObject();
+CPPUNIT_ASSERT(aEdit.GetText(0) == OUString(Linux  ));
+CPPUNIT_ASSERT(aEdit.GetText(1) == OUString(Standard Platform));
+}
+
 void SdFiltersTest::testN778859()
 {
 ::sd::DrawDocShellRef xDocShRef = 
loadURL(getURLFromSrc(/sd/qa/unit/data/pptx/n778859.pptx));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - oox/inc oox/source

2013-12-10 Thread Muthu Subramanian
 oox/inc/oox/core/contexthandler2.hxx |2 ++
 oox/source/drawingml/textbodycontext.cxx |1 +
 2 files changed, 3 insertions(+)

New commits:
commit 134558033eea2fd7c05376c13859cb1d57140321
Author: Muthu Subramanian sumu...@collabora.com
Date:   Tue Dec 10 17:07:23 2013 +0530

n#828390: Import new line in text.

diff --git a/oox/inc/oox/core/contexthandler2.hxx 
b/oox/inc/oox/core/contexthandler2.hxx
index 12ff23b..f6b9d5d 100644
--- a/oox/inc/oox/core/contexthandler2.hxx
+++ b/oox/inc/oox/core/contexthandler2.hxx
@@ -206,6 +206,8 @@ private:
 
 ContextStackRef mxContextStack; /// Stack of all processed 
elements.
 size_t  mnRootStackSize;/// Stack size on construction 
time.
+
+protected:
 boolmbEnableTrimSpace;  /// True = trim whitespace in 
characters().
 };
 
diff --git a/oox/source/drawingml/textbodycontext.cxx 
b/oox/source/drawingml/textbodycontext.cxx
index 7bc29a0..a8b3d64 100644
--- a/oox/source/drawingml/textbodycontext.cxx
+++ b/oox/source/drawingml/textbodycontext.cxx
@@ -54,6 +54,7 @@ TextParagraphContext::TextParagraphContext( ContextHandler 
rParent, TextParagra
 : ContextHandler( rParent )
 , mrParagraph( rPara )
 {
+mbEnableTrimSpace = false;
 }
 
 // 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   3   4   >