[Libreoffice-commits] core.git: chart2/qa
chart2/qa/extras/chart2import.cxx| 21 + chart2/qa/extras/data/xlsx/fdo54361.xlsx |binary 2 files changed, 21 insertions(+) New commits: commit 994fc8faa1cd232456910e2de1ff4add1eee024a Author: Heena Gupta Date: Mon Jun 30 15:12:32 2014 +0530 fdo#54361:Add test case for the chart background Change-Id: I03f0a45d821b14fe687b3ec7df98f9367adab1f2 Reviewed-on: https://gerrit.libreoffice.org/9978 Tested-by: Markus Mohrhard Reviewed-by: Markus Mohrhard diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index b7c1e78..41a9a2f 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -16,6 +16,7 @@ #include #include #include +#include #include @@ -40,6 +41,7 @@ public: void testDelayedCellImport(); // chart range referencing content on later sheets void testFlatODSStackedColumnChart(); void testFdo78080(); +void testFdo54361(); CPPUNIT_TEST_SUITE(Chart2ImportTest); CPPUNIT_TEST(Fdo60083); @@ -66,6 +68,7 @@ public: CPPUNIT_TEST(testDelayedCellImport); CPPUNIT_TEST(testFlatODSStackedColumnChart); CPPUNIT_TEST(testFdo78080); +CPPUNIT_TEST(testFdo54361); CPPUNIT_TEST_SUITE_END(); private: @@ -396,6 +399,24 @@ void Chart2ImportTest::testFdo78080() CPPUNIT_ASSERT(!xTitle.is()); } +void Chart2ImportTest::testFdo54361() +{ +load("/chart2/qa/extras/data/xlsx/", "fdo54361.xlsx"); +uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent); +CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is()); + +uno::Reference< chart::XChartDocument > xChart2Doc (xChartDoc, uno::UNO_QUERY); +CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChart2Doc.is()); + +Reference< beans::XPropertySet > xPropSet( xChart2Doc->getArea(), uno::UNO_QUERY); +CPPUNIT_ASSERT_MESSAGE("failed to get Area", xPropSet.is()); + +com::sun::star::drawing::FillStyle aStyle; +xPropSet -> getPropertyValue("FillStyle") >>= aStyle; + +CPPUNIT_ASSERT_MESSAGE("Background needs to be with solid fill style", aStyle == 1); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/chart2/qa/extras/data/xlsx/fdo54361.xlsx b/chart2/qa/extras/data/xlsx/fdo54361.xlsx new file mode 100644 index 000..2c49802 Binary files /dev/null and b/chart2/qa/extras/data/xlsx/fdo54361.xlsx differ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: oox/source
oox/source/drawingml/chart/chartspaceconverter.cxx |5 - oox/source/drawingml/chart/objectformatter.cxx |1 + 2 files changed, 5 insertions(+), 1 deletion(-) New commits: commit 6d3269ad94bbad8abae5703edc86d356bf14 Author: Heena Gupta Date: Tue Jul 15 16:11:02 2014 +0530 fdo#80569:FILEOPEN:4.4 Regression .docx chart not rendered properly Change-Id: Ic3304c1bd11fcd372a0859a70a531675effe7af0 Reviewed-on: https://gerrit.libreoffice.org/10322 Reviewed-by: Muthu Subramanian K Tested-by: Muthu Subramanian K diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx index 26624c9..b0b5f9c 100644 --- a/oox/source/drawingml/chart/chartspaceconverter.cxx +++ b/oox/source/drawingml/chart/chartspaceconverter.cxx @@ -88,7 +88,10 @@ void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExtern // formatting of the chart background PropertySet aBackPropSet( getChartDocument()->getPageBackground() ); -getFormatter().convertFrameFormatting( aBackPropSet, mrModel.mxShapeProp, OBJECTTYPE_CHARTSPACE ); +if( mrModel.mxShapeProp.is() ) +{ +getFormatter().convertFrameFormatting( aBackPropSet, mrModel.mxShapeProp, OBJECTTYPE_CHARTSPACE ); +} // convert plot area (container of all chart type groups) PlotAreaConverter aPlotAreaConv( *this, mrModel.mxPlotArea.getOrCreate() ); diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index 8fd7dc4..b919e6b 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -860,6 +860,7 @@ FillFormatter::FillFormatter( ObjectFormatterData& rData, const AutoFormatEntry* if( pAutoFormatEntry ) { mxAutoFill.reset( new FillProperties ); +mxAutoFill->moFillType = XML_noFill; if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() ) if( const FillProperties* pFillProps = pTheme->getFillStyle( pAutoFormatEntry->mnThemedIdx ) ) *mxAutoFill = *pFillProps; ___ 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
oox/source/drawingml/chart/chartspaceconverter.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit ef5814e564cc92ae005887ecedeea25243a29491 Author: Heena Gupta Date: Tue Jul 22 22:18:19 2014 +0530 fdo#54361: Chart background in XLSX is transparent instead of white Cherry-picked from 53b9adc135f4abb086c740582e5f85cea710287d and 6d3269ad94bbad8abae5703edc86d356bf14 Change-Id: I96d86854484deb7b5c0b99739fed60a430f2f957 Reviewed-on: https://gerrit.libreoffice.org/10468 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx index e24388d..2238fe2 100644 --- a/oox/source/drawingml/chart/chartspaceconverter.cxx +++ b/oox/source/drawingml/chart/chartspaceconverter.cxx @@ -92,7 +92,10 @@ void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExtern // formatting of the chart background PropertySet aBackPropSet( getChartDocument()->getPageBackground() ); -getFormatter().convertFrameFormatting( aBackPropSet, mrModel.mxShapeProp, OBJECTTYPE_CHARTSPACE ); +if( mrModel.mxShapeProp.is() ) +{ +getFormatter().convertFrameFormatting( aBackPropSet, mrModel.mxShapeProp, OBJECTTYPE_CHARTSPACE ); +} // convert plot area (container of all chart type groups) PlotAreaConverter aPlotAreaConv( *this, mrModel.mxPlotArea.getOrCreate() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Heena Gupta - License Statement
Hello, All of my past & future contributions to LibreOffice may be licensed under the MPLv2/LGPLv3+ dual license. Regards, HEENA GUPTA ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: oox/source
oox/source/drawingml/chart/objectformatter.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 53b9adc135f4abb086c740582e5f85cea710287d Author: Heena Gupta Date: Tue Jun 17 14:16:13 2014 +0530 fdo#54361 - FILEOPEN: Chart background in XLSX is transparent instead of white Change-Id: I2b932c9f09a010a4f999707fb6299c392a89550a Reviewed-on: https://gerrit.libreoffice.org/9806 Reviewed-by: Muthu Subramanian K Tested-by: Muthu Subramanian K diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx index adcc3f3..bfcd5f2 100644 --- a/oox/source/drawingml/chart/objectformatter.cxx +++ b/oox/source/drawingml/chart/objectformatter.cxx @@ -893,7 +893,6 @@ FillFormatter::FillFormatter( ObjectFormatterData& rData, const AutoFormatEntry* if( pAutoFormatEntry ) { mxAutoFill.reset( new FillProperties ); -mxAutoFill->moFillType = XML_noFill; if( const Theme* pTheme = mrData.mrFilter.getCurrentTheme() ) if( const FillProperties* pFillProps = pTheme->getFillStyle( pAutoFormatEntry->mnThemedIdx ) ) *mxAutoFill = *pFillProps; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: oox/source
oox/source/core/xmlfilterbase.cxx | 91 ++ 1 file changed, 91 insertions(+) New commits: commit 47c5454ea67632278d69a1ddfe97d74f5cc4449f Author: Heena Gupta Date: Wed Sep 3 17:57:47 2014 +0530 fdo#83428: Custom Properties dropped while exporting to docx Change-Id: Ic289fc446e49fb096cbfad789299736318019e91 Reviewed-on: https://gerrit.libreoffice.org/11265 Reviewed-by: Muthu Subramanian K Tested-by: Muthu Subramanian K diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index b54cd51..cc1ffa9 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -53,6 +53,10 @@ #include #include +#include +#include +#include +#include using ::com::sun::star::xml::dom::DocumentBuilder; using ::com::sun::star::xml::dom::XDocument; @@ -689,12 +693,99 @@ writeAppProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xProp pAppProps->endElement( XML_Properties ); } +static void +writeCustomProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xProperties ) +{ +rSelf.addRelation( + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties";, +"docProps/custom.xml" ); +FSHelperPtr pAppProps = rSelf.openFragmentStreamWithSerializer( +"docProps/custom.xml", + "application/vnd.openxmlformats-officedocument.custom-properties+xml" ); +pAppProps->startElement( XML_Properties, +XML_xmlns, "http://schemas.openxmlformats.org/officeDocument/2006/custom-properties";, +FSNS( XML_xmlns, XML_vt ), "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes";, +FSEND ); + +uno::Reference xUserDefinedProperties( xProperties->getUserDefinedProperties(), uno::UNO_QUERY ); +Sequence< PropertyValue > aprop( xUserDefinedProperties->getPropertyValues() ); +for ( sal_Int32 n = 0; n < aprop.getLength(); ++n ) +{ +if ( !aprop[n].Name.isEmpty() ) +{ +OString aName = OUStringToOString( aprop[n].Name, RTL_TEXTENCODING_ASCII_US ); +OUString valueTypeName = ( aprop[n].Value ).getValueType().getTypeName(); +// pid starts from 2 not from 1 as MS supports pid from 2 +OString pid = OUStringToOString( OUString::number(n + 2), RTL_TEXTENCODING_ASCII_US ); +pAppProps->startElement( XML_property , +XML_fmtid, "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}", +XML_pid,pid, +XML_name, aName, +FSEND); + +switch ( ( aprop[n].Value ).getValueTypeClass() ) +{ +case TypeClass_STRING: +{ +OUString aValue; +aprop[n].Value >>= aValue; + writeElement( pAppProps, FSNS( XML_vt, XML_lpwstr ), aValue ); +} +break; +case TypeClass_DOUBLE: +{ +double val; +val = * reinterpret_cast< const double * >( ( aprop[n].Value ).getValue() ); +writeElement( pAppProps, FSNS( XML_vt, XML_i4 ), val ); +} +break; +case TypeClass_BOOLEAN: +{ +bool val ; +val = *( sal_Bool * )( aprop[n].Value ).getValue(); +writeElement( pAppProps, FSNS( XML_vt, XML_bool ), val); +} +break; +default: +{ +util::Date aDate; +util::Duration aDuration; +util::DateTime aDateTime; +if ( ( aprop[n].Value ) >>= aDate ) +{ +Time aTime( Time::EMPTY ); +aDateTime = util::DateTime( 0, 0 , 0, 0, aDate.Year, aDate.Month, aDate.Day, true ); +writeElement( pAppProps, FSNS( XML_vt, XML_filetime ), aDateTime); +} +else if ( ( aprop[n].Value ) >>= aDuration ) +{ +OUStringBuffer buf; +::sax::Converter::convertDuration( buf, aDuration ); +OUString pDuration = buf.makeStringAndClear(); +writeElement( pAppProps, FSNS( XML_vt, XML_lpwstr ), pDuration ); +} +else if ( ( aprop[n].Value ) >>= aDateTime ) +writeElement( pAppProps, FSNS( XML_vt, XML_filetime ), aDateTime ); +else +//no other options +OSL_FAIL( "XMLFilterBa
[Libreoffice-commits] core.git: sw/qa
sw/qa/extras/ooxmlexport/data/fdo83428.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx|9 + 2 files changed, 9 insertions(+) New commits: commit 2be527134fc132fcb6d294b1863823064282f061 Author: Heena Gupta Date: Tue Sep 9 11:25:04 2014 +0530 fdo#83428 Add test case for custom property dropped in docx Reviewed on: https://gerrit.libreoffice.org/11346 Change-Id: I8afc0ae1351b4c8bb25f864040b99832b1bed3c1 diff --git a/sw/qa/extras/ooxmlexport/data/fdo83428.docx b/sw/qa/extras/ooxmlexport/data/fdo83428.docx new file mode 100644 index 000..9e9743a Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo83428.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 3cda4ce..de91ec1 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -210,6 +210,15 @@ DECLARE_OOXMLEXPORT_TEST(testFDO83044, "fdo83044.docx") assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:text", 1); } + +DECLARE_OOXMLEXPORT_TEST(testfdo83428, "fdo83428.docx") +{ + uno::Reference xDocumentPropertiesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference xProps(xDocumentPropertiesSupplier->getDocumentProperties()); + uno::Reference xUDProps(xProps->getUserDefinedProperties(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(OUString("Document"), getProperty(xUDProps, "Testing")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: oox/source sax/source sd/qa
oox/source/core/xmlfilterbase.cxx|6 -- sax/source/fastparser/fastparser.cxx |6 ++ sd/qa/unit/data/pptx/tdf91378.pptx |binary sd/qa/unit/export-tests.cxx | 22 ++ 4 files changed, 24 insertions(+), 10 deletions(-) New commits: commit 16e8ffbd5ec1fe7b81835ea6584547669d55d751 Author: Heena Gupta Date: Fri May 29 16:42:34 2015 +0530 tdf#91378-Empty Custom Properties are lost while saving in .pptx format Conflicts: sd/qa/unit/export-tests.cxx Reviewed on: https://gerrit.libreoffice.org/15966 Change-Id: Ibc24ab9633b51fe41ad483121646cc391319fe6f diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 4ef16d0..f1c80df 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -539,8 +539,6 @@ OUString XmlFilterBase::addRelation( const Reference< XOutputStream >& rOutputSt static void writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const OUString& sValue ) { -if( sValue.isEmpty() ) -return; pDoc->startElement( nXmlElement, FSEND ); pDoc->writeEscaped( sValue ); pDoc->endElement( nXmlElement ); @@ -745,10 +743,6 @@ writeCustomProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xP { if ( !aprop[n].Name.isEmpty() ) { -// Ignore empty string property as well. -if (aprop[n].Value.has() && aprop[n].Value.get().isEmpty()) -continue; - OString aName = OUStringToOString( aprop[n].Name, RTL_TEXTENCODING_ASCII_US ); // pid starts from 2 not from 1 as MS supports pid from 2 pAppProps->startElement( XML_property , diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index f118a5d..79ab899 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -1037,8 +1037,7 @@ void FastSaxParserImpl::parse() void FastSaxParserImpl::callbackStartElement(const xmlChar *localName , const xmlChar* prefix, const xmlChar* URI, int numNamespaces, const xmlChar** namespaces, int numAttributes, int /*defaultedAttributes*/, const xmlChar **attributes) { -if( !pendingCharacters.isEmpty()) -sendPendingCharacters(); +sendPendingCharacters(); Entity& rEntity = getEntity(); if( rEntity.maNamespaceCount.empty() ) { @@ -1145,8 +1144,7 @@ void FastSaxParserImpl::callbackStartElement(const xmlChar *localName , const xm void FastSaxParserImpl::callbackEndElement( const xmlChar*, const xmlChar*, const xmlChar* ) { -if( !pendingCharacters.isEmpty()) -sendPendingCharacters(); +sendPendingCharacters(); Entity& rEntity = getEntity(); SAL_WARN_IF(rEntity.maNamespaceCount.empty(), "sax", "Empty NamespaceCount"); if( !rEntity.maNamespaceCount.empty() ) diff --git a/sd/qa/unit/data/pptx/tdf91378.pptx b/sd/qa/unit/data/pptx/tdf91378.pptx new file mode 100644 index 000..361be2c Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf91378.pptx differ diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index d8cd85f..3c72207 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -122,6 +122,7 @@ public: void testTransparentBackground(); void testFdo90607(); +void testTdf91378(); #if !defined WNT void testBnc822341(); #endif @@ -155,6 +156,7 @@ public: CPPUNIT_TEST(testBulletMarginAndIndentation); CPPUNIT_TEST(testParaMarginAndindentation); CPPUNIT_TEST(testTransparentBackground); +CPPUNIT_TEST(testTdf91378); #if !defined WNT CPPUNIT_TEST(testBnc822341); @@ -951,6 +953,26 @@ void SdExportTest::testBulletColor() CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's color is wrong!", sal_uInt32(0xff),pNumFmt->GetNumRule()->GetLevel(0).GetBulletColor().GetColor()); } +void SdExportTest::testTdf91378() +{ + +//Check For Import and Export Both +::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/tdf91378.pptx"), PPTX); +for( sal_uInt32 i=0;i<2;i++) +{ + SdDrawDocument *pDoc = xDocShRef->GetDoc(); + CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL ); + uno::Reference xDocumentPropertiesSupplier( xDocShRef->GetModel(), uno::UNO_QUERY ); + uno::Reference xProps( xDocumentPropertiesSupplier->getDocumentProperties(), uno::UNO_QUERY ); + uno::Reference xUDProps( xProps->getUserDefinedProperties(), uno::UNO_QUERY ); + OUString propValue; + xUDProps->getPropertyValue(OUString("Testing")) >>= propValue; + CPPUNIT_ASSERT(propValue.isEmpty()); + xDocShRef = saveAndReload( xDocShRef, PPTX ); +} +xDocShRef->DoClose(); +} + #if !defined WNT void SdExpor
[Libreoffice-commits] core.git: include/sfx2 sfx2/source sfx2/uiconfig
include/sfx2/mgetempl.hxx |5 +++ sfx2/source/dialog/mgetempl.cxx | 53 +++- sfx2/uiconfig/ui/managestylepage.ui | 15 ++ 3 files changed, 72 insertions(+), 1 deletion(-) New commits: commit de896f74c805e77706cce10f4d79117af1811ee9 Author: Heena Gupta Date: Wed Dec 24 15:55:37 2014 +0530 fdo#87675-"Edit" Button for next style in edit paragraph style Change-Id: I1a4888b869df7f242244bed2fef36996450eec23 Reviewed-on: https://gerrit.libreoffice.org/13639 Reviewed-by: Michael Stahl Tested-by: Michael Stahl diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx index 06deead..12fafb4 100644 --- a/include/sfx2/mgetempl.hxx +++ b/include/sfx2/mgetempl.hxx @@ -43,6 +43,7 @@ class SfxManageStyleSheetPage : public SfxTabPage FixedText* m_pFollowFt; ListBox* m_pFollowLb; +PushButton* m_pEditStyleBtn; FixedText* m_pBaseFt; ListBox* m_pBaseLb; @@ -69,6 +70,7 @@ friend class SfxStyleDialog; DECL_LINK( GetFocusHdl, Edit * ); DECL_LINK( LoseFocusHdl, Edit * ); +DECL_LINK( EditStyleHdl_Impl, void * ); voidUpdateName_Impl(ListBox *, const OUString &rNew); voidSetDescriptionText_Impl(); @@ -82,6 +84,9 @@ protected: virtual boolFillItemSet(SfxItemSet *) SAL_OVERRIDE; virtual voidReset(const SfxItemSet *) SAL_OVERRIDE; +boolExecute_Impl( sal_uInt16 nId, const OUString& rStr, const OUString& rRefStr, + sal_uInt16 nFamily, sal_uInt16 nMask = 0, + const sal_uInt16* pModifier = NULL ); using TabPage::ActivatePage; virtual voidActivatePage(const SfxItemSet &) SAL_OVERRIDE; using TabPage::DeactivatePage; diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index c7a70ca..c9c8370 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -34,10 +34,14 @@ #include #include +#include +#include "templdgi.hxx" #include #include "dialog.hrc" #include +#include +#include /* SfxManageStyleSheetPage Constructor * @@ -62,6 +66,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx m_pFollowLb->SetStyle(m_pFollowLb->GetStyle() | WB_SORT); const sal_Int32 nMaxWidth(62); m_pFollowLb->setMaxWidthChars(nMaxWidth); +get(m_pEditStyleBtn, "editstyle"); get(m_pBaseFt, "linkedwithft"); get(m_pBaseLb, "linkedwith"); m_pBaseLb->SetStyle(m_pBaseLb->GetStyle() | WB_SORT); @@ -223,6 +228,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx // It is a style with auto update? (SW only) if(SfxItemState::SET == rAttrSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE)) m_pAutoCB->Show(); +m_pEditStyleBtn->SetClickHdl( LINK( this, SfxManageStyleSheetPage, EditStyleHdl_Impl ) ); } @@ -309,7 +315,53 @@ void SfxManageStyleSheetPage::SetDescriptionText_Impl() m_pDescFt->SetText( pStyle->GetDescription( eUnit ) ); } +IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleHdl_Impl ) +{ + +OUString aTemplName(m_pFollowLb->GetSelectEntry()); +if (Execute_Impl( SID_STYLE_EDIT, aTemplName, OUString(),(sal_uInt16)pStyle->GetFamily(), 0 )) +{ +} +return 0; + +} + +// Internal: Perform functions through the Dispatcher +bool SfxManageStyleSheetPage::Execute_Impl( +sal_uInt16 nId, const OUString &rStr, const OUString& rRefStr, sal_uInt16 nFamily, +sal_uInt16 nMask, const sal_uInt16* pModifier) +{ + +SfxDispatcher &rDispatcher = *SfxGetpApp()->GetDispatcher_Impl(); +SfxStringItem aItem(nId, rStr); +SfxUInt16Item aFamily(SID_STYLE_FAMILY, nFamily); +SfxUInt16Item aMask( SID_STYLE_MASK, nMask ); +SfxStringItem aUpdName(SID_STYLE_UPD_BY_EX_NAME, rStr); +SfxStringItem aRefName( SID_STYLE_REFERENCE, rRefStr ); +const SfxPoolItem* pItems[ 6 ]; +sal_uInt16 nCount = 0; +if( !rStr.isEmpty() ) +pItems[ nCount++ ] = &aItem; +pItems[ nCount++ ] = &aFamily; +if( nMask ) +pItems[ nCount++ ] = &aMask; +if ( !rRefStr.isEmpty() ) +pItems[ nCount++ ] = &aRefName; + +pItems[ nCount++ ] = 0; + +sal_uInt16 nModi = pModifier ? *pModifier : 0; +const SfxPoolItem* mpItem = rDispatcher.Execute( +nId, SfxCallMode::SYNCHRON | SfxCallMode::RECORD | SfxCallMode::MODAL, +pItems, nModi ); + +if ( !mpItem ) +return false; + +return true; + +} IMPL_LINK_INLINE_START( SfxManageStyleSheetPage, GetFocusHdl, Edit *, pEdit ) @@ -325,7 +377,6 @@ IMPL_LINK_INLINE_START( SfxManageStyleSheetPage, GetFocusHdl, Edit *, pEdit ) IMPL_LINK_INLINE_END( SfxManageStyleSheetPage, GetFocusHdl, Edit *, pEdit ) - IMPL_LINK_INLINE_START( SfxM
[Libreoffice-commits] core.git: include/sfx2 sfx2/source sfx2/uiconfig
include/sfx2/mgetempl.hxx |1 + sfx2/source/dialog/mgetempl.cxx | 17 + sfx2/uiconfig/ui/managestylepage.ui |6 +- 3 files changed, 19 insertions(+), 5 deletions(-) New commits: commit 4be6e7becec9413cfd22c06376031b02486145b2 Author: Heena Gupta Date: Thu Jan 8 17:53:28 2015 +0530 fdo#87675: Disable 'edit' when next style is same as current one. Change-Id: Ifd149890460c44dc3eececc06a36f1b76d46929b Reviewed-on: https://gerrit.libreoffice.org/13811 Tested-by: Michael Stahl Reviewed-by: Michael Stahl diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx index 12fafb4..fc6aefc8b 100644 --- a/include/sfx2/mgetempl.hxx +++ b/include/sfx2/mgetempl.hxx @@ -70,6 +70,7 @@ friend class SfxStyleDialog; DECL_LINK( GetFocusHdl, Edit * ); DECL_LINK( LoseFocusHdl, Edit * ); +DECL_LINK( EditStyleSelectHdl_Impl, void * ); DECL_LINK( EditStyleHdl_Impl, void * ); voidUpdateName_Impl(ListBox *, const OUString &rNew); diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index c9c8370..06e531a 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -82,6 +82,11 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx // this Page needs ExchangeSupport SetExchangeSupport(); +if ( aFollow == aName ) +m_pEditStyleBtn->Disable(); +else +m_pEditStyleBtn->Enable(); + ResMgr* pResMgr = SfxGetpApp()->GetModule_Impl()->GetResMgr(); OSL_ENSURE( pResMgr, "No ResMgr in Module" ); pFamilies = new SfxStyleFamilies( ResId( DLG_STYLE_DESIGNER, *pResMgr ) ); @@ -228,6 +233,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx // It is a style with auto update? (SW only) if(SfxItemState::SET == rAttrSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE)) m_pAutoCB->Show(); +m_pFollowLb->SetSelectHdl( LINK( this, SfxManageStyleSheetPage, EditStyleSelectHdl_Impl ) ); m_pEditStyleBtn->SetClickHdl( LINK( this, SfxManageStyleSheetPage, EditStyleHdl_Impl ) ); } @@ -315,6 +321,17 @@ void SfxManageStyleSheetPage::SetDescriptionText_Impl() m_pDescFt->SetText( pStyle->GetDescription( eUnit ) ); } +IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleSelectHdl_Impl ) +{ +OUString aTemplName(m_pFollowLb->GetSelectEntry()); +OUString aEditTemplName(m_pNameRo->GetText()); +if (!( aTemplName == aEditTemplName)) +m_pEditStyleBtn->Enable(); +else +m_pEditStyleBtn->Disable(); +return 0; +} + IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleHdl_Impl ) { diff --git a/sfx2/uiconfig/ui/managestylepage.ui b/sfx2/uiconfig/ui/managestylepage.ui index 396fd39..0569c5f 100644 --- a/sfx2/uiconfig/ui/managestylepage.ui +++ b/sfx2/uiconfig/ui/managestylepage.ui @@ -102,11 +102,7 @@ Edit Style True -True -True -True -True -True +False 2 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: include/sfx2 sfx2/source
include/sfx2/mgetempl.hxx |1 + sfx2/source/dialog/mgetempl.cxx | 17 + 2 files changed, 18 insertions(+) New commits: commit fecdbcab90c0373e0c172835f237d86baed6d1bb Author: Heena Gupta Date: Tue Feb 17 13:45:17 2015 +0530 Related: tdf#87675 Edit Linked Style Button is nonclickable on None Entry Conflicts: sfx2/source/dialog/mgetempl.cxx Change-Id: Ieac16f9cd6063e38c6d8dee0a1f0dba29e1adc6f Reviewed-on: https://gerrit.libreoffice.org/14516 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx index 818243b..eded8ba 100644 --- a/include/sfx2/mgetempl.hxx +++ b/include/sfx2/mgetempl.hxx @@ -73,6 +73,7 @@ friend class SfxStyleDialog; DECL_LINK( LoseFocusHdl, Edit * ); DECL_LINK( EditStyleSelectHdl_Impl, void * ); DECL_LINK( EditStyleHdl_Impl, void * ); +DECL_LINK( EditLinkStyleSelectHdl_Impl, void * ); DECL_LINK( EditLinkStyleHdl_Impl, void * ); voidUpdateName_Impl(ListBox *, const OUString &rNew); diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index fdd626d..fc1d7db 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -88,6 +88,12 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx else m_pEditStyleBtn->Enable(); +sal_Int32 linkSelectPos = m_pBaseLb->GetSelectEntryPos(); +if ( linkSelectPos == 0 ) +m_pEditLinkStyleBtn->Disable(); +else +m_pEditLinkStyleBtn->Enable(); + ResMgr* pResMgr = SfxGetpApp()->GetModule_Impl()->GetResMgr(); OSL_ENSURE( pResMgr, "No ResMgr in Module" ); pFamilies = new SfxStyleFamilies( ResId( DLG_STYLE_DESIGNER, *pResMgr ) ); @@ -235,6 +241,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx if(SfxItemState::SET == rAttrSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE)) m_pAutoCB->Show(); m_pFollowLb->SetSelectHdl( LINK( this, SfxManageStyleSheetPage, EditStyleSelectHdl_Impl ) ); +m_pBaseLb->SetSelectHdl( LINK( this, SfxManageStyleSheetPage, EditLinkStyleSelectHdl_Impl ) ); m_pEditStyleBtn->SetClickHdl( LINK( this, SfxManageStyleSheetPage, EditStyleHdl_Impl ) ); m_pEditLinkStyleBtn->SetClickHdl( LINK( this, SfxManageStyleSheetPage, EditLinkStyleHdl_Impl ) ); } @@ -346,6 +353,16 @@ IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleHdl_Impl ) } +IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditLinkStyleSelectHdl_Impl ) +{ +sal_Int32 linkSelectPos = m_pBaseLb->GetSelectEntryPos(); +if ( linkSelectPos == 0 ) +m_pEditLinkStyleBtn->Disable(); +else +m_pEditLinkStyleBtn->Enable(); +return 0; +} + IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditLinkStyleHdl_Impl ) { OUString aTemplName(m_pBaseLb->GetSelectEntry()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source sw/uiconfig
sw/source/ui/chrdlg/numpara.cxx | 53 +- sw/source/uibase/inc/numpara.hxx |5 +++ sw/uiconfig/swriter/ui/numparapage.ui | 12 +++ 3 files changed, 69 insertions(+), 1 deletion(-) New commits: commit e38f63d861715fb56f41af82b897c2128ea20b38 Author: Heena Gupta Date: Mon Jan 5 16:42:06 2015 +0530 fdo#88045-Edit Button for Numbering Style in Edit Paragraph Style Change-Id: I7356eb2074520884ff24d89c68bf1214664f4af3 Reviewed-on: https://gerrit.libreoffice.org/13740 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 6c77cca..4156186 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -32,6 +32,11 @@ #include #include +#include +#include +#include +#include +#include const sal_uInt16 SwParagraphNumTabPage::aPageRg[] = { FN_NUMBER_NEWSTART, FN_NUMBER_NEWSTART_AT, @@ -50,7 +55,7 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(vcl::Window* pParent, const SfxItem get(m_pNumberStyleBX, "boxNUMBER_STYLE"); get(m_pNumberStyleLB, "comboLB_NUMBER_STYLE"); - +get(m_pEditNumStyleBtn,"editnumstyle"); get(m_pNewStartBX, "boxNEW_START"); get(m_pNewStartCB, "checkCB_NEW_START"); m_pNewStartCB->SetState(TRISTATE_FALSE); @@ -84,6 +89,7 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(vcl::Window* pParent, const SfxItem m_pNumberStyleLB->SetSelectHdl(LINK(this, SwParagraphNumTabPage, StyleHdl_Impl)); m_pCountParaCB->SetClickHdl(LINK(this, SwParagraphNumTabPage, LineCountHdl_Impl)); m_pRestartParaCountCB->SetClickHdl( LINK(this, SwParagraphNumTabPage, LineCountHdl_Impl)); +m_pEditNumStyleBtn->SetClickHdl( LINK(this, SwParagraphNumTabPage, EditNumStyleHdl_Impl)); } SwParagraphNumTabPage::~SwParagraphNumTabPage() @@ -276,6 +282,7 @@ IMPL_LINK_NOARG(SwParagraphNumTabPage, NewStartHdl_Impl) return 0; } + IMPL_LINK_NOARG(SwParagraphNumTabPage, LineCountHdl_Impl) { m_pRestartParaCountCB->Enable(m_pCountParaCB->IsChecked()); @@ -287,6 +294,50 @@ IMPL_LINK_NOARG(SwParagraphNumTabPage, LineCountHdl_Impl) return 0; } +IMPL_LINK_NOARG(SwParagraphNumTabPage, EditNumStyleHdl_Impl) +{ +OUString aTemplName(m_pNumberStyleLB->GetSelectEntry()); +if (aTemplName != "None") +ExecuteEditNumStyle_Impl( SID_STYLE_EDIT, aTemplName, OUString(),SFX_STYLE_FAMILY_PARA, 0 ); +return 0; +} + +// Internal: Perform functions through the Dispatcher +bool SwParagraphNumTabPage::ExecuteEditNumStyle_Impl( +sal_uInt16 nId, const OUString &rStr, const OUString& rRefStr, sal_uInt16 nFamily, +sal_uInt16 nMask, const sal_uInt16* pModifier) +{ + +SfxDispatcher &rDispatcher = *SfxViewShell::Current()->GetDispatcher(); +SfxStringItem aItem(nId, rStr); +SfxUInt16Item aFamily(SID_STYLE_FAMILY, nFamily); +SfxUInt16Item aMask( SID_STYLE_MASK, nMask ); +SfxStringItem aUpdName(SID_STYLE_UPD_BY_EX_NAME, rStr); +SfxStringItem aRefName( SID_STYLE_REFERENCE, rRefStr ); +const SfxPoolItem* pItems[ 6 ]; +sal_uInt16 nCount = 0; +if( !rStr.isEmpty() ) +pItems[ nCount++ ] = &aItem; +pItems[ nCount++ ] = &aFamily; +if( nMask ) +pItems[ nCount++ ] = &aMask; +if( !rRefStr.isEmpty() ) +pItems[ nCount++ ] = &aRefName; + +pItems[ nCount++ ] = 0; + +sal_uInt16 nModi = pModifier ? *pModifier : 0; +const SfxPoolItem* mpItem = rDispatcher.Execute( +nId, SfxCallMode::SYNCHRON | SfxCallMode::RECORD | SfxCallMode::MODAL, +pItems, nModi ); + +if ( !mpItem ) +return false; + +return true; + +} + IMPL_LINK( SwParagraphNumTabPage, StyleHdl_Impl, ListBox*, pBox ) { bool bEnable = bCurNumrule || pBox->GetSelectEntryPos() > 0; diff --git a/sw/source/uibase/inc/numpara.hxx b/sw/source/uibase/inc/numpara.hxx index 20283db..8ddd0fc 100644 --- a/sw/source/uibase/inc/numpara.hxx +++ b/sw/source/uibase/inc/numpara.hxx @@ -33,6 +33,7 @@ class SwParagraphNumTabPage : public SfxTabPage ListBox* m_pOutlineLvLB; VclHBox* m_pNumberStyleBX; ListBox* m_pNumberStyleLB; +PushButton* m_pEditNumStyleBtn; TriStateBox* m_pNewStartCB; VclHBox* m_pNewStartBX; @@ -55,12 +56,16 @@ class SwParagraphNumTabPage : public SfxTabPage DECL_LINK(NewStartHdl_Impl, void *); DECL_LINK( StyleHdl_Impl, ListBox* ); DECL_LINK(LineCountHdl_Impl, void *); +DECL_LINK(EditNumStyleHdl_Impl, void *); static const sal_uInt16 aPageRg[]; protected: SwParagraphNumTabPage(vcl::Window* pParent, const SfxItemSet& rSet ); void aCountParaFL(); +boolExecuteEdi
[Libreoffice-commits] core.git: include/sfx2 sfx2/source sfx2/uiconfig
include/sfx2/mgetempl.hxx |2 ++ sfx2/source/dialog/mgetempl.cxx | 10 ++ sfx2/uiconfig/ui/managestylepage.ui | 11 +++ 3 files changed, 23 insertions(+) New commits: commit 0242f4a41e40ab5a458b51657319b95ef19b05e1 Author: Heena Gupta Date: Wed Jan 7 12:25:26 2015 +0530 Related: tdf#87675 "Edit" Button for linked style in edit paragraph style Change-Id: Ibb80d88865048e178a8d3e93cb9737881dd9f102 Reviewed-on: https://gerrit.libreoffice.org/13785 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx index fc6aefc8b..818243b 100644 --- a/include/sfx2/mgetempl.hxx +++ b/include/sfx2/mgetempl.hxx @@ -47,6 +47,7 @@ class SfxManageStyleSheetPage : public SfxTabPage FixedText* m_pBaseFt; ListBox* m_pBaseLb; +PushButton* m_pEditLinkStyleBtn; FixedText* m_pFilterFt; ListBox* m_pFilterLb; @@ -72,6 +73,7 @@ friend class SfxStyleDialog; DECL_LINK( LoseFocusHdl, Edit * ); DECL_LINK( EditStyleSelectHdl_Impl, void * ); DECL_LINK( EditStyleHdl_Impl, void * ); +DECL_LINK( EditLinkStyleHdl_Impl, void * ); voidUpdateName_Impl(ListBox *, const OUString &rNew); voidSetDescriptionText_Impl(); diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 06e531a..fdd626d 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -69,6 +69,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx get(m_pEditStyleBtn, "editstyle"); get(m_pBaseFt, "linkedwithft"); get(m_pBaseLb, "linkedwith"); +get(m_pEditLinkStyleBtn, "editlinkstyle"); m_pBaseLb->SetStyle(m_pBaseLb->GetStyle() | WB_SORT); m_pBaseLb->setMaxWidthChars(nMaxWidth); get(m_pFilterFt, "categoryft"); @@ -235,6 +236,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx m_pAutoCB->Show(); m_pFollowLb->SetSelectHdl( LINK( this, SfxManageStyleSheetPage, EditStyleSelectHdl_Impl ) ); m_pEditStyleBtn->SetClickHdl( LINK( this, SfxManageStyleSheetPage, EditStyleHdl_Impl ) ); +m_pEditLinkStyleBtn->SetClickHdl( LINK( this, SfxManageStyleSheetPage, EditLinkStyleHdl_Impl ) ); } @@ -344,6 +346,14 @@ IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditStyleHdl_Impl ) } +IMPL_LINK_NOARG( SfxManageStyleSheetPage, EditLinkStyleHdl_Impl ) +{ +OUString aTemplName(m_pBaseLb->GetSelectEntry()); +if (aTemplName != SfxResId(STR_NONE)) +Execute_Impl( SID_STYLE_EDIT, aTemplName, OUString(),(sal_uInt16)pStyle->GetFamily(), 0 ); +return 0; +} + // Internal: Perform functions through the Dispatcher bool SfxManageStyleSheetPage::Execute_Impl( sal_uInt16 nId, const OUString &rStr, const OUString& rRefStr, sal_uInt16 nFamily, diff --git a/sfx2/uiconfig/ui/managestylepage.ui b/sfx2/uiconfig/ui/managestylepage.ui index 0569c5f..ec7b026 100644 --- a/sfx2/uiconfig/ui/managestylepage.ui +++ b/sfx2/uiconfig/ui/managestylepage.ui @@ -122,6 +122,17 @@ + +Edit Style +True +False + + +2 +3 + + + True False ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/ui/chrdlg/numpara.cxx | 21 +++-- sw/source/uibase/inc/numpara.hxx |1 + 2 files changed, 20 insertions(+), 2 deletions(-) New commits: commit 704d946cdc56b6d3188b2ae49d20778b78aac8b2 Author: Heena Gupta Date: Tue Feb 17 15:56:55 2015 +0530 Relate: tdf#88045 Edit Numbering Style Button is nonclickable for None Entry Conflicts: sw/source/ui/chrdlg/numpara.cxx Change-Id: I3e2c493d412c8e7974e7cb314eb0ba8f13edb6b6 Reviewed-on: https://gerrit.libreoffice.org/14518 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 4156186..29429aa 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -72,6 +72,12 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(vcl::Window* pParent, const SfxItem get(m_pRestartBX, "boxRESTART_NO"); get(m_pRestartNF, "spinNF_RESTART_PARA"); +sal_Int32 numSelectPos = m_pNumberStyleLB->GetSelectEntryPos(); +if ( numSelectPos == 0 ) +m_pEditNumStyleBtn->Disable(); +else +m_pEditNumStyleBtn->Enable(); + const SfxPoolItem* pItem; SfxObjectShell* pObjSh; if(SfxItemState::SET == rAttr.GetItemState(SID_HTML_MODE, false, &pItem) || @@ -89,6 +95,7 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(vcl::Window* pParent, const SfxItem m_pNumberStyleLB->SetSelectHdl(LINK(this, SwParagraphNumTabPage, StyleHdl_Impl)); m_pCountParaCB->SetClickHdl(LINK(this, SwParagraphNumTabPage, LineCountHdl_Impl)); m_pRestartParaCountCB->SetClickHdl( LINK(this, SwParagraphNumTabPage, LineCountHdl_Impl)); +m_pNumberStyleLB->SetSelectHdl( LINK( this, SwParagraphNumTabPage, EditNumStyleSelectHdl_Impl ) ); m_pEditNumStyleBtn->SetClickHdl( LINK(this, SwParagraphNumTabPage, EditNumStyleHdl_Impl)); } @@ -294,11 +301,21 @@ IMPL_LINK_NOARG(SwParagraphNumTabPage, LineCountHdl_Impl) return 0; } +IMPL_LINK_NOARG( SwParagraphNumTabPage, EditNumStyleSelectHdl_Impl ) +{ +sal_Int32 numSelectPos = m_pNumberStyleLB->GetSelectEntryPos(); +if ( numSelectPos == 0 ) +m_pEditNumStyleBtn->Disable(); +else +m_pEditNumStyleBtn->Enable(); + +return 0; +} + IMPL_LINK_NOARG(SwParagraphNumTabPage, EditNumStyleHdl_Impl) { OUString aTemplName(m_pNumberStyleLB->GetSelectEntry()); -if (aTemplName != "None") -ExecuteEditNumStyle_Impl( SID_STYLE_EDIT, aTemplName, OUString(),SFX_STYLE_FAMILY_PARA, 0 ); +ExecuteEditNumStyle_Impl( SID_STYLE_EDIT, aTemplName, OUString(),SFX_STYLE_FAMILY_PARA, 0 ); return 0; } diff --git a/sw/source/uibase/inc/numpara.hxx b/sw/source/uibase/inc/numpara.hxx index 8ddd0fc..ab84db3 100644 --- a/sw/source/uibase/inc/numpara.hxx +++ b/sw/source/uibase/inc/numpara.hxx @@ -57,6 +57,7 @@ class SwParagraphNumTabPage : public SfxTabPage DECL_LINK( StyleHdl_Impl, ListBox* ); DECL_LINK(LineCountHdl_Impl, void *); DECL_LINK(EditNumStyleHdl_Impl, void *); +DECL_LINK(EditNumStyleSelectHdl_Impl, void *); static const sal_uInt16 aPageRg[]; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: cui/source cui/uiconfig
cui/source/dialogs/multipat.src|5 + cui/source/inc/cuires.hrc |1 cui/source/inc/numpages.hxx|5 + cui/source/tabpages/numpages.cxx | 109 + cui/uiconfig/ui/pickgraphicpage.ui | 16 - 5 files changed, 133 insertions(+), 3 deletions(-) New commits: commit 511499b3ba08024e3d6853f096ad1d96f96b216d Author: Heena Gupta Date: Wed May 6 15:14:20 2015 +0530 tdf#91904-Import Image for bullets through "Add and Resize" Button Change-Id: I25390268da3b16261d054cd4c093b35a9ee3ce26 Reviewed-on: https://gerrit.libreoffice.org/15642 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/cui/source/dialogs/multipat.src b/cui/source/dialogs/multipat.src index 09b3718..0dfc110 100644 --- a/cui/source/dialogs/multipat.src +++ b/cui/source/dialogs/multipat.src @@ -39,4 +39,9 @@ String RID_SVXSTR_MULTIFILE_DBL_ERR Text [ en-US ] = "The file %1 already exists." ; }; +String RID_SVXSTR_ADD_IMAGE +{ +Text [ en-US ] = "Add Image" ; +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc index d6852c3..3214b51 100644 --- a/cui/source/inc/cuires.hrc +++ b/cui/source/inc/cuires.hrc @@ -208,6 +208,7 @@ #define RID_SVXSTR_ARCHIVE_TITLE(RID_SVX_START + 484) #define RID_SVXSTR_ARCHIVE_HEADLINE (RID_SVX_START + 485) #define RID_SVXSTR_MULTIFILE_DBL_ERR(RID_SVX_START + 486) +#define RID_SVXSTR_ADD_IMAGE(RID_SVX_START + 487) // script organizer #define RID_SVXSTR_DELQUERY (RID_SVX_START + 1027) diff --git a/cui/source/inc/numpages.hxx b/cui/source/inc/numpages.hxx index fdb7219..032ad45 100644 --- a/cui/source/inc/numpages.hxx +++ b/cui/source/inc/numpages.hxx @@ -31,7 +31,7 @@ #include #include #include - +#include class SvxNumRule; class SvxBmpNumValueSet; @@ -215,6 +215,7 @@ class SvxBitmapPickTabPage : public SfxTabPage VclPtr m_pErrorText; VclPtr m_pExamplesVS; +VclPtr m_pBtBrowseFile; std::vector aGrfNames; OUStringsNumCharFmtName; @@ -231,6 +232,8 @@ protected: DECL_LINK(NumSelectHdl_Impl, void *); DECL_LINK(DoubleClickHdl_Impl, void *); DECL_LINK(LinkBmpHdl_Impl, void *); +DECL_LINK(ClickAddBrowseHdl_Impl, void * ); + public: SvxBitmapPickTabPage(vcl::Window* pParent, diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index c6e0f22..07de0c9 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -72,6 +72,15 @@ #include #include #include +#include +#include "svx/gallery1.hxx" +#include "svx/galtheme.hxx" +#include +#include +#include +#include +#include +#include using namespace css; using namespace css::uno; @@ -92,6 +101,8 @@ using namespace css::style; #define MAX_BMP_WIDTH 16 #define MAX_BMP_HEIGHT 16 +#define SEARCHPATH_DELIMITER((sal_Unicode)';') +#define SEARCHFILENAME_DELIMITER((sal_Unicode)'/') static bool bLastRelative = false; static const sal_Char cNumberingType[] = "NumberingType"; @@ -813,8 +824,11 @@ SvxBitmapPickTabPage::SvxBitmapPickTabPage(vcl::Window* pParent, SetExchangeSupport(); get(m_pErrorText, "errorft"); get(m_pExamplesVS, "valueset"); +get(m_pBtBrowseFile, "browseBtn"); + m_pExamplesVS->SetSelectHdl(LINK(this, SvxBitmapPickTabPage, NumSelectHdl_Impl)); m_pExamplesVS->SetDoubleClickHdl(LINK(this, SvxBitmapPickTabPage, DoubleClickHdl_Impl)); +m_pBtBrowseFile->SetClickHdl(LINK(this, SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl)); eCoreUnit = rSet.GetPool()->GetMetric(rSet.GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE)); @@ -856,6 +870,7 @@ void SvxBitmapPickTabPage::dispose() pActNum = NULL; delete pSaveNum; pSaveNum = NULL; +m_pBtBrowseFile.clear(); m_pErrorText.clear(); m_pExamplesVS.clear(); SfxTabPage::dispose(); @@ -1001,6 +1016,100 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, DoubleClickHdl_Impl) return 0; } +IMPL_LINK_NOARG(SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl) +{ + +sfx2::FileDialogHelper aFileDialog(0, 0); +aFileDialog.SetTitle(CUI_RES(RID_SVXSTR_ADD_IMAGE)); +if ( aFileDialog.Execute() != ERRCODE_NONE ) +return 0; + +OUString aPath = SvtPathOptions().GetGalleryPath(); +OUString aPathToken = aPath.getToken( 1 , SEARCHPATH_DELIMITER ); + +OUString aUserImageURL = aFileDialog.GetPath(); + +sal_Int32 nSub = comphelper::string::getTokenCount( aUserImageURL, '/'); +OUString aFileName = aUserImageURL.getToken( nSub-1 , SEARCHFILENAME_DELIMITER ); + +OUString aUserGalleryURL = aPathToken + "/" + aFileName; +
[Libreoffice-commits] core.git: sd/qa
sd/qa/unit/data/pptx/fdo83751.pptx |binary sd/qa/unit/export-tests.cxx| 19 +++ 2 files changed, 19 insertions(+) New commits: commit 13f4581c8db921f93f3a278f212f859a7158c482 Author: Heena Gupta Date: Fri Sep 12 17:27:16 2014 +0530 fdo#83751- Add test case for custom properties in pptx Change-Id: I83fb0462c662e0da1f1c5c6dfec4bd8d94d97b87 Reviewed-on: https://gerrit.libreoffice.org/11420 Reviewed-by: Michael Stahl Tested-by: Michael Stahl diff --git a/sd/qa/unit/data/pptx/fdo83751.pptx b/sd/qa/unit/data/pptx/fdo83751.pptx new file mode 100644 index 000..be0dfe4 Binary files /dev/null and b/sd/qa/unit/data/pptx/fdo83751.pptx differ diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 0c856fd..7aa1e26 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -52,6 +52,7 @@ #include #include +#include using namespace ::com::sun::star; @@ -69,6 +70,7 @@ public: void testBnc880763(); void testBnc862510_5(); void testBnc822347_EmptyBullet(); +void testFdo83751(); CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST(testN821567); @@ -82,6 +84,7 @@ public: CPPUNIT_TEST(testBnc880763); CPPUNIT_TEST(testBnc862510_5); CPPUNIT_TEST(testBnc822347_EmptyBullet); +CPPUNIT_TEST(testFdo83751); CPPUNIT_TEST_SUITE_END(); }; @@ -457,6 +460,22 @@ void SdFiltersTest::testBnc822347_EmptyBullet() xDocShRef->DoClose(); } +void SdFiltersTest::testFdo83751() +{ +::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/fdo83751.pptx"), PPTX); +xDocShRef = saveAndReload( xDocShRef, PPTX ); + +SdDrawDocument *pDoc = xDocShRef->GetDoc(); +CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL ); + +uno::Reference xDocumentPropertiesSupplier( xDocShRef->GetModel(), uno::UNO_QUERY ); +uno::Reference xProps( xDocumentPropertiesSupplier->getDocumentProperties(), uno::UNO_QUERY ); +uno::Reference xUDProps( xProps->getUserDefinedProperties(), uno::UNO_QUERY ); +OUString propValue; +xUDProps->getPropertyValue(OUString("Testing")) >>= propValue; +CPPUNIT_ASSERT_EQUAL(OUString("Document"), propValue); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest); CPPUNIT_PLUGIN_IMPLEMENT(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sd/source
sd/source/filter/eppt/epptooxml.hxx |3 +++ sd/source/filter/eppt/pptx-epptooxml.cxx | 21 - 2 files changed, 23 insertions(+), 1 deletion(-) New commits: commit e8bdd38882522591723097c028ca7a6927ee70c4 Author: Heena Gupta Date: Thu Sep 11 13:15:51 2014 +0530 fdo#83751-FILESAVE:Custom Properties dropped while exporting to .pptx Change-Id: Ic4b8acfc3cbd8c86b765a950d61742c229f3fb6d Reviewed-on: https://gerrit.libreoffice.org/11390 Reviewed-by: Michael Stahl Tested-by: Michael Stahl diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx index 05359fc..0197b97 100644 --- a/sd/source/filter/eppt/epptooxml.hxx +++ b/sd/source/filter/eppt/epptooxml.hxx @@ -128,6 +128,9 @@ protected: sal_Int32 GetAuthorIdAndLastIndex( const OUString& sAuthor, sal_Int32& nLastIndex ); private: +// Write docProps/core.xml and docprops/custom.xml and docprops/app.xml +void writeDocumentProperties(); + void AddLayoutIdAndRelation( ::sax_fastparser::FSHelperPtr pFS, sal_Int32 nLayoutFileId ); virtual OUString implGetImplementationName() const SAL_OVERRIDE; diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index e829fca..d00f4d8 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -64,6 +64,9 @@ #include "pptexanimations.hxx" +#include +#include + // presentation namespaces #define PNMSS FSNS( XML_xmlns, XML_a ), "http://schemas.openxmlformats.org/drawingml/2006/main";, \ FSNS( XML_xmlns, XML_p ), "http://schemas.openxmlformats.org/presentationml/2006/main";, \ @@ -318,6 +321,18 @@ PowerPointExport::~PowerPointExport() { } +void PowerPointExport::writeDocumentProperties() +{ +uno::Reference xDPS( mXModel, uno::UNO_QUERY ); +uno::Reference xDocProps = xDPS->getDocumentProperties(); + +if (xDocProps.is()) +{ +PowerPointExport& mrExport(*this); +mrExport.exportDocumentProperties( xDocProps ); +} +} + bool PowerPointExport::importDocument() throw() { return false; @@ -328,6 +343,11 @@ bool PowerPointExport::exportDocument() throw (css::uno::RuntimeException, std:: DrawingML::ResetCounters(); maShapeMap.clear (); +mXModel.set( getModel(), UNO_QUERY ); + +//write document properties +writeDocumentProperties(); + addRelation( "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";, "ppt/presentation.xml" ); mPresentationFS = openFragmentStreamWithSerializer( "ppt/presentation.xml", @@ -339,7 +359,6 @@ bool PowerPointExport::exportDocument() throw (css::uno::RuntimeException, std:: mPresentationFS->startElementNS( XML_p, XML_presentation, PNMSS, FSEND ); -mXModel.set( getModel(), UNO_QUERY ); mXStatusIndicator.set( getStatusIndicator(), UNO_QUERY ); OUString sBaseURI( "BaseURI"); ___ 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/11346/3'
___ 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/11346/2'
___ 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/22/10322/1'
___ 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/11346/1'
___ 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/22/10322/2'
___ 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/68/10468/2'
___ 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/68/10468/1'
___ 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/90/11390/4'
___ 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/90/11390/5'
___ 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/90/11390/2'
___ 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/90/11390/6'
___ 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/90/11390/7'
___ 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/20/11420/2'
___ 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/20/11420/1'
___ 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/90/11390/3'
___ 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/90/11390/1'
___ 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/65/11265/1'
___ 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/65/11265/3'
___ 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/06/9806/4'
___ 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/06/9806/7'
___ 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/06/9806/2'
___ 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/06/9806/8'
___ 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/06/9806/1'
___ 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/06/9806/3'
___ 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/06/9806/6'
___ 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/78/9978/1'
___ 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/06/9806/5'
___ 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/78/9978/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits