From e26194b675380ad6b6a1287f97bce93006be176c Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Tue, 16 Nov 2010 15:03:23 +0100 Subject: chart52: #28670# make the legend within charts resizeable - part 1 - patch from hackfest2010 --- xmloff/inc/xmloff/xmltoken.hxx | 5 +++++ xmloff/source/chart/SchXMLExport.cxx | 36 ++++++++++++++++++++++++++++-------- xmloff/source/core/xmltoken.cxx | 5 +++++ 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index 291c99c7be21..241201ea5ed7 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -3113,6 +3113,11 @@ namespace xmloff { namespace token { XML_OUTSIDE_MINIMUM,//#i114142# XML_OUTSIDE_MAXIMUM,//#i114142# + XML_LEGEND_EXPANSION, //#i28760# + XML_BALANCED, //#i28760# + XML_HIGH, //#i28760# + XML_WIDE, //#i28760# + XML_MIN_VALUE, XML_MAX_VALUE, diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index e6f6fc6d9340..9450eb383d1c 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -66,6 +66,7 @@ #include #include +#include #include #include #include @@ -234,8 +235,8 @@ public: void addPosition( const ::com::sun::star::awt::Point & rPosition ); void addPosition( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); /// add svg size as attribute for current element - void addSize( const ::com::sun::star::awt::Size & rSize ); - void addSize( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); + void addSize( const ::com::sun::star::awt::Size & rSize, bool bIsOOoNamespace = false ); + void addSize( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape, bool bIsOOoNamespace = false ); /// fills the member msString with the appropriate String (i.e. "A3") void getCellAddress( sal_Int32 nCol, sal_Int32 nRow ); /// exports a string as a paragraph element @@ -1460,6 +1461,24 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& Reference< drawing::XShape > xShape( xProp, uno::UNO_QUERY ); if( xShape.is()) addPosition( xShape ); + + // export size + chart2::LegendExpansion aLegendExpansion = chart2::LegendExpansion_HIGH; + try + { + Any aAny( xProp->getPropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM( "Expansion" )))); + bool bHasExpansion = (aAny >>= aLegendExpansion); + //todo + //if (bHasExpansion) + // mrExport.AddAttribute( XML_NAMESPACE_STYLE, XML_LEGEND_EXPANSION, ); + } + catch( beans::UnknownPropertyException & ) + { + DBG_WARNING( "Property Expansion not found in ChartLegend" ); + } + + } // write style name @@ -3591,21 +3610,22 @@ void SchXMLExportHelper_Impl::addPosition( Reference< drawing::XShape > xShape ) addPosition( xShape->getPosition()); } -void SchXMLExportHelper_Impl::addSize( const awt::Size & rSize ) +void SchXMLExportHelper_Impl::addSize( const awt::Size & rSize, bool bIsOOoNamespace) { mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rSize.Width ); msString = msStringBuffer.makeStringAndClear(); - mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_WIDTH, msString ); + mrExport.AddAttribute( bIsOOoNamespace ? XML_NAMESPACE_CHART_EXT : XML_NAMESPACE_SVG , XML_WIDTH, msString ); + - mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rSize.Height ); + mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rSize.Height); msString = msStringBuffer.makeStringAndClear(); - mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT, msString ); + mrExport.AddAttribute( bIsOOoNamespace ? XML_NAMESPACE_CHART_EXT : XML_NAMESPACE_SVG, XML_HEIGHT, msString ); } -void SchXMLExportHelper_Impl::addSize( Reference< drawing::XShape > xShape ) +void SchXMLExportHelper_Impl::addSize( Reference< drawing::XShape > xShape, bool bIsOOoNamespace ) { if( xShape.is()) - addSize( xShape->getSize() ); + addSize( xShape->getSize(), bIsOOoNamespace ); } awt::Size SchXMLExportHelper_Impl::getPageSize( const Reference< chart2::XChartDocument > & xChartDoc ) const diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 6cfacbd93905..6c077ff1e4d8 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3113,6 +3113,11 @@ namespace xmloff { namespace token { TOKEN( "outside-minimum", XML_OUTSIDE_MINIMUM ), TOKEN( "outside-maximum", XML_OUTSIDE_MAXIMUM ), + TOKEN( "legend-expansion", XML_LEGEND_EXPANSION), + TOKEN( "balanced", XML_BALANCED), + TOKEN( "high", XML_HIGH), + TOKEN( "wide", XML_WIDE), + TOKEN( "min-value", XML_MIN_VALUE ), TOKEN( "max-value", XML_MAX_VALUE ), -- cgit From 22b333e4aea06744493f9598f162cce451e73e21 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 6 Dec 2010 14:14:11 +0100 Subject: gridsort: give the UnoControl(Model/Base) classes a ctor taking a service factory, so we have access to the factory which created us, and don't need to resort to the process'es service factory --- svx/source/fmcomp/fmgridif.cxx | 3 ++- svx/source/form/formcontroller.cxx | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 5a033cd77d44..316be74510f6 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -365,7 +365,8 @@ Reference< XInterface > SAL_CALL FmXGridControl_NewInstance_Impl(const Reference DBG_NAME(FmXGridControl ) //------------------------------------------------------------------------------ FmXGridControl::FmXGridControl(const Reference< XMultiServiceFactory >& _rxFactory) - :m_aModifyListeners(*this, GetMutex()) + :UnoControl( _rxFactory) + ,m_aModifyListeners(*this, GetMutex()) ,m_aUpdateListeners(*this, GetMutex()) ,m_aContainerListeners(*this, GetMutex()) ,m_aSelectionListeners(*this, GetMutex()) diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index f43233ae08ba..027d199269c2 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -479,7 +479,10 @@ class FmXAutoControl: public UnoControl friend Reference< XInterface > SAL_CALL FmXAutoControl_NewInstance_Impl(); public: - FmXAutoControl(){} + FmXAutoControl( const ::comphelper::ComponentContext& i_context ) + :UnoControl( i_context.getLegacyServiceFactory() ) + { + } virtual ::rtl::OUString GetComponentServiceName() {return ::rtl::OUString::createFromAscii("Edit");} virtual void SAL_CALL createPeer( const Reference< XToolkit > & rxToolkit, const Reference< XWindowPeer > & rParentPeer ) throw( RuntimeException ); @@ -1451,7 +1454,7 @@ void FormController::toggleAutoFields(sal_Bool bAutoFields) && ::comphelper::getBOOL( xField->getPropertyValue( FM_PROP_AUTOINCREMENT ) ) ) { - replaceControl( xControl, new FmXAutoControl ); + replaceControl( xControl, new FmXAutoControl( m_aContext ) ); } } } -- cgit From 64dcaa7199870f0c03403df10a5ae9d028b9c7b6 Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 10 Jan 2011 13:49:30 +0100 Subject: sb139: #i77102# forget about configmgr user-layer removals that no longer remove anything --- configmgr/source/xcuparser.cxx | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx index 1a9575bb6726..dc5d08cb4e08 100644 --- a/configmgr/source/xcuparser.cxx +++ b/configmgr/source/xcuparser.cxx @@ -1099,17 +1099,25 @@ void XcuParser::handleSetNode(xmlreader::XmlReader & reader, SetNode * set) { } break; case OPERATION_REMOVE: - // Ignore removal of unknown members, members finalized in a lower - // layer, and members made mandatory in this or a lower layer: - if (i != set->getMembers().end() && !state_.top().locked && - finalizedLayer >= valueParser_.getLayer() && - mandatoryLayer > valueParser_.getLayer()) { - set->getMembers().erase(i); + // Ignore removal of unknown members, members finalized in a lower + // layer, and members made mandatory in this or a lower layer; + // forget about user-layer removals that no longer remove anything + // (so that paired additions/removals in the user layer do not grow + // registrymodifications.xcu unbounded): + bool known = i != set->getMembers().end(); + if (known && !state_.top().locked && + finalizedLayer >= valueParser_.getLayer() && + mandatoryLayer > valueParser_.getLayer()) + { + set->getMembers().erase(i); + } + state_.push(State(true)); + if (known) { + recordModification(false); + } + break; } - state_.push(State(true)); - recordModification(false); - break; } } -- cgit From d64c1529ace2ddf4060704a1a871c005156c5a81 Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 10 Jan 2011 14:09:52 +0100 Subject: sb139: #i114601# COMMON_OUTDIR removed in the meantime, so COMMON_OUTPUT typo can go, too --- officecfg/util/makefile.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/officecfg/util/makefile.mk b/officecfg/util/makefile.mk index 332ac90fe2ea..c1fa54277141 100644 --- a/officecfg/util/makefile.mk +++ b/officecfg/util/makefile.mk @@ -37,7 +37,6 @@ TARGET=util $(MISC)$/$(TARGET)_delzip : -$(RM) $(BIN)$/registry_{$(alllangiso)}.zip - -$(RM) $(COMMON_OUTPUT)$/bin$/registry_{$(alllangiso)}.zip $(BIN)$/registry_{$(alllangiso)}.zip : $(MISC)$/$(TARGET)_delzip cd $(MISC)$/registry$/res$/$(@:b:s/registry_//) && zip -ru ..$/..$/..$/..$/bin$/registry_$(@:b:s/registry_//).zip org/* -- cgit From 93f059dfb6d817afaff56694f242dba3a1897c3b Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 10 Jan 2011 16:45:42 +0100 Subject: sb139: #i116391# for backwards compatibility, allow absolute paths in configmgr getByHierarchicalName et al --- configmgr/source/access.cxx | 100 ++++++++++++++++++++++++++++++-------------- 1 file changed, 69 insertions(+), 31 deletions(-) diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 933a414d331c..2548643c7ce1 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -1993,45 +1993,83 @@ rtl::Reference< ChildAccess > Access::getUnmodifiedChild( } rtl::Reference< ChildAccess > Access::getSubChild(rtl::OUString const & path) { - rtl::OUString name; - bool setElement; - rtl::OUString templateName; - sal_Int32 i = Data::parseSegment( - path, 0, &name, &setElement, &templateName); - if (i == -1 || (i != path.getLength() && path[i] != '/')) { - return rtl::Reference< ChildAccess >(); - } - rtl::Reference< ChildAccess > child(getChild(name)); - if (!child.is()) { - return rtl::Reference< ChildAccess >(); - } - if (setElement) { - rtl::Reference< Node > p(getNode()); - switch (p->kind()) { - case Node::KIND_LOCALIZED_PROPERTY: - if (!Components::allLocales(getRootAccess()->getLocale()) || - templateName.getLength() != 0) - { + sal_Int32 i = 0; + // For backwards compatibility, allow absolute paths where meaningful: + if (path.getLength() != 0 && path[0] == '/') { + ++i; + if (!getRootAccess().is()) { + return rtl::Reference< ChildAccess >(); + } + Path abs(getAbsolutePath()); + for (Path::iterator j(abs.begin()); j != abs.end(); ++j) { + rtl::OUString name1; + bool setElement1; + rtl::OUString templateName1; + i = Data::parseSegment( + path, i, &name1, &setElement1, &templateName1); + if (i == -1 || (i != path.getLength() && path[i] != '/')) { return rtl::Reference< ChildAccess >(); } - break; - case Node::KIND_SET: - if (templateName.getLength() != 0 && - !dynamic_cast< SetNode * >(p.get())->isValidTemplate( - templateName)) + rtl::OUString name2; + bool setElement2; + rtl::OUString templateName2; + Data::parseSegment(*j, 0, &name2, &setElement2, &templateName2); + if (name1 != name2 || setElement1 != setElement2 || + (setElement1 && + !Data::equalTemplateNames(templateName1, templateName2))) { return rtl::Reference< ChildAccess >(); } - break; - default: + if (i != path.getLength()) { + ++i; + } + } + } + for (rtl::Reference< Access > parent(this);;) { + rtl::OUString name; + bool setElement; + rtl::OUString templateName; + i = Data::parseSegment(path, i, &name, &setElement, &templateName); + if (i == -1 || (i != path.getLength() && path[i] != '/')) { return rtl::Reference< ChildAccess >(); } + rtl::Reference< ChildAccess > child(parent->getChild(name)); + if (!child.is()) { + return rtl::Reference< ChildAccess >(); + } + if (setElement) { + rtl::Reference< Node > p(parent->getNode()); + switch (p->kind()) { + case Node::KIND_LOCALIZED_PROPERTY: + if (!Components::allLocales(getRootAccess()->getLocale()) || + templateName.getLength() != 0) + { + return rtl::Reference< ChildAccess >(); + } + break; + case Node::KIND_SET: + if (templateName.getLength() != 0 && + !dynamic_cast< SetNode * >(p.get())->isValidTemplate( + templateName)) + { + return rtl::Reference< ChildAccess >(); + } + break; + default: + return rtl::Reference< ChildAccess >(); + } + } + // For backwards compatibility, ignore a final slash after non-value + // nodes: + if (child->isValue()) { + return i == path.getLength() + ? child : rtl::Reference< ChildAccess >(); + } else if (i >= path.getLength() - 1) { + return child; + } + ++i; + parent = child.get(); } - // For backwards compatibility, ignore a final slash after non-value nodes: - return child->isValue() - ? (i == path.getLength() ? child : rtl::Reference< ChildAccess >()) - : (i >= path.getLength() - 1 - ? child : child->getSubChild(path.copy(i + 1))); } bool Access::setChildProperty( -- cgit From f308742dbe1238eb7ff020664af7515f12489217 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 19 Jan 2011 12:52:07 +0100 Subject: accfixes: accessible name for preview bitmap --- fpicker/source/office/iodlg.cxx | 1 + fpicker/source/office/iodlg.hrc | 1 + fpicker/source/office/iodlg.src | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index b9d7fac3aa3b..0ab0f33db24f 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -3015,6 +3015,7 @@ void SvtFileDialog::AddControls_Impl( ) _pPrevBmp = new FixedBitmap( this, WinBits( WB_BORDER ) ); _pPrevBmp->SetBackground( Wallpaper( Color( COL_WHITE ) ) ); _pPrevBmp->Show(); + _pPrevBmp->SetAccessibleName(SvtResId(STR_PREVIEW)); } if ( _nExtraBits & SFX_EXTRA_AUTOEXTENSION ) diff --git a/fpicker/source/office/iodlg.hrc b/fpicker/source/office/iodlg.hrc index b87082b56cbd..42b235ee31af 100644 --- a/fpicker/source/office/iodlg.hrc +++ b/fpicker/source/office/iodlg.hrc @@ -70,6 +70,7 @@ #define STR_PATHSELECT 5 #define STR_BUTTONSELECT 6 #define STR_ACTUALVERSION 7 +#define STR_PREVIEW 8 // DLG_SVT_QUERYFOLDERNAME ----------------------- diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src index da2d1cd926b6..2a460797fe56 100644 --- a/fpicker/source/office/iodlg.src +++ b/fpicker/source/office/iodlg.src @@ -251,6 +251,10 @@ ModalDialog DLG_SVT_EXPLORERFILE { Text [ en-US ] = "Current version"; }; + String STR_PREVIEW + { + Text [ en-US ] = "File Preview"; + }; }; // QueryFolderNameDialog ---------------------------------------------------------- -- cgit From 27be8d12e3a3d8b5b70741d6c6c470e78bd41f12 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 19 Jan 2011 16:33:54 +0100 Subject: vcl118: #i115048# revert brochure printing in writer to old behavior taking the paper size form the printer driver, add paper name to print preview --- editeng/source/items/paperinf.cxx | 46 +-------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx index 270e188f146f..c91440427d8e 100644 --- a/editeng/source/items/paperinf.cxx +++ b/editeng/source/items/paperinf.cxx @@ -135,51 +135,7 @@ Size SvxPaperInfo::GetDefaultPaperSize( MapUnit eUnit ) String SvxPaperInfo::GetName( Paper ePaper ) { - USHORT nResId = 0; - - switch ( ePaper ) - { - case PAPER_A0: nResId = RID_SVXSTR_PAPER_A0; break; - case PAPER_A1: nResId = RID_SVXSTR_PAPER_A1; break; - case PAPER_A2: nResId = RID_SVXSTR_PAPER_A2; break; - case PAPER_A3: nResId = RID_SVXSTR_PAPER_A3; break; - case PAPER_A4: nResId = RID_SVXSTR_PAPER_A4; break; - case PAPER_A5: nResId = RID_SVXSTR_PAPER_A5; break; - case PAPER_B4_ISO: nResId = RID_SVXSTR_PAPER_B4_ISO; break; - case PAPER_B5_ISO: nResId = RID_SVXSTR_PAPER_B5_ISO; break; - case PAPER_LETTER: nResId = RID_SVXSTR_PAPER_LETTER; break; - case PAPER_LEGAL: nResId = RID_SVXSTR_PAPER_LEGAL; break; - case PAPER_TABLOID: nResId = RID_SVXSTR_PAPER_TABLOID; break; - case PAPER_USER: nResId = RID_SVXSTR_PAPER_USER; break; - case PAPER_B6_ISO: nResId = RID_SVXSTR_PAPER_B6_ISO; break; - case PAPER_ENV_C4: nResId = RID_SVXSTR_PAPER_C4; break; - case PAPER_ENV_C5: nResId = RID_SVXSTR_PAPER_C5; break; - case PAPER_ENV_C6: nResId = RID_SVXSTR_PAPER_C6; break; - case PAPER_ENV_C65: nResId = RID_SVXSTR_PAPER_C65; break; - case PAPER_ENV_DL: nResId = RID_SVXSTR_PAPER_DL; break; - case PAPER_SLIDE_DIA: nResId = RID_SVXSTR_PAPER_DIA; break; - case PAPER_SCREEN: nResId = RID_SVXSTR_PAPER_SCREEN; break; - case PAPER_C: nResId = RID_SVXSTR_PAPER_C; break; - case PAPER_D: nResId = RID_SVXSTR_PAPER_D; break; - case PAPER_E: nResId = RID_SVXSTR_PAPER_E; break; - case PAPER_EXECUTIVE: nResId = RID_SVXSTR_PAPER_EXECUTIVE;break; - case PAPER_FANFOLD_LEGAL_DE: nResId = RID_SVXSTR_PAPER_LEGAL2; break; - case PAPER_ENV_MONARCH: nResId = RID_SVXSTR_PAPER_MONARCH; break; - case PAPER_ENV_PERSONAL: nResId = RID_SVXSTR_PAPER_COM675; break; - case PAPER_ENV_9: nResId = RID_SVXSTR_PAPER_COM9; break; - case PAPER_ENV_10: nResId = RID_SVXSTR_PAPER_COM10; break; - case PAPER_ENV_11: nResId = RID_SVXSTR_PAPER_COM11; break; - case PAPER_ENV_12: nResId = RID_SVXSTR_PAPER_COM12; break; - case PAPER_KAI16: nResId = RID_SVXSTR_PAPER_KAI16; break; - case PAPER_KAI32: nResId = RID_SVXSTR_PAPER_KAI32; break; - case PAPER_KAI32BIG: nResId = RID_SVXSTR_PAPER_KAI32BIG; break; - case PAPER_B4_JIS: nResId = RID_SVXSTR_PAPER_B4_JIS; break; - case PAPER_B5_JIS: nResId = RID_SVXSTR_PAPER_B5_JIS; break; - case PAPER_B6_JIS: nResId = RID_SVXSTR_PAPER_B6_JIS; break; - default: DBG_ERRORFILE( "unknown papersize" ); - } - - return ( nResId > 0 ) ? String( EditResId( nResId ) ) : String(); + return String( Printer::GetPaperName( ePaper ) ); } -- cgit From 5b3e910e926c7dd1e8dcfe8e0a5c6cb5bd17480a Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Wed, 19 Jan 2011 18:35:45 +0100 Subject: vcl118: #i115048# clean up, paper names are now in vcl and can be accessed with Printer::GetPaperName --- editeng/inc/editeng/editrids.hrc | 39 ----------- editeng/source/items/page.src | 148 --------------------------------------- 2 files changed, 187 deletions(-) diff --git a/editeng/inc/editeng/editrids.hrc b/editeng/inc/editeng/editrids.hrc index dcef661d01b8..209d284a7fde 100644 --- a/editeng/inc/editeng/editrids.hrc +++ b/editeng/inc/editeng/editrids.hrc @@ -240,45 +240,6 @@ #define RID_SVXITEMS_WEIGHT_ULTRABOLD (RID_EDIT_START + 167) #define RID_SVXITEMS_WEIGHT_BLACK (RID_EDIT_START + 168) -// paper formats -#define RID_SVXSTR_PAPER_A0 (RID_SVX_START + 169) -#define RID_SVXSTR_PAPER_A1 (RID_SVX_START + 170) -#define RID_SVXSTR_PAPER_A2 (RID_SVX_START + 171) -#define RID_SVXSTR_PAPER_A3 (RID_SVX_START + 172) -#define RID_SVXSTR_PAPER_A4 (RID_SVX_START + 173) -#define RID_SVXSTR_PAPER_A5 (RID_SVX_START + 174) -#define RID_SVXSTR_PAPER_B4_ISO (RID_SVX_START + 175) -#define RID_SVXSTR_PAPER_B5_ISO (RID_SVX_START + 176) -#define RID_SVXSTR_PAPER_LETTER (RID_SVX_START + 177) -#define RID_SVXSTR_PAPER_LEGAL (RID_SVX_START + 178) -#define RID_SVXSTR_PAPER_TABLOID (RID_SVX_START + 179) -#define RID_SVXSTR_PAPER_USER (RID_SVX_START + 180) -#define RID_SVXSTR_PAPER_B6_ISO (RID_SVX_START + 181) -#define RID_SVXSTR_PAPER_C4 (RID_SVX_START + 182) -#define RID_SVXSTR_PAPER_C5 (RID_SVX_START + 183) -#define RID_SVXSTR_PAPER_C6 (RID_SVX_START + 184) -#define RID_SVXSTR_PAPER_C65 (RID_SVX_START + 185) -#define RID_SVXSTR_PAPER_DL (RID_SVX_START + 186) -#define RID_SVXSTR_PAPER_DIA (RID_SVX_START + 187) -#define RID_SVXSTR_PAPER_SCREEN (RID_SVX_START + 188) -#define RID_SVXSTR_PAPER_C (RID_SVX_START + 189) -#define RID_SVXSTR_PAPER_D (RID_SVX_START + 190) -#define RID_SVXSTR_PAPER_E (RID_SVX_START + 191) -#define RID_SVXSTR_PAPER_EXECUTIVE (RID_SVX_START + 192) -#define RID_SVXSTR_PAPER_LEGAL2 (RID_SVX_START + 193) -#define RID_SVXSTR_PAPER_MONARCH (RID_SVX_START + 194) -#define RID_SVXSTR_PAPER_COM675 (RID_SVX_START + 195) -#define RID_SVXSTR_PAPER_COM9 (RID_SVX_START + 196) -#define RID_SVXSTR_PAPER_COM10 (RID_SVX_START + 197) -#define RID_SVXSTR_PAPER_COM11 (RID_SVX_START + 198) -#define RID_SVXSTR_PAPER_COM12 (RID_SVX_START + 199) -#define RID_SVXSTR_PAPER_KAI16 (RID_SVX_START + 200) -#define RID_SVXSTR_PAPER_KAI32 (RID_SVX_START + 201) -#define RID_SVXSTR_PAPER_KAI32BIG (RID_SVX_START + 202) -#define RID_SVXSTR_PAPER_B4_JIS (RID_SVX_START + 203) -#define RID_SVXSTR_PAPER_B5_JIS (RID_SVX_START + 204) -#define RID_SVXSTR_PAPER_B6_JIS (RID_SVX_START + 205) - // enum FontItalic ------------------------------------------------------- #define RID_SVXITEMS_ITALIC_BEGIN (RID_EDIT_START + 206) #define RID_SVXITEMS_ITALIC_NONE (RID_EDIT_START + 206) diff --git a/editeng/source/items/page.src b/editeng/source/items/page.src index 9fe7f3013ce6..c528dc8b0bd0 100644 --- a/editeng/source/items/page.src +++ b/editeng/source/items/page.src @@ -29,154 +29,6 @@ #include -String RID_SVXSTR_PAPER_A0 -{ - Text = "A0" ; -}; -String RID_SVXSTR_PAPER_A1 -{ - Text = "A1" ; -}; -String RID_SVXSTR_PAPER_A2 -{ - Text = "A2" ; -}; -String RID_SVXSTR_PAPER_A3 -{ - Text = "A3" ; -}; -String RID_SVXSTR_PAPER_A4 -{ - Text = "A4" ; -}; -String RID_SVXSTR_PAPER_A5 -{ - Text = "A5" ; -}; -String RID_SVXSTR_PAPER_B4_ISO -{ - Text = "B4 (ISO)" ; -}; -String RID_SVXSTR_PAPER_B5_ISO -{ - Text = "B5 (ISO)" ; -}; -String RID_SVXSTR_PAPER_LETTER -{ - Text = "Letter" ; -}; -String RID_SVXSTR_PAPER_LEGAL -{ - Text = "Legal" ; -}; -String RID_SVXSTR_PAPER_TABLOID -{ - Text = "Tabloid" ; -}; -String RID_SVXSTR_PAPER_USER -{ - Text [ en-US ] = "User Defined" ; -}; -String RID_SVXSTR_PAPER_B6_ISO -{ - Text = "B6 (ISO)" ; -}; -String RID_SVXSTR_PAPER_C4 -{ - Text = "C4 Envelope" ; -}; -String RID_SVXSTR_PAPER_C5 -{ - Text = "C5 Envelope" ; -}; -String RID_SVXSTR_PAPER_C6 -{ - Text = "C6 Envelope" ; -}; -String RID_SVXSTR_PAPER_C65 -{ - Text = "C6/5 Envelope" ; -}; -String RID_SVXSTR_PAPER_DL -{ - Text = "DL Envelope" ; -}; -String RID_SVXSTR_PAPER_DIA -{ - Text = "Dia Slide" ; -}; -String RID_SVXSTR_PAPER_SCREEN -{ - Text [ en-US ] = "Screen" ; -}; -String RID_SVXSTR_PAPER_C -{ - Text = "C" ; -}; -String RID_SVXSTR_PAPER_D -{ - Text = "D" ; -}; -String RID_SVXSTR_PAPER_E -{ - Text = "E" ; -}; -String RID_SVXSTR_PAPER_EXECUTIVE -{ - Text = "Executive" ; -}; -String RID_SVXSTR_PAPER_LEGAL2 -{ - Text = "Long Bond" ; -}; -String RID_SVXSTR_PAPER_MONARCH -{ - Text = "#8 (Monarch) Envelope" ; -}; -String RID_SVXSTR_PAPER_COM675 -{ - Text = "#6 3/4 (Personal) Envelope" ; -}; -String RID_SVXSTR_PAPER_COM9 -{ - Text = "#9 Envelope" ; -}; -String RID_SVXSTR_PAPER_COM10 -{ - Text = "#10 Envelope" ; -}; -String RID_SVXSTR_PAPER_COM11 -{ - Text = "#11 Envelope" ; -}; -String RID_SVXSTR_PAPER_COM12 -{ - Text = "#12 Envelope" ; -}; -String RID_SVXSTR_PAPER_KAI16 -{ - Text = "16 Kai" ; -}; -String RID_SVXSTR_PAPER_KAI32 -{ - Text = "32 Kai" ; -}; -String RID_SVXSTR_PAPER_KAI32BIG -{ - Text = "Big 32 Kai" ; -}; -String RID_SVXSTR_PAPER_B4_JIS -{ - Text = "B4 (JIS)" ; -}; -String RID_SVXSTR_PAPER_B5_JIS -{ - Text = "B5 (JIS)" ; -}; -String RID_SVXSTR_PAPER_B6_JIS -{ - Text = "B6 (JIS)" ; -}; String RID_SVXSTR_PAPERBIN { Text [ en-US ] = "Paper tray" ; -- cgit From 824728abf8b278fbba9aad340390be8268ab005e Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 19 Jan 2011 19:06:48 +0100 Subject: accfixes: fixed tab order --- formula/source/ui/dlg/parawin.cxx | 24 ++++++++++++------------ formula/source/ui/dlg/parawin.hxx | 26 +++++++++++++------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index 5e656aea0967..7263236b30b1 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -56,24 +56,24 @@ ParaWin::ParaWin(Window* pParent,IControlReferenceHandler* _pDlg,Point aPos): aFtArgName ( this, ModuleRes( FT_PARNAME ) ), aFtArgDesc ( this, ModuleRes( FT_PARDESC ) ), + aBtnFx1 ( this, ModuleRes( BTN_FX1 ) ), aFtArg1 ( this, ModuleRes( FT_ARG1 ) ), - aFtArg2 ( this, ModuleRes( FT_ARG2 ) ), - aFtArg3 ( this, ModuleRes( FT_ARG3 ) ), - aFtArg4 ( this, ModuleRes( FT_ARG4 ) ), + aEdArg1 ( this, ModuleRes( ED_ARG1 ) ), + aRefBtn1 ( this, ModuleRes( RB_ARG1 ) ), - aBtnFx1 ( this, ModuleRes( BTN_FX1 ) ), aBtnFx2 ( this, ModuleRes( BTN_FX2 ) ), - aBtnFx3 ( this, ModuleRes( BTN_FX3 ) ), - aBtnFx4 ( this, ModuleRes( BTN_FX4 ) ), - - aEdArg1 ( this, ModuleRes( ED_ARG1 ) ), + aFtArg2 ( this, ModuleRes( FT_ARG2 ) ), aEdArg2 ( this, ModuleRes( ED_ARG2 ) ), - aEdArg3 ( this, ModuleRes( ED_ARG3 ) ), - aEdArg4 ( this, ModuleRes( ED_ARG4 ) ), - - aRefBtn1 ( this, ModuleRes( RB_ARG1 ) ), aRefBtn2 ( this, ModuleRes( RB_ARG2 ) ), + + aBtnFx3 ( this, ModuleRes( BTN_FX3 ) ), + aFtArg3 ( this, ModuleRes( FT_ARG3 ) ), + aEdArg3 ( this, ModuleRes( ED_ARG3 ) ), aRefBtn3 ( this, ModuleRes( RB_ARG3 ) ), + + aBtnFx4 ( this, ModuleRes( BTN_FX4 ) ), + aFtArg4 ( this, ModuleRes( FT_ARG4 ) ), + aEdArg4 ( this, ModuleRes( ED_ARG4 ) ), aRefBtn4 ( this, ModuleRes( RB_ARG4 ) ), aSlider ( this, ModuleRes( WND_SLIDER ) ), diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx index bfaebccdca09..effaa3abb9c0 100644 --- a/formula/source/ui/dlg/parawin.hxx +++ b/formula/source/ui/dlg/parawin.hxx @@ -68,25 +68,25 @@ private: FixedText aFtArgName; FixedInfo aFtArgDesc; + ImageButton aBtnFx1; FixedText aFtArg1; - FixedText aFtArg2; - FixedText aFtArg3; - FixedText aFtArg4; + ArgEdit aEdArg1; + RefButton aRefBtn1; - ImageButton aBtnFx1; ImageButton aBtnFx2; - ImageButton aBtnFx3; - ImageButton aBtnFx4; - - ArgEdit aEdArg1; + FixedText aFtArg2; ArgEdit aEdArg2; + RefButton aRefBtn2; + + ImageButton aBtnFx3; + FixedText aFtArg3; ArgEdit aEdArg3; - ArgEdit aEdArg4; + RefButton aRefBtn3; - RefButton aRefBtn1; - RefButton aRefBtn2; - RefButton aRefBtn3; - RefButton aRefBtn4; + ImageButton aBtnFx4; + FixedText aFtArg4; + ArgEdit aEdArg4; + RefButton aRefBtn4; ScrollBar aSlider; String m_sOptional; -- cgit From 5983e2391c1cd2f95e72d89687170b158430041c Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Wed, 19 Jan 2011 19:07:50 +0100 Subject: accfixes: added more accessibility information --- formula/source/ui/dlg/formula.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 0a971e94e5b6..9842d4c29157 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -313,6 +313,11 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent aRefBtn.Hide(); pMEdit = aMEFormula.GetEdit(); + //IAccessibility2 Implementation 2009----- + aMEFormula.SetAccessibleName(aFtFormula.GetText()); + if (pMEdit) + pMEdit->SetAccessibleName(aFtFormula.GetText()); + //-----IAccessibility2 Implementation 2009 m_aEditHelpId = pMEdit->GetHelpId(); pMEdit->SetUniqueId( m_aEditHelpId ); -- cgit From e9ba5cd3ff6a45cde3c2681dcff1787f85e118da Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 10:02:35 +0100 Subject: accfixes: added more accessibility information and fixed tab orders in multiple dialogs (sfx2 module) --- sfx2/inc/sfx2/dinfdlg.hxx | 2 +- sfx2/inc/sfx2/mgetempl.hxx | 2 +- sfx2/inc/sfx2/sfx.hrc | 3 +++ sfx2/source/appl/sfx.src | 5 +++++ sfx2/source/dialog/dinfdlg.cxx | 11 +++++++++++ sfx2/source/dialog/dinfdlg.hrc | 4 ++++ sfx2/source/dialog/dinfdlg.src | 4 ++++ sfx2/source/dialog/newstyle.cxx | 1 + sfx2/source/dialog/passwd.cxx | 1 + sfx2/source/dialog/passwd.hrc | 3 +++ sfx2/source/dialog/passwd.src | 37 +++++-------------------------------- sfx2/source/dialog/tabdlg.cxx | 5 +++++ sfx2/source/dialog/templdlg.cxx | 2 ++ sfx2/source/dialog/templdlg.hrc | 3 +++ sfx2/source/dialog/templdlg.src | 4 ++++ 15 files changed, 53 insertions(+), 34 deletions(-) diff --git a/sfx2/inc/sfx2/dinfdlg.hxx b/sfx2/inc/sfx2/dinfdlg.hxx index 4a33afde24d5..5a141ca54fcb 100644 --- a/sfx2/inc/sfx2/dinfdlg.hxx +++ b/sfx2/inc/sfx2/dinfdlg.hxx @@ -552,9 +552,9 @@ public: class SfxCustomPropertiesPage : public SfxTabPage { private: - FixedText m_aPropertiesFT; CustomPropertiesControl m_aPropertiesCtrl; PushButton m_aAddBtn; + FixedText m_aPropertiesFT; // Sym2_5121----, Moved by Steve Yin DECL_LINK( AddHdl, PushButton* ); diff --git a/sfx2/inc/sfx2/mgetempl.hxx b/sfx2/inc/sfx2/mgetempl.hxx index a63f665c1071..9720bfcad74e 100644 --- a/sfx2/inc/sfx2/mgetempl.hxx +++ b/sfx2/inc/sfx2/mgetempl.hxx @@ -70,9 +70,9 @@ class SfxManageStyleSheetPage : public SfxTabPage FixedText aFilterFt; ListBox aFilterLb; + FixedLine aDescGb; FixedInfo aDescFt; MultiLineEdit aDescED; - FixedLine aDescGb; SfxStyleSheetBase *pStyle; SfxStyleFamilies *pFamilies; diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc index 44c00cc93018..911016fdf9d2 100644 --- a/sfx2/inc/sfx2/sfx.hrc +++ b/sfx2/inc/sfx2/sfx.hrc @@ -267,6 +267,9 @@ #define STR_ERRUNOEVENTBINDUNG (RID_SFX_START+119) #define STR_SHARED (RID_SFX_START+120) #define RID_XMLSEC_DOCUMENTSIGNED (RID_SFX_START+121) +// IAccessibility2 implementation 2009. ------ +#define STR_ACCTITLE_PRODUCTIVITYTOOLS (RID_SFX_START+157) +// ------ IAccessibility2 implementation 2009. //========================================================================= diff --git a/sfx2/source/appl/sfx.src b/sfx2/source/appl/sfx.src index c3b734e327de..3bca517c5fd5 100644 --- a/sfx2/source/appl/sfx.src +++ b/sfx2/source/appl/sfx.src @@ -40,3 +40,8 @@ String STR_STYLE_FILTER_ALL Text [ en-US ] = "All Styles" ; }; +String STR_ACCTITLE_PRODUCTIVITYTOOLS +{ + Text [ en-US ] = "%PRODUCTNAME"; +}; + diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 3d848d4d5648..80c8481707f3 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -828,6 +828,7 @@ SfxDocumentPage::SfxDocumentPage( Window* pParent, const SfxItemSet& rItemSet ) bHandleDelete ( FALSE ) { + aNameED.SetAccessibleName(String(SfxResId(EDIT_FILE_NAME))); FreeResource(); ImplUpdateSignatures(); @@ -1818,6 +1819,11 @@ CustomPropertiesWindow::CustomPropertiesWindow( Window* pParent, const ResId& rR m_aEditLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, EditTimeoutHdl ) ); m_aBoxLoseFocusTimer.SetTimeout( 300 ); m_aBoxLoseFocusTimer.SetTimeoutHdl( LINK( this, CustomPropertiesWindow, BoxTimeoutHdl ) ); + + ResMgr* pResMgr = rResId.GetResMgr(); + m_aNameBox.SetAccessibleName( String( ResId( STR_HEADER_NAME, *pResMgr ) ) ); + m_aTypeBox.SetAccessibleName( String( ResId( STR_HEADER_TYPE, *pResMgr ) ) ); + m_aValueEdit.SetAccessibleName( String( ResId( STR_HEADER_VALUE, *pResMgr ) ) ); } CustomPropertiesWindow::~CustomPropertiesWindow() @@ -2064,6 +2070,11 @@ void CustomPropertiesWindow::AddLine( const ::rtl::OUString& sName, Any& rAny ) //add lose focus handlers of date/time fields pNewLine->m_aTypeBox.SetLoseFocusHdl( LINK( this, CustomPropertiesWindow, BoxLoseFocusHdl ) ); + + pNewLine->m_aNameBox.SetAccessibleName(m_aNameBox.GetAccessibleName()); + pNewLine->m_aTypeBox.SetAccessibleName(m_aTypeBox.GetAccessibleName()); + pNewLine->m_aValueEdit.SetAccessibleName(m_aValueEdit.GetAccessibleName()); + long nPos = GetVisibleLineCount() * GetLineHeight(); m_aCustomPropertiesLines.push_back( pNewLine ); Window* pWindows[] = { &m_aNameBox, &m_aTypeBox, &m_aValueEdit, diff --git a/sfx2/source/dialog/dinfdlg.hrc b/sfx2/source/dialog/dinfdlg.hrc index 5453e3606026..43bd848844a0 100644 --- a/sfx2/source/dialog/dinfdlg.hrc +++ b/sfx2/source/dialog/dinfdlg.hrc @@ -153,6 +153,10 @@ #define STR_HEADER_VALUE 92 #define STR_HEADER_ACTION 93 +//IAccessibility2 Implementation 2009----- +#define EDIT_FILE_NAME 94 +//-----IAccessibility2 Implementation 2009 + #define PB_OK 100 #define PB_CANCEL 101 #define PB_HELP 102 diff --git a/sfx2/source/dialog/dinfdlg.src b/sfx2/source/dialog/dinfdlg.src index c78347e3dba3..eaa24105bb17 100644 --- a/sfx2/source/dialog/dinfdlg.src +++ b/sfx2/source/dialog/dinfdlg.src @@ -303,6 +303,10 @@ TabPage TP_DOCINFODOC { Text [ en-US ] = "unknown" ; }; + String EDIT_FILE_NAME + { + Text [ en-US ] = "File Name" ; + }; }; // TP_DOCINFOUSER -------------------------------------------------------- diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx index 8235333857d5..17bbee8c126f 100644 --- a/sfx2/source/dialog/newstyle.cxx +++ b/sfx2/source/dialog/newstyle.cxx @@ -91,6 +91,7 @@ SfxNewStyleDlg::SfxNewStyleDlg( Window* pParent, SfxStyleSheetBasePool& rInPool aOKBtn.SetClickHdl(LINK(this, SfxNewStyleDlg, OKHdl)); aColBox.SetModifyHdl(LINK(this, SfxNewStyleDlg, ModifyHdl)); aColBox.SetDoubleClickHdl(LINK(this, SfxNewStyleDlg, OKHdl)); + aColBox.SetAccessibleName(SfxResId(FL_COL)); SfxStyleSheetBase *pStyle = rPool.First(); while ( pStyle ) diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index 455479b9d125..3868d0719fba 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -125,6 +125,7 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText mbAsciiOnly ( false ) { + maPasswordED.SetAccessibleName(String(SfxResId(TEXT_PASSWD))); FreeResource(); // setup layout diff --git a/sfx2/source/dialog/passwd.hrc b/sfx2/source/dialog/passwd.hrc index 5c9b07c7a130..dd35a6449dd8 100644 --- a/sfx2/source/dialog/passwd.hrc +++ b/sfx2/source/dialog/passwd.hrc @@ -46,6 +46,9 @@ #define FT_PASSWD_CONFIRM2 27 #define ED_PASSWD_CONFIRM2 28 +//IAccessibility2 Implementation 2009----- +#define TEXT_PASSWD 31 +//-----IAccessibility2 Implementation 2009 #endif // ******************************************************************* EOF diff --git a/sfx2/source/dialog/passwd.src b/sfx2/source/dialog/passwd.src index 426fb9986d5a..beb2f96a5e21 100644 --- a/sfx2/source/dialog/passwd.src +++ b/sfx2/source/dialog/passwd.src @@ -129,37 +129,10 @@ ModalDialog DLG_PASSWD Pos = MAP_APPFONT( 144, 43 ); Size = MAP_APPFONT( 50, 14 ); }; -}; - -// ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + String TEXT_PASSWD + { + Text [ en-US ] = "Password" ; + }; +}; diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index d149bea792dc..62ba12946a66 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -697,6 +697,11 @@ void SfxTabDialog::Init_Impl( BOOL bFmtFlag, const String* pUserButtonText ) pExampleSet = new SfxItemSet( *pSet ); pOutSet = new SfxItemSet( *pSet->GetPool(), pSet->GetRanges() ); } + + aOKBtn.SetAccessibleRelationMemberOf( &aOKBtn ); + aCancelBtn.SetAccessibleRelationMemberOf( &aCancelBtn ); + aHelpBtn.SetAccessibleRelationMemberOf( &aHelpBtn ); + aResetBtn.SetAccessibleRelationMemberOf( &aResetBtn ); } // ----------------------------------------------------------------------- diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index b10e634be231..82d9f1a7714a 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -778,6 +778,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Sfx bHierarchical ( FALSE ), bBindingUpdate ( TRUE ) { + aFmtLb.SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST)); aFmtLb.SetHelpId( HID_TEMPLATE_FMT ); aFilterLb.SetHelpId( HID_TEMPLATE_FILTER ); aFmtLb.SetStyle( aFmtLb.GetStyle() | WB_SORT | WB_HIDESELECTION ); @@ -1792,6 +1793,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox ) FillTreeBox(); SelectStyle(aSelectEntry); + pTreeBox->SetAccessibleName(SfxResId(STR_STYLE_ELEMTLIST)); pTreeBox->Show(); } } diff --git a/sfx2/source/dialog/templdlg.hrc b/sfx2/source/dialog/templdlg.hrc index 58563fb9c160..e39108ce57a9 100644 --- a/sfx2/source/dialog/templdlg.hrc +++ b/sfx2/source/dialog/templdlg.hrc @@ -49,4 +49,7 @@ #define BT_VLIST 9 #define BT_TOOL 10 +//IAccessibility2 Implementation 2009----- +#define STR_STYLE_ELEMTLIST 18 +//-----IAccessibility2 Implementation 2009 diff --git a/sfx2/source/dialog/templdlg.src b/sfx2/source/dialog/templdlg.src index 60979450d9f6..ff2661181434 100644 --- a/sfx2/source/dialog/templdlg.src +++ b/sfx2/source/dialog/templdlg.src @@ -143,6 +143,10 @@ ModalDialog RID_STYLECATALOG }; }; // Strings --------------------------------------------------------------- +String STR_STYLE_ELEMTLIST +{ + Text [ en-US ] = "Style List" ; +}; String STR_STYLE_FILTER_HIERARCHICAL { Text [ en-US ] = "Hierarchical" ; -- cgit From 3bd2a893a49240a5ed312c857c9dc39593a7b9a3 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 13:04:02 +0100 Subject: accfixes: added more accessibility information and fixed tab orders in multiple dialogs (svx module) --- svx/inc/float3d.hrc | 4 +- svx/inc/svx/bmpmask.hxx | 7 +- svx/inc/svx/dialogs.hrc | 16 +++++ svx/inc/svx/float3d.hxx | 26 ++++---- svx/inc/svx/fontworkgallery.hxx | 2 +- svx/inc/svx/hdft.hxx | 2 +- svx/inc/svx/svdstr.hrc | 8 ++- svx/prj/makefile.mk | 2 - svx/source/dialog/_bmpmask.cxx | 43 ++++++++++++- svx/source/dialog/bmpmask.hrc | 6 +- svx/source/dialog/bmpmask.src | 55 ++++------------ svx/source/dialog/ctredlin.cxx | 18 ++++++ svx/source/dialog/ctredlin.hrc | 9 ++- svx/source/dialog/ctredlin.src | 36 ++++++++++- svx/source/dialog/dlgctl3d.cxx | 2 + svx/source/dialog/dlgctrl.src | 7 +- svx/source/dialog/hdft.cxx | 16 ++++- svx/source/dialog/optgrid.cxx | 11 ++++ svx/source/dialog/rubydialog.cxx | 8 +++ svx/source/dialog/srchdlg.cxx | 8 +++ svx/source/engine3d/float3d.cxx | 110 ++++++++++++++++++++++++++++---- svx/source/engine3d/float3d.src | 55 ++-------------- svx/source/gallery2/galbrws1.cxx | 2 + svx/source/gallery2/galbrws2.cxx | 24 ++++++- svx/source/gallery2/gallery.src | 105 +++++++----------------------- svx/source/svdraw/svdstr.src | 82 +++--------------------- svx/source/tbxctrls/colrctrl.cxx | 2 + svx/source/tbxctrls/colrctrl.src | 33 ++-------- svx/source/tbxctrls/fontworkgallery.cxx | 2 +- svx/source/tbxctrls/tbcontrl.cxx | 8 +++ svx/source/tbxctrls/tbcontrl.src | 6 ++ 31 files changed, 394 insertions(+), 321 deletions(-) delete mode 100644 svx/prj/makefile.mk diff --git a/svx/inc/float3d.hrc b/svx/inc/float3d.hrc index 259317275e8b..06b640ebff0e 100644 --- a/svx/inc/float3d.hrc +++ b/svx/inc/float3d.hrc @@ -181,4 +181,6 @@ #define BMP_TEX_CIRCLE_H 159 #define BMP_TEX_FILTER_H 160 #define BMP_COLORDLG_H 161 - +// IAccessibility2 implementation 2009. ------ +#define STR_COLOR_LIGHT_PRE 162 +// ------ IAccessibility2 implementation 2009. diff --git a/svx/inc/svx/bmpmask.hxx b/svx/inc/svx/bmpmask.hxx index 1387b17267c2..d209c4223517 100644 --- a/svx/inc/svx/bmpmask.hxx +++ b/svx/inc/svx/bmpmask.hxx @@ -96,6 +96,9 @@ class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow PushButton aBtnExec; FixedLine aGrpQ; + FixedText aFt1; + FixedText aFt2; + FixedText aFt3; CheckBox aCbx1; MaskSet* pQSet1; MetricField aSp1; @@ -119,9 +122,7 @@ class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow MaskData* pData; CheckBox aCbxTrans; ColorLB aLbColorTrans; - FixedText aFt1; - FixedText aFt2; - FixedText aFt3; + const XColorTable* pColTab; Color aPipetteColor; SvxBmpMaskSelectItem aSelItem; diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc index b28b150bd487..8966c7494248 100755 --- a/svx/inc/svx/dialogs.hrc +++ b/svx/inc/svx/dialogs.hrc @@ -52,6 +52,14 @@ #define RID_SVXSTR_LINESTYLE (RID_SVX_START + 173) #define RID_SVXSTR_FIELDUNIT_TABLE (RID_SVX_START + 311) #define RID_SVXSTR_COLOR_USER (RID_SVX_START + 250) +//IAccessibility2 Implementation 2009----- +#define RID_SVXSTR_GALLERYPROPS_GALTHEME (RID_SVX_GALLERY_START + 92) +#define RID_SVXSTR_GALLERY_THEMEITEMS (RID_SVX_GALLERY_START + 93) +#define RID_SVXSTR_GALLERY_THEMENAME (RID_SVX_GALLERY_START + 94) +#define RID_SVXSTR_GALLERY_FILESFOUND (RID_SVX_GALLERY_START + 95) +#define RID_SVXSTR_GALLERY_PREVIEW (RID_SVX_GALLERY_START + 96) +//-----IAccessibility2 Implementation 2009 + // factory IDs of tabpages implemented in CUI #define RID_SVXPAGE_CHAR_TWOLINES (RID_SVX_START + 242) @@ -956,6 +964,9 @@ #define RID_SVXSTR_NEXTFREE (RID_SVX_START + 1191) +//IAccessibility2 Implementation 2009----- +#define RID_SVXSTR_TEXTCOLOR (RID_SVX_START + 1178) +//-----IAccessibility2 Implementation 2009 // ---------------------------------------------------------------------------- // if we have _a_lot_ time, we should group the resource ids by type, instead // of grouping them by semantics. The reason is that resource ids have to be @@ -1049,5 +1060,10 @@ #define OFA_TP_TABPROPERTIES_TEXT (RID_OFA_START + 245) #define OFA_TP_HELPERPROG (RID_OFA_START + 249) +// IAccessibility2 implementation 2009. ------ +#define STR_COLORTABLE (RID_OFA_START + 257) +#define STR_SWITCH (RID_OFA_START + 258) +// ------ IAccessibility2 implementation 2009. + #endif diff --git a/svx/inc/svx/float3d.hxx b/svx/inc/svx/float3d.hxx index 4b6fd22b2587..fe9bb69d6d5a 100644 --- a/svx/inc/svx/float3d.hxx +++ b/svx/inc/svx/float3d.hxx @@ -84,6 +84,7 @@ private: ImageButton aBtnUpdate; ImageButton aBtnAssign; + FixedLine aFLGeometrie; // Geometrie FixedText aFtPercentDiagonal; MetricField aMtrPercentDiagonal; @@ -93,36 +94,35 @@ private: MetricField aMtrEndAngle; FixedText aFtDepth; MetricField aMtrDepth; - FixedLine aFLGeometrie; + FixedLine aFLSegments; FixedText aFtHorizontal; NumericField aNumHorizontal; FixedText aFtVertical; NumericField aNumVertical; - FixedLine aFLSegments; + FixedLine aFLNormals; ImageButton aBtnNormalsObj; ImageButton aBtnNormalsFlat; ImageButton aBtnNormalsSphere; ImageButton aBtnNormalsInvert; ImageButton aBtnTwoSidedLighting; - FixedLine aFLNormals; ImageButton aBtnDoubleSided; - + FixedLine aFLRepresentation; // Darstellung FixedText aFtShademode; ListBox aLbShademode; + FixedLine aFLShadow; ImageButton aBtnShadow3d; FixedText aFtSlant; MetricField aMtrSlant; - FixedLine aFLShadow; FixedText aFtDistance; MetricField aMtrDistance; FixedText aFtFocalLeng; MetricField aMtrFocalLength; FixedLine aFLCamera; - FixedLine aFLRepresentation; + FixedLine aFLLight; // Beleuchtung ImageButton aBtnLight1; @@ -133,6 +133,7 @@ private: ImageButton aBtnLight6; ImageButton aBtnLight7; ImageButton aBtnLight8; + FixedText aFTLightsource; ColorLB aLbLight1; ColorLB aLbLight2; ColorLB aLbLight3; @@ -143,7 +144,6 @@ private: ColorLB aLbLight8; ImageButton aBtnLightColor; - FixedText aFTLightsource; // #99694# Keyboard shortcuts activate the next control, so the // order needed to be changed here @@ -151,7 +151,7 @@ private: ColorLB aLbAmbientlight; // ListBox ImageButton aBtnAmbientColor; // color button - FixedLine aFLLight; + FixedLine aFLTexture; // Texturen FixedText aFtTexKind; @@ -171,9 +171,9 @@ private: ImageButton aBtnTexCircleY; FixedText aFtTexFilter; ImageButton aBtnTexFilter; - FixedLine aFLTexture; // Material + FixedLine aFLMaterial; // Materialeditor FixedText aFtMatFavorites; ListBox aLbMatFavorites; @@ -183,20 +183,20 @@ private: FixedText aFtMatEmission; ColorLB aLbMatEmission; ImageButton aBtnEmissionColor; + FixedLine aFLMatSpecular; FixedText aFtMatSpecular; ColorLB aLbMatSpecular; ImageButton aBtnSpecularColor; FixedText aFtMatSpecularIntensity; MetricField aMtrMatSpecularIntensity; - FixedLine aFLMatSpecular; - FixedLine aFLMaterial; + + Svx3DPreviewControl aCtlPreview; + SvxLightCtl3D aCtlLightPreview; // Unterer Teil ImageButton aBtnConvertTo3D; ImageButton aBtnLatheObject; ImageButton aBtnPerspective; - Svx3DPreviewControl aCtlPreview; - SvxLightCtl3D aCtlLightPreview; // der Rest ... Image aImgLightOn; diff --git a/svx/inc/svx/fontworkgallery.hxx b/svx/inc/svx/fontworkgallery.hxx index 40ac3cef966a..aa031b0f5770 100644 --- a/svx/inc/svx/fontworkgallery.hxx +++ b/svx/inc/svx/fontworkgallery.hxx @@ -91,8 +91,8 @@ public: class SVX_DLLPUBLIC FontWorkGalleryDialog : public ModalDialog { - ValueSet maCtlFavorites; FixedLine maFLFavorites; + ValueSet maCtlFavorites; OKButton maOKButton; CancelButton maCancelButton; HelpButton maHelpButton; diff --git a/svx/inc/svx/hdft.hxx b/svx/inc/svx/hdft.hxx index b3c425b85b93..6310c8b66f7c 100644 --- a/svx/inc/svx/hdft.hxx +++ b/svx/inc/svx/hdft.hxx @@ -70,6 +70,7 @@ protected: SvxHFPage( Window* pParent, USHORT nResId, const SfxItemSet& rSet, USHORT nSetId ); + FixedLine aFrm; CheckBox aTurnOnBox; CheckBox aCntSharedBox; FixedText aLMLbl; @@ -82,7 +83,6 @@ protected: FixedText aHeightFT; MetricField aHeightEdit; CheckBox aHeightDynBtn; - FixedLine aFrm; SvxPageWindow aBspWin; PushButton aBackgroundBtn; diff --git a/svx/inc/svx/svdstr.hrc b/svx/inc/svx/svdstr.hrc index d778bf40326b..2049bc4c3fdc 100644 --- a/svx/inc/svx/svdstr.hrc +++ b/svx/inc/svx/svdstr.hrc @@ -185,8 +185,12 @@ #define STR_ObjNameSingulMEDIA (STR_ObjNameBegin + 143) #define STR_ObjNamePluralMEDIA (STR_ObjNameBegin + 144) -#define STR_ObjNameEnd (STR_ObjNamePluralMEDIA) - +//#define STR_ObjNameEnd (STR_ObjNamePluralMEDIA) +//IAccessibility2 Implementation 2009----- +#define STR_ObjNameSingulFONTWORK (STR_ObjNameBegin+145) +#define STR_ObjNamePluralFONTWORK (STR_ObjNameBegin+146) +#define STR_ObjNameEnd (STR_ObjNamePluralFONTWORK) +//-----IAccessibility2 Implementation 2009 #define STR_EditBegin (STR_ObjNameEnd+1) #define STR_EditWithCopy (STR_EditBegin + 0) #define STR_EditPosSize (STR_EditBegin + 1) diff --git a/svx/prj/makefile.mk b/svx/prj/makefile.mk deleted file mode 100644 index 2a0b99e72fd5..000000000000 --- a/svx/prj/makefile.mk +++ /dev/null @@ -1,2 +0,0 @@ -all: - cd .. && make -srj9 diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index d010109d34b3..e1e4d26dbb42 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -417,6 +417,10 @@ SvxBmpMask::SvxBmpMask( SfxBindings *pBindinx, aBtnExec ( this, BMP_RESID( BTN_EXEC ) ), aGrpQ ( this, BMP_RESID( GRP_Q ) ), + aFt1 ( this, BMP_RESID ( FT_1 ) ), + aFt2 ( this, BMP_RESID ( FT_2 ) ), + aFt3 ( this, BMP_RESID ( FT_3 ) ), + aCbx1 ( this, BMP_RESID( CBX_1 ) ), pQSet1 ( new MaskSet( this, BMP_RESID( QCOL_1 ) ) ), aSp1 ( this, BMP_RESID( SP_1 ) ), @@ -440,9 +444,6 @@ SvxBmpMask::SvxBmpMask( SfxBindings *pBindinx, pData ( new MaskData( this, *pBindinx ) ), aCbxTrans ( this, BMP_RESID( CBX_TRANS ) ), aLbColorTrans ( this, BMP_RESID ( LB_TRANS ) ), - aFt1 ( this, BMP_RESID ( FT_1 ) ), - aFt2 ( this, BMP_RESID ( FT_2 ) ), - aFt3 ( this, BMP_RESID ( FT_3 ) ), pColTab ( NULL ), aPipetteColor ( COL_WHITE ), aSelItem ( SID_BMPMASK_EXEC, *this, *pBindinx ), @@ -508,6 +509,42 @@ SvxBmpMask::SvxBmpMask( SfxBindings *pBindinx, pQSet2->Show(); pQSet3->Show(); pQSet4->Show(); + + aCbx1.SetAccessibleRelationMemberOf( &aGrpQ ); + pQSet1->SetAccessibleRelationMemberOf( &aGrpQ ); + aSp1.SetAccessibleRelationMemberOf( &aGrpQ ); + aLbColor1.SetAccessibleRelationMemberOf( &aGrpQ ); + aCbx1.SetAccessibleRelationLabeledBy( &aFt1 ); + pQSet1->SetAccessibleRelationLabeledBy( &aFt1 ); + aSp1.SetAccessibleRelationLabeledBy( &aFt2 ); + aLbColor1.SetAccessibleRelationLabeledBy( &aFt3 ); + aCbx2.SetAccessibleRelationMemberOf( &aGrpQ ); + pQSet2->SetAccessibleRelationMemberOf( &aGrpQ ); + aSp2.SetAccessibleRelationMemberOf( &aGrpQ ); + aLbColor2.SetAccessibleRelationMemberOf( &aGrpQ ); + aCbx2.SetAccessibleRelationLabeledBy( &aFt1 ); + pQSet2->SetAccessibleRelationLabeledBy( &aFt1 ); + aSp2.SetAccessibleRelationLabeledBy( &aFt2 ); + aLbColor2.SetAccessibleRelationLabeledBy( &aFt3 ); + aCbx3.SetAccessibleRelationMemberOf( &aGrpQ ); + pQSet3->SetAccessibleRelationMemberOf( &aGrpQ ); + aSp3.SetAccessibleRelationMemberOf( &aGrpQ ); + aLbColor3.SetAccessibleRelationMemberOf( &aGrpQ ); + aCbx3.SetAccessibleRelationLabeledBy( &aFt1 ); + pQSet3->SetAccessibleRelationLabeledBy( &aFt1 ); + aSp3.SetAccessibleRelationLabeledBy( &aFt2 ); + aLbColor3.SetAccessibleRelationLabeledBy( &aFt3 ); + aCbx4.SetAccessibleRelationMemberOf( &aGrpQ ); + pQSet4->SetAccessibleRelationMemberOf( &aGrpQ ); + aSp4.SetAccessibleRelationMemberOf( &aGrpQ ); + aLbColor4.SetAccessibleRelationMemberOf( &aGrpQ ); + aCbx4.SetAccessibleRelationLabeledBy( &aFt1 ); + pQSet4->SetAccessibleRelationLabeledBy( &aFt1 ); + aSp4.SetAccessibleRelationLabeledBy( &aFt2 ); + aLbColor4.SetAccessibleRelationLabeledBy( &aFt3 ); + aLbColorTrans.SetAccessibleRelationLabeledBy( &aCbxTrans ); + aLbColorTrans.SetAccessibleRelationMemberOf( &aGrpQ ); + aCbxTrans.SetAccessibleRelationMemberOf( &aGrpQ ); } //------------------------------------------------------------------------- diff --git a/svx/source/dialog/bmpmask.hrc b/svx/source/dialog/bmpmask.hrc index 99c9eab04b7b..42fcc244c3f7 100644 --- a/svx/source/dialog/bmpmask.hrc +++ b/svx/source/dialog/bmpmask.hrc @@ -27,7 +27,11 @@ #define RID_SVXDLG_BMPMASK (RID_SVX_BMPMASK_START) #define RID_SVXDLG_BMPMASK_STR_TRANSP (RID_SVX_BMPMASK_START + 1) #define RID_SVXDLG_BMPMASK_STR_SOURCECOLOR (RID_SVX_BMPMASK_START + 2) - +/*IAccessibility2 Implementation 2009-----*/ +#define RID_SVXDLG_BMPMASK_STR_PALETTE (RID_SVX_BMPMASK_START + 3) +#define RID_SVXDLG_BMPMASK_STR_TOLERANCE (RID_SVX_BMPMASK_START + 4) +#define RID_SVXDLG_BMPMASK_STR_REPLACEWITH (RID_SVX_BMPMASK_START + 5) +/*-----IAccessibility2 Implementation 2009*/ #define GRP_Q 1 #define CTR_PIPETTE 1 #define CBX_1 1 diff --git a/svx/source/dialog/bmpmask.src b/svx/source/dialog/bmpmask.src index a9cd2fe60b2f..8913edcfc210 100644 --- a/svx/source/dialog/bmpmask.src +++ b/svx/source/dialog/bmpmask.src @@ -327,47 +327,16 @@ String RID_SVXDLG_BMPMASK_STR_SOURCECOLOR Text [ en-US ] = "Source Color"; }; - // ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +String RID_SVXDLG_BMPMASK_STR_PALETTE +{ + Text [ en-US ] = "Color Palette"; +}; +String RID_SVXDLG_BMPMASK_STR_TOLERANCE +{ + Text [ en-US ] = "Tolerance"; +}; +String RID_SVXDLG_BMPMASK_STR_REPLACEWITH +{ + Text [ en-US ] = "Replace with"; +}; diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index 503814823467..3e57d778c395 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -634,6 +634,7 @@ SvxTPView::SvxTPView( Window * pParent) aTitle5 ( SVX_RES( STR_TITLE5 ) ), aStrMyName ( SVX_RES( STR_VIEW) ) { + aViewData.SetAccessibleName(String(SVX_RES(STR_TREE))); FreeResource(); aViewData.SetHelpId(HID_REDLINING_VIEW_DG_VIEW_TABLE); @@ -826,6 +827,14 @@ SvxTPFilter::SvxTPFilter( Window * pParent) aStrMyName ( SVX_RES( STR_FILTER) ), bModified (FALSE) { + aLbDate.SetAccessibleName( String( SVX_RES( STR_DATE_COMBOX) ) ); + aDfDate.SetAccessibleName( String( SVX_RES( STR_DATE_SPIN) ) ); + aTfDate.SetAccessibleName( String( SVX_RES( STR_DATE_TIME_SPIN) ) ); + aDfDate2.SetAccessibleName( String( SVX_RES( STR_DATE_SPIN1) ) ); + aTfDate2.SetAccessibleName( String( SVX_RES( STR_DATE_TIME_SPIN1) ) ); + aLbAuthor.SetAccessibleName(aCbAuthor.GetText()); + aLbAction.SetAccessibleName( String( SVX_RES( STR_ACTION) ) ); + aEdComment.SetAccessibleName(aCbComment.GetText()); Image aImgTimeHC( SVX_RES( IMG_TIME_H ) ); FreeResource(); @@ -874,6 +883,15 @@ SvxTPFilter::SvxTPFilter( Window * pParent) HideRange(); ShowAction(); bModified=FALSE; + + aLbDate.SetAccessibleRelationLabeledBy(&aCbDate); + aLbAuthor.SetAccessibleRelationLabeledBy(&aCbAuthor); + aLbAction.SetAccessibleRelationLabeledBy(&aCbRange); + aEdRange.SetAccessibleRelationLabeledBy(&aCbRange); + aBtnRange.SetAccessibleRelationLabeledBy(&aCbRange); + aEdComment.SetAccessibleRelationLabeledBy(&aCbComment); + aDfDate2.SetAccessibleRelationLabeledBy(&aDfDate2); + aTfDate2.SetAccessibleRelationLabeledBy(&aTfDate2); } void SvxTPFilter::SetRedlinTable(SvxRedlinTable* pTable) diff --git a/svx/source/dialog/ctredlin.hrc b/svx/source/dialog/ctredlin.hrc index 23cc504c0573..772d985ae8c0 100644 --- a/svx/source/dialog/ctredlin.hrc +++ b/svx/source/dialog/ctredlin.hrc @@ -66,5 +66,12 @@ #define STR_TITLE3 3 #define STR_TITLE4 4 #define STR_TITLE5 5 -// +//IAccessibility2 Implementation 2009----- +#define STR_DATE_COMBOX 6 +#define STR_DATE_SPIN 7 +#define STR_DATE_SPIN1 8 +#define STR_DATE_TIME_SPIN 9 +#define STR_DATE_TIME_SPIN1 10 +#define STR_TREE 11 +//-----IAccessibility2 Implementation 2009 diff --git a/svx/source/dialog/ctredlin.src b/svx/source/dialog/ctredlin.src index e617607ebfad..284ed97ed54e 100644 --- a/svx/source/dialog/ctredlin.src +++ b/svx/source/dialog/ctredlin.src @@ -114,7 +114,10 @@ TabPage SID_REDLIN_FILTER_PAGE ImageBitmap = Bitmap { File = "time.bmp" ; }; MASKCOLOR }; - QuickHelpText [ en-US ] = "Set Date/Time" ; + // IAccessibility2 implementation 2009. ------ + //QuickHelpText [ en-US ] = "Set Date/Time" ; + QuickHelpText [ en-US ] = "Set Start Date/Time" ; + // ------ IAccessibility2 implementation 2009. }; FixedText FT_DATE2 { @@ -170,7 +173,10 @@ TabPage SID_REDLIN_FILTER_PAGE ImageBitmap = Bitmap { File = "time.bmp" ; }; MASKCOLOR }; - QuickHelpText [ en-US ] = "Set Date/Time" ; + // IAccessibility2 implementation 2009. ------ + //QuickHelpText [ en-US ] = "Set Date/Time" ; + QuickHelpText [ en-US ] = "Set End Date/Time" ; + // ------ IAccessibility2 implementation 2009. }; CheckBox CB_AUTOR { @@ -254,6 +260,32 @@ TabPage SID_REDLIN_FILTER_PAGE ImageBitmap = Bitmap { File = "time_h.bmp" ; }; MASKCOLOR }; + /*IAccessibility2 Implementation 2009-----*/ + String STR_DATE_COMBOX + { + Text [ en-US ] = "Date Condition" ; + }; + String STR_DATE_SPIN + { + Text [ en-US ] = "Start Date" ; + }; + String STR_DATE_SPIN1 + { + Text [ en-US ] = "End Date" ; + }; + String STR_DATE_TIME_SPIN + { + Text [ en-US ] = "Start Time" ; + }; + String STR_DATE_TIME_SPIN1 + { + Text [ en-US ] = "End Time" ; + }; + String STR_TREE + { + Text [ en-US ] = "Changes" ; + }; + /*-----IAccessibility2 Implementation 2009*/ }; TabPage SID_REDLIN_VIEW_PAGE { diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index 95c27a5dcec8..9efb12e74d14 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -45,6 +45,7 @@ #include #include "helpid.hrc" #include +#include ////////////////////////////////////////////////////////////////////////////// @@ -1012,6 +1013,7 @@ void SvxLightCtl3D::Init() maHorScroller.SetHelpId(HID_CTRL3D_HSCROLL); maVerScroller.SetHelpId(HID_CTRL3D_VSCROLL); maSwitcher.SetHelpId(HID_CTRL3D_SWITCHER); + maSwitcher.SetAccessibleName(String(SVX_RES(STR_SWITCH))); // Light preview maLightControl.Show(); diff --git a/svx/source/dialog/dlgctrl.src b/svx/source/dialog/dlgctrl.src index 2da544673c65..e5962dcef059 100644 --- a/svx/source/dialog/dlgctrl.src +++ b/svx/source/dialog/dlgctrl.src @@ -31,4 +31,9 @@ Bitmap RID_SVXCTRL_RECTBTNS { File = "rectbtns.bmp" ; }; - +/*IAccessibility2 Implementation 2009-----*/ +String STR_SWITCH +{ + Text [ en-US ] = "Switch" ; +}; +/*-----IAccessibility2 Implementation 2009*/ diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 2da5df325dfa..d0248b60ab14 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -146,6 +146,7 @@ SvxHFPage::SvxHFPage( Window* pParent, USHORT nResId, const SfxItemSet& rAttr, U SfxTabPage( pParent, SVX_RES( nResId ), rAttr ), + aFrm ( this, SVX_RES( FL_FRAME ) ), aTurnOnBox ( this, SVX_RES( CB_TURNON ) ), aCntSharedBox ( this, SVX_RES( CB_SHARED ) ), aLMLbl ( this, SVX_RES( FT_LMARGIN ) ), @@ -158,7 +159,6 @@ SvxHFPage::SvxHFPage( Window* pParent, USHORT nResId, const SfxItemSet& rAttr, U aHeightFT ( this, SVX_RES( FT_HEIGHT ) ), aHeightEdit ( this, SVX_RES( ED_HEIGHT ) ), aHeightDynBtn ( this, SVX_RES( CB_HEIGHT_DYN ) ), - aFrm ( this, SVX_RES( FL_FRAME ) ), aBspWin ( this, SVX_RES( WN_BSP ) ), aBackgroundBtn ( this, SVX_RES( BTN_EXTRAS ) ), @@ -182,6 +182,20 @@ SvxHFPage::SvxHFPage( Window* pParent, USHORT nResId, const SfxItemSet& rAttr, U SetFieldUnit( aHeightEdit, eFUnit ); SetFieldUnit( aLMEdit, eFUnit ); SetFieldUnit( aRMEdit, eFUnit ); + + aTurnOnBox.SetAccessibleRelationMemberOf( &aFrm ); + aCntSharedBox.SetAccessibleRelationMemberOf( &aFrm ); + aLMLbl.SetAccessibleRelationMemberOf( &aFrm ); + aLMEdit.SetAccessibleRelationMemberOf( &aFrm ); + aRMLbl.SetAccessibleRelationMemberOf( &aFrm ); + aRMEdit.SetAccessibleRelationMemberOf( &aFrm ); + aDistFT.SetAccessibleRelationMemberOf( &aFrm ); + aDistEdit.SetAccessibleRelationMemberOf( &aFrm ); + aDynSpacingCB.SetAccessibleRelationMemberOf( &aFrm ); + aHeightFT.SetAccessibleRelationMemberOf( &aFrm ); + aHeightEdit.SetAccessibleRelationMemberOf( &aFrm ); + aHeightDynBtn.SetAccessibleRelationMemberOf( &aFrm ); + aBackgroundBtn.SetAccessibleRelationMemberOf(&aFrm); } // ----------------------------------------------------------------------- diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index f281580b93db..5981e70f36a9 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -248,6 +248,17 @@ SvxGridTabPage::SvxGridTabPage( Window* pParent, const SfxItemSet& rCoreSet) : LINK( this, SvxGridTabPage, ChangeDivisionHdl_Impl ) ); aNumFldDivisionY.SetModifyHdl( LINK( this, SvxGridTabPage, ChangeDivisionHdl_Impl ) ); + + ::rtl::OUString sFlResolution( aFlResolution.GetDisplayText() ); + ::rtl::OUString sFtDrawX(aFtDrawX.GetDisplayText()); + ::rtl::OUString sFtDrawY(aFtDrawY.GetDisplayText()); + aMtrFldDrawX.SetAccessibleName( sFtDrawX + sFlResolution ); + aMtrFldDrawY.SetAccessibleName( sFtDrawY + sFlResolution ); + ::rtl::OUString sFlDivision( aFlDivision.GetDisplayText() ); + ::rtl::OUString sFtDivisionX(aFtDivisionX.GetDisplayText()); + ::rtl::OUString sFtDivisionY(aFtDivisionY.GetDisplayText()); + aNumFldDivisionX.SetAccessibleName( sFtDivisionX + sFlDivision ); + aNumFldDivisionY.SetAccessibleName( sFtDivisionY + sFlDivision ); } //------------------------------------------------------------------------ diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index d281802ac40e..bcaa6df4ec88 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -277,6 +277,14 @@ SvxRubyDialog::SvxRubyDialog( SfxBindings *pBind, SfxChildWindow *pCW, } UpdateColors(); + + String leftLabelName = aLeftFT.GetText(), rightLabelName = aRightFT.GetText(); + aLeft2ED.SetAccessibleName(leftLabelName); + aLeft3ED.SetAccessibleName(leftLabelName); + aLeft4ED.SetAccessibleName(leftLabelName); + aRight2ED.SetAccessibleName(rightLabelName); + aRight3ED.SetAccessibleName(rightLabelName); + aRight4ED.SetAccessibleName(rightLabelName); } /* -----------------------------09.01.01 17:17-------------------------------- diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 9f6d606dc759..23fd4cc69aaa 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -494,6 +494,14 @@ void SvxSearchDialog::Construct_Impl() { aJapMatchFullHalfWidthCB.Hide(); } + + aSimilarityBtn.SetAccessibleRelationLabeledBy(&aSimilarityBox); + aSimilarityBtn.SetAccessibleRelationMemberOf(&aOptionsFL); + aJapOptionsBtn.SetAccessibleRelationLabeledBy(&aJapOptionsCB); + aJapOptionsBtn.SetAccessibleRelationMemberOf(&aOptionsFL); + aRowsBtn.SetAccessibleRelationMemberOf(&aCalcSearchDirFT); + aColumnsBtn.SetAccessibleRelationMemberOf(&aCalcSearchDirFT); + //component extension - show component search buttons if the commands // vnd.sun.star::SearchViaComponent1 and 2 are supported const uno::Reference< frame::XFrame >xFrame = rBindings.GetActiveFrame(); diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index e1e90d88c22f..bb159b47a516 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -119,6 +119,7 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, aBtnMaterial ( this, SVX_RES( BTN_MATERIAL ) ), aBtnUpdate ( this, SVX_RES( BTN_UPDATE ) ), aBtnAssign ( this, SVX_RES( BTN_ASSIGN ) ), + aFLGeometrie ( this, SVX_RES( FL_GEOMETRIE ) ), // Geometrie aFtPercentDiagonal ( this, SVX_RES( FT_PERCENT_DIAGONAL ) ), @@ -129,36 +130,36 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, aMtrEndAngle ( this, SVX_RES( MTR_END_ANGLE ) ), aFtDepth ( this, SVX_RES( FT_DEPTH ) ), aMtrDepth ( this, SVX_RES( MTR_DEPTH ) ), - aFLGeometrie ( this, SVX_RES( FL_GEOMETRIE ) ), + aFLSegments ( this, SVX_RES( FL_SEGMENTS ) ), aFtHorizontal ( this, SVX_RES( FT_HORIZONTAL ) ), aNumHorizontal ( this, SVX_RES( NUM_HORIZONTAL ) ), aFtVertical ( this, SVX_RES( FT_VERTICAL ) ), aNumVertical ( this, SVX_RES( NUM_VERTICAL ) ), - aFLSegments ( this, SVX_RES( FL_SEGMENTS ) ), + aFLNormals ( this, SVX_RES( FL_NORMALS ) ), aBtnNormalsObj ( this, SVX_RES( BTN_NORMALS_OBJ ) ), aBtnNormalsFlat ( this, SVX_RES( BTN_NORMALS_FLAT ) ), aBtnNormalsSphere ( this, SVX_RES( BTN_NORMALS_SPHERE ) ), aBtnNormalsInvert ( this, SVX_RES( BTN_NORMALS_INVERT ) ), aBtnTwoSidedLighting( this, SVX_RES( BTN_TWO_SIDED_LIGHTING ) ), - aFLNormals ( this, SVX_RES( FL_NORMALS ) ), aBtnDoubleSided ( this, SVX_RES( BTN_DOUBLE_SIDED ) ), // Darstellung + aFLRepresentation ( this, SVX_RES( FL_REPRESENTATION ) ), aFtShademode ( this, SVX_RES( FT_SHADEMODE ) ), aLbShademode ( this, SVX_RES( LB_SHADEMODE ) ), + aFLShadow ( this, SVX_RES( FL_SHADOW ) ), aBtnShadow3d ( this, SVX_RES( BTN_SHADOW_3D ) ), aFtSlant ( this, SVX_RES( FT_SLANT ) ), aMtrSlant ( this, SVX_RES( MTR_SLANT ) ), - aFLShadow ( this, SVX_RES( FL_SHADOW ) ), aFtDistance ( this, SVX_RES( FT_DISTANCE ) ), aMtrDistance ( this, SVX_RES( MTR_DISTANCE ) ), aFtFocalLeng ( this, SVX_RES( FT_FOCAL_LENGTH ) ), aMtrFocalLength ( this, SVX_RES( MTR_FOCAL_LENGTH ) ), aFLCamera ( this, SVX_RES( FL_CAMERA ) ), - aFLRepresentation ( this, SVX_RES( FL_REPRESENTATION ) ), + aFLLight ( this, SVX_RES( FL_LIGHT ) ), // Beleuchtung aBtnLight1 ( this, SVX_RES( BTN_LIGHT_1 ) ), @@ -169,6 +170,7 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, aBtnLight6 ( this, SVX_RES( BTN_LIGHT_6 ) ), aBtnLight7 ( this, SVX_RES( BTN_LIGHT_7 ) ), aBtnLight8 ( this, SVX_RES( BTN_LIGHT_8 ) ), + aFTLightsource ( this, SVX_RES( FT_LIGHTSOURCE ) ), aLbLight1 ( this, SVX_RES( LB_LIGHT_1 ) ), aLbLight2 ( this, SVX_RES( LB_LIGHT_2 ) ), aLbLight3 ( this, SVX_RES( LB_LIGHT_3 ) ), @@ -179,15 +181,13 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, aLbLight8 ( this, SVX_RES( LB_LIGHT_8 ) ), aBtnLightColor ( this, SVX_RES( BTN_LIGHT_COLOR ) ), - aFTLightsource ( this, SVX_RES( FT_LIGHTSOURCE ) ), // #99694# Keyboard shortcuts activate the next control, so the // order needed to be changed here aFTAmbientlight ( this, SVX_RES( FT_AMBIENTLIGHT ) ), // Text label aLbAmbientlight ( this, SVX_RES( LB_AMBIENTLIGHT ) ), // ListBox aBtnAmbientColor ( this, SVX_RES( BTN_AMBIENT_COLOR ) ), // color button - - aFLLight ( this, SVX_RES( FL_LIGHT ) ), + aFLTexture ( this, SVX_RES( FL_TEXTURE ) ), // Texturen aFtTexKind ( this, SVX_RES( FT_TEX_KIND ) ), @@ -207,7 +207,7 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, aBtnTexCircleY ( this, SVX_RES( BTN_TEX_CIRCLE_Y ) ), aFtTexFilter ( this, SVX_RES( FT_TEX_FILTER ) ), aBtnTexFilter ( this, SVX_RES( BTN_TEX_FILTER ) ), - aFLTexture ( this, SVX_RES( FL_TEXTURE ) ), + aFLMaterial ( this, SVX_RES( FL_MATERIAL ) ), // Material aFtMatFavorites ( this, SVX_RES( FT_MAT_FAVORITES ) ), @@ -218,20 +218,19 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, aFtMatEmission ( this, SVX_RES( FT_MAT_EMISSION ) ), aLbMatEmission ( this, SVX_RES( LB_MAT_EMISSION ) ), aBtnEmissionColor ( this, SVX_RES( BTN_EMISSION_COLOR ) ), + aFLMatSpecular ( this, SVX_RES( FL_MAT_SPECULAR ) ), aFtMatSpecular ( this, SVX_RES( FT_MAT_SPECULAR ) ), aLbMatSpecular ( this, SVX_RES( LB_MAT_SPECULAR ) ), aBtnSpecularColor ( this, SVX_RES( BTN_SPECULAR_COLOR ) ), aFtMatSpecularIntensity( this, SVX_RES( FT_MAT_SPECULAR_INTENSITY ) ), aMtrMatSpecularIntensity( this, SVX_RES( MTR_MAT_SPECULAR_INTENSITY ) ), - aFLMatSpecular ( this, SVX_RES( FL_MAT_SPECULAR ) ), - aFLMaterial ( this, SVX_RES( FL_MATERIAL ) ), + aCtlPreview ( this, SVX_RES( CTL_PREVIEW ) ), + aCtlLightPreview ( this, SVX_RES( CTL_LIGHT_PREVIEW ) ), // Unterer Bereich aBtnConvertTo3D ( this, SVX_RES( BTN_CHANGE_TO_3D ) ), aBtnLatheObject ( this, SVX_RES( BTN_LATHE_OBJ ) ), aBtnPerspective ( this, SVX_RES( BTN_PERSPECTIVE ) ), - aCtlPreview ( this, SVX_RES( CTL_PREVIEW ) ), - aCtlLightPreview ( this, SVX_RES( CTL_LIGHT_PREVIEW ) ), aImgLightOn ( SVX_RES( RID_SVXIMAGE_LIGHT_ON ) ), aImgLightOff ( SVX_RES( RID_SVXIMAGE_LIGHT_OFF ) ), @@ -255,6 +254,11 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, mpRemember2DAttributes(NULL), bOnly3DChanged ( FALSE ) { + String accname(SVX_RES(STR_COLOR_LIGHT_PRE)); + aCtlLightPreview.SetAccessibleName(accname); + aCtlPreview.SetAccessibleName(accname); + aLbAmbientlight.SetAccessibleName(aFTAmbientlight.GetDisplayText()); + SETHCIMAGE( aBtnGeo, BMP_GEO_H ); SETHCIMAGE( aBtnRepresentation, BMP_REPRESENTATION_H ); SETHCIMAGE( aBtnLight, BMP_3DLIGHT_H ); @@ -416,6 +420,86 @@ __EXPORT Svx3DWin::Svx3DWin( SfxBindings* pInBindings, } Reset(); + + aBtnNormalsObj.SetAccessibleRelationMemberOf( &aFLNormals ); + aBtnNormalsFlat.SetAccessibleRelationMemberOf( &aFLNormals ); + aBtnNormalsSphere.SetAccessibleRelationMemberOf( &aFLNormals ); + aBtnNormalsInvert.SetAccessibleRelationMemberOf( &aFLNormals ); + aBtnTwoSidedLighting.SetAccessibleRelationMemberOf( &aFLNormals ); + aBtnDoubleSided.SetAccessibleRelationMemberOf( &aFLNormals ); + + aBtnLight1.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLight2.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLight3.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLight4.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLight5.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLight6.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLight7.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLight8.SetAccessibleRelationMemberOf( &aFLLight ); + + aBtnLight1.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLight2.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLight3.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLight4.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLight5.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLight6.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLight7.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLight8.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnLightColor.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnLightColor.SetAccessibleRelationLabeledBy( &aFTLightsource ); + aBtnAmbientColor.SetAccessibleRelationMemberOf( &aFLLight ); + aBtnAmbientColor.SetAccessibleRelationLabeledBy( &aFTAmbientlight ); + + aBtnSpecularColor.SetAccessibleRelationLabeledBy( &aFtMatSpecular ); + aBtnMatColor.SetAccessibleRelationLabeledBy( &aFtMatColor ); + aBtnEmissionColor.SetAccessibleRelationLabeledBy( &aFtMatEmission ); + aBtnTexLuminance.SetAccessibleRelationLabeledBy( &aFtTexKind ); + aBtnTexColor.SetAccessibleRelationLabeledBy( &aFtTexKind ); + aBtnTexReplace.SetAccessibleRelationLabeledBy( &aFtTexMode ); + aBtnTexModulate.SetAccessibleRelationLabeledBy( &aFtTexMode ); + aBtnTexBlend.SetAccessibleRelationLabeledBy( &aFtTexMode ); + aBtnTexObjectX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX ); + aBtnTexParallelX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX ); + aBtnTexCircleX.SetAccessibleRelationLabeledBy( &aFtTexProjectionX ); + aBtnTexObjectY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY ); + aBtnTexParallelY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY ); + aBtnTexCircleY.SetAccessibleRelationLabeledBy( &aFtTexProjectionY ); + aBtnTexFilter.SetAccessibleRelationLabeledBy( &aFtTexFilter ); + aCtlLightPreview.SetAccessibleRelationLabeledBy( &aCtlLightPreview ); + aBtnNormalsObj.SetAccessibleRelationMemberOf(&aFLNormals); + aBtnNormalsFlat.SetAccessibleRelationMemberOf(&aFLNormals); + aBtnNormalsSphere.SetAccessibleRelationMemberOf(&aFLNormals); + aBtnNormalsInvert.SetAccessibleRelationMemberOf(&aFLNormals); + aBtnTwoSidedLighting.SetAccessibleRelationMemberOf(&aFLNormals); + + aBtnShadow3d.SetAccessibleRelationMemberOf(&aFLShadow); + + aBtnLight1.SetAccessibleRelationMemberOf(&aFLLight); + aBtnLight2.SetAccessibleRelationMemberOf(&aFLLight); + aBtnLight3.SetAccessibleRelationMemberOf(&aFLLight); + aBtnLight4.SetAccessibleRelationMemberOf(&aFLLight); + aBtnLight5.SetAccessibleRelationMemberOf(&aFLLight); + aBtnLight6.SetAccessibleRelationMemberOf(&aFLLight); + aBtnLight7.SetAccessibleRelationMemberOf(&aFLLight); + aBtnLight8.SetAccessibleRelationMemberOf(&aFLLight); + + aBtnTexLuminance.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexColor.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexReplace.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexModulate.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexBlend.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexObjectX.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexParallelX.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexCircleX.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexObjectY.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexParallelY.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexCircleY.SetAccessibleRelationMemberOf(&aFLTexture); + aBtnTexFilter.SetAccessibleRelationMemberOf(&aFLTexture); + + aBtnMatColor.SetAccessibleRelationMemberOf(&aFLMaterial); + aBtnEmissionColor.SetAccessibleRelationMemberOf(&aFLMaterial); + + aBtnSpecularColor.SetAccessibleRelationMemberOf(&aFLMatSpecular); } // ----------------------------------------------------------------------- diff --git a/svx/source/engine3d/float3d.src b/svx/source/engine3d/float3d.src index 1947fead5556..c75ab16e19c2 100644 --- a/svx/source/engine3d/float3d.src +++ b/svx/source/engine3d/float3d.src @@ -1438,53 +1438,10 @@ String RID_SVXFLOAT3D_FIX_B Text [ en-US ] = "B:"; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// IAccessibility2 implementation 2009. ------ +String STR_COLOR_LIGHT_PRE +{ + Text [ en-US ] = "Color Light Preview"; +}; +// ------ IAccessibility2 implementation 2009. diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 04f402804b0c..222f88db0a81 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -41,6 +41,7 @@ #include #include "gallery.hrc" #include +#include #include //CHINA001 //CHINA001 #include //CHINA001 @@ -162,6 +163,7 @@ GalleryBrowser1::GalleryBrowser1( GalleryBrowser* pParent, const ResId& rResId, mpThemes->SetHelpId( HID_GALLERY_THEMELIST ); mpThemes->SetSelectHdl( LINK( this, GalleryBrowser1, SelectThemeHdl ) ); + mpThemes->SetAccessibleName(String(SVX_RES( RID_SVXSTR_GALLERYPROPS_GALTHEME ) ) ); for( ULONG i = 0, nCount = mpGallery->GetThemeCount(); i < nCount; i++ ) ImplInsertThemeEntry( mpGallery->GetThemeInfo( i ) ); diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 045b52aa2e53..0d3f91b6253b 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -54,8 +54,9 @@ #include "gallery.hrc" #include #include -#include //CHINA001 -//CHINA001 #include //CHINA001 +#include +#include +#include // ----------- // - Defines - @@ -338,6 +339,9 @@ GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId, maViewBox.SetSelectHdl( LINK( this, GalleryBrowser2, SelectTbxHdl ) ); maViewBox.Show(); + mpIconView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) )); + mpListView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) )); + maInfoBar.Show(); maSeparator.Show(); @@ -347,6 +351,12 @@ GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId, InitSettings(); SetMode( ( GALLERYBROWSERMODE_PREVIEW != GalleryBrowser2::meInitMode ) ? GalleryBrowser2::meInitMode : GALLERYBROWSERMODE_ICON ); + + if(maInfoBar.GetText().Len() == 0) + mpIconView->SetAccessibleRelationLabeledBy(mpIconView); + else + mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar); + mpIconView->SetAccessibleRelationMemberOf(mpIconView); } // ----------------------------------------------------------------------------- @@ -641,6 +651,10 @@ void GalleryBrowser2::SelectTheme( const String& rThemeName ) mpListView = new GalleryListView( this, mpCurTheme ); mpPreview = new GalleryPreview( this, mpCurTheme ); + mpIconView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) )); + mpListView->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_THEMEITEMS ) )); + mpPreview->SetAccessibleName(String( SVX_RES( RID_SVXSTR_GALLERY_PREVIEW ) )); + const Link aSelectHdl( LINK( this, GalleryBrowser2, SelectObjectHdl ) ); mpIconView->SetSelectHdl( aSelectHdl ); @@ -655,6 +669,12 @@ void GalleryBrowser2::SelectTheme( const String& rThemeName ) maViewBox.EnableItem( TBX_ID_ICON, TRUE ); maViewBox.EnableItem( TBX_ID_LIST, TRUE ); maViewBox.CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, TRUE ); + + if(maInfoBar.GetText().Len() == 0) + mpIconView->SetAccessibleRelationLabeledBy(mpIconView); + else + mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar); + mpIconView->SetAccessibleRelationMemberOf(mpIconView); } // ----------------------------------------------------------------------------- diff --git a/svx/source/gallery2/gallery.src b/svx/source/gallery2/gallery.src index 39ee6e0e6b1b..c7b91daff30f 100644 --- a/svx/source/gallery2/gallery.src +++ b/svx/source/gallery2/gallery.src @@ -178,6 +178,29 @@ String RID_SVXSTR_GALLERY_LISTVIEW Text [ en-US ] = "Detailed View"; }; +String RID_SVXSTR_GALLERYPROPS_GALTHEME +{ + Text [ en-US ] = "Gallery Theme" ; +}; + +//IAccessibility2 Implementation 2009----- +String RID_SVXSTR_GALLERY_THEMEITEMS +{ + Text [ en-US ] = "Theme Items"; +}; +String RID_SVXSTR_GALLERY_THEMENAME +{ + Text [ en-US ] = "Theme Name"; +}; +String RID_SVXSTR_GALLERY_FILESFOUND +{ + Text [ en-US ] = "Files Found"; +}; +String RID_SVXSTR_GALLERY_PREVIEW +{ + Text [ en-US ] = "Preview"; +}; +//-----IAccessibility2 Implementation 2009 /******************************************************************************/ Bitmap RID_SVXBMP_GALLERY @@ -409,85 +432,3 @@ Menu RID_SVXMN_GALLERY2 }; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svx/source/svdraw/svdstr.src b/svx/source/svdraw/svdstr.src index 6690d4a7618b..6c80ba2c383a 100644 --- a/svx/source/svdraw/svdstr.src +++ b/svx/source/svdraw/svdstr.src @@ -2865,76 +2865,14 @@ Bitmap SIP_SA_ACCESSIBILITY_CROP_MARKERS File = "cropmarkersACC.bmp"; }; -// ******************************************************************* EOF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +//IAccessibility2 Implementation 2009----- +String STR_ObjNameSingulFONTWORK +{ + Text [ en-US ] = "font work" ; +}; +String STR_ObjNamePluralFONTWORK +{ + Text [ en-US ] = "font works" ; +}; +//-----IAccessibility2 Implementation 2009 diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index 260a2e2e646c..74c363c2df6e 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -113,6 +113,7 @@ SvxColorValueSet::SvxColorValueSet( Window* _pParent, WinBits nWinStyle ) : DragSourceHelper( this ), bLeft (TRUE) { + SetAccessibleName(String( SVX_RES( STR_COLORTABLE ) ) ); } /************************************************************************* @@ -126,6 +127,7 @@ SvxColorValueSet::SvxColorValueSet( Window* _pParent, const ResId& rResId ) : DragSourceHelper( this ), bLeft (TRUE) { + SetAccessibleName(String( SVX_RES( STR_COLORTABLE ) )); } /************************************************************************* diff --git a/svx/source/tbxctrls/colrctrl.src b/svx/source/tbxctrls/colrctrl.src index 023c271c5455..1fdd6df6a39b 100644 --- a/svx/source/tbxctrls/colrctrl.src +++ b/svx/source/tbxctrls/colrctrl.src @@ -53,32 +53,11 @@ DockingWindow RID_SVXCTRL_COLOR Border = FALSE ; }; }; - // ********************************************************************** EOF - - - - - - - - - - - - - - - - - - - - - - - - - - +// IAccessibility2 implementation 2009. ------ +String STR_COLORTABLE +{ + Text [ en-US ] = "Color Palette" ; +}; +// ------ IAccessibility2 implementation 2009. diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index 23f2241ab235..7409d00aa3c8 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -83,8 +83,8 @@ const int nLineCount = 4; \************************************************************************/ FontWorkGalleryDialog::FontWorkGalleryDialog( SdrView* pSdrView, Window* pParent, sal_uInt16 /*nSID*/ ) : ModalDialog( pParent, SVX_RES( RID_SVX_MDLG_FONTWORK_GALLERY ) ), - maCtlFavorites ( this, SVX_RES( CTL_FAVORITES ) ), maFLFavorites ( this, SVX_RES( FL_FAVORITES ) ), + maCtlFavorites ( this, SVX_RES( CTL_FAVORITES ) ), maOKButton ( this, SVX_RES( BTN_OK ) ), maCancelButton ( this, SVX_RES( BTN_CANCEL ) ), maHelpButton ( this, SVX_RES( BTN_HELP ) ), diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index bd0a39200dd1..a586b492763e 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -856,6 +856,7 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand, { aColorSet.SetStyle( aColorSet.GetStyle() | WB_NONEFIELD ); aColorSet.SetText( SVX_RESSTR( RID_SVXSTR_TRANSPARENT ) ); + aColorSet.SetAccessibleName( SVX_RESSTR( RID_SVXSTR_BACKGROUND ) ); } else if ( SID_ATTR_CHAR_COLOR == theSlotId || SID_ATTR_CHAR_COLOR2 == theSlotId || SID_EXTRUSION_3D_COLOR == theSlotId ) { @@ -870,8 +871,13 @@ SvxColorWindow_Impl::SvxColorWindow_Impl( const OUString& rCommand, { aColorSet.SetStyle( aColorSet.GetStyle() | WB_NONEFIELD ); aColorSet.SetText( SVX_RESSTR( RID_SVXSTR_AUTOMATIC ) ); + aColorSet.SetAccessibleName( SVX_RESSTR( RID_SVXSTR_TEXTCOLOR ) ); } } + else + { + aColorSet.SetAccessibleName( SVX_RESSTR( RID_SVXSTR_FRAME_COLOR ) ); + } if ( pColorTable ) { @@ -1092,6 +1098,7 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl( USHORT nId, const Reference< XFrame >& SetHelpId( HID_POPUP_FRAME ); SetText( SVX_RESSTR(RID_SVXSTR_FRAME) ); + aFrameSet.SetAccessibleName( SVX_RESSTR(RID_SVXSTR_FRAME) ); aFrameSet.Show(); } /*-- 22.09.2004 12:27:50--------------------------------------------------- @@ -1348,6 +1355,7 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r aLineSet.SetSelectHdl( LINK( this, SvxLineWindow_Impl, SelectHdl ) ); aLineSet.SetText( SVX_RESSTR(STR_NONE) ); + aLineSet.SetAccessibleName( SVX_RESSTR(RID_SVXSTR_FRAME_STYLE) ); lcl_CalcSizeValueSet( *this, aLineSet, aBmpSize ); SetHelpId( HID_POPUP_LINE ); diff --git a/svx/source/tbxctrls/tbcontrl.src b/svx/source/tbxctrls/tbcontrl.src index f3e068f56226..f49966e9ae17 100644 --- a/svx/source/tbxctrls/tbcontrl.src +++ b/svx/source/tbxctrls/tbcontrl.src @@ -185,5 +185,11 @@ String RID_SVXSTR_MORE Text [ en-US ] = "More..."; }; +//IAccessibility2 Implementation 2009----- +String RID_SVXSTR_TEXTCOLOR +{ + Text [ en-US ] = "Font color"; +}; +//-----IAccessibility2 Implementation 2009 // ********************************************************************** EOF -- cgit From 3aae61d45fc1cb2be6794c55c32fc4813dc28498 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Fri, 21 Jan 2011 16:19:41 +0100 Subject: accfixes: added missing include --- svx/source/gallery2/galbrws1.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 222f88db0a81..80761cbdea1d 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -42,6 +42,7 @@ #include "gallery.hrc" #include #include +#include #include //CHINA001 //CHINA001 #include //CHINA001 -- cgit From 72f6e25f3d79a789caaa3ba190a85dbf1b65a693 Mon Sep 17 00:00:00 2001 From: "Malte Timmermann [mt]" Date: Mon, 24 Jan 2011 16:46:05 +0100 Subject: accfixes: solved some svx/cui gallery shared string resource issues --- svx/inc/svx/dialogs.hrc | 10 ++-- svx/source/dialog/sdstring.src | 121 ++++++++-------------------------------- svx/source/gallery2/gallery.src | 23 -------- 3 files changed, 27 insertions(+), 127 deletions(-) diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc index 8966c7494248..3bca44105edd 100755 --- a/svx/inc/svx/dialogs.hrc +++ b/svx/inc/svx/dialogs.hrc @@ -53,11 +53,11 @@ #define RID_SVXSTR_FIELDUNIT_TABLE (RID_SVX_START + 311) #define RID_SVXSTR_COLOR_USER (RID_SVX_START + 250) //IAccessibility2 Implementation 2009----- -#define RID_SVXSTR_GALLERYPROPS_GALTHEME (RID_SVX_GALLERY_START + 92) -#define RID_SVXSTR_GALLERY_THEMEITEMS (RID_SVX_GALLERY_START + 93) -#define RID_SVXSTR_GALLERY_THEMENAME (RID_SVX_GALLERY_START + 94) -#define RID_SVXSTR_GALLERY_FILESFOUND (RID_SVX_GALLERY_START + 95) -#define RID_SVXSTR_GALLERY_PREVIEW (RID_SVX_GALLERY_START + 96) +#define RID_SVXSTR_GALLERYPROPS_GALTHEME (RID_SVX_START + 251) +#define RID_SVXSTR_GALLERY_THEMEITEMS (RID_SVX_START + 252) +#define RID_SVXSTR_GALLERY_THEMENAME (RID_SVX_START + 253) +#define RID_SVXSTR_GALLERY_FILESFOUND (RID_SVX_START + 254) +#define RID_SVXSTR_GALLERY_PREVIEW (RID_SVX_START + 255) //-----IAccessibility2 Implementation 2009 diff --git a/svx/source/dialog/sdstring.src b/svx/source/dialog/sdstring.src index 4b70dda6a151..44982cee0751 100644 --- a/svx/source/dialog/sdstring.src +++ b/svx/source/dialog/sdstring.src @@ -1187,103 +1187,26 @@ String RID_SVXSTR_COLOR_USER Text [ en-US ] = "User" ; }; +String RID_SVXSTR_GALLERYPROPS_GALTHEME +{ + Text [ en-US ] = "Gallery Theme" ; +}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +//IAccessibility2 Implementation 2009----- +String RID_SVXSTR_GALLERY_THEMEITEMS +{ + Text [ en-US ] = "Theme Items"; +}; +String RID_SVXSTR_GALLERY_THEMENAME +{ + Text [ en-US ] = "Theme Name"; +}; +String RID_SVXSTR_GALLERY_FILESFOUND +{ + Text [ en-US ] = "Files Found"; +}; +String RID_SVXSTR_GALLERY_PREVIEW +{ + Text [ en-US ] = "Preview"; +}; +//-----IAccessibility2 Implementation 2009 diff --git a/svx/source/gallery2/gallery.src b/svx/source/gallery2/gallery.src index c7b91daff30f..8179367cd53d 100644 --- a/svx/source/gallery2/gallery.src +++ b/svx/source/gallery2/gallery.src @@ -178,29 +178,6 @@ String RID_SVXSTR_GALLERY_LISTVIEW Text [ en-US ] = "Detailed View"; }; -String RID_SVXSTR_GALLERYPROPS_GALTHEME -{ - Text [ en-US ] = "Gallery Theme" ; -}; - -//IAccessibility2 Implementation 2009----- -String RID_SVXSTR_GALLERY_THEMEITEMS -{ - Text [ en-US ] = "Theme Items"; -}; -String RID_SVXSTR_GALLERY_THEMENAME -{ - Text [ en-US ] = "Theme Name"; -}; -String RID_SVXSTR_GALLERY_FILESFOUND -{ - Text [ en-US ] = "Files Found"; -}; -String RID_SVXSTR_GALLERY_PREVIEW -{ - Text [ en-US ] = "Preview"; -}; -//-----IAccessibility2 Implementation 2009 /******************************************************************************/ Bitmap RID_SVXBMP_GALLERY -- cgit From c0f7a3f7cf33debd0f6049c415c412d14526a79e Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Mon, 24 Jan 2011 17:44:18 +0100 Subject: chart52: #28670# make the legend within charts resizeable - part 2 --- xmloff/inc/SchXMLImport.hxx | 8 - xmloff/inc/xmloff/SchXMLImportHelper.hxx | 2 - xmloff/inc/xmloff/xmltoken.hxx | 1 + xmloff/source/chart/SchXMLChartContext.cxx | 128 +--------------- xmloff/source/chart/SchXMLChartContext.hxx | 15 -- xmloff/source/chart/SchXMLEnumConverter.cxx | 104 +++++++++++++ xmloff/source/chart/SchXMLEnumConverter.hxx | 39 +++++ xmloff/source/chart/SchXMLExport.cxx | 89 +++++------ xmloff/source/chart/SchXMLImport.cxx | 22 --- xmloff/source/chart/SchXMLLegendContext.cxx | 229 ++++++++++++++++++++++++++++ xmloff/source/chart/SchXMLLegendContext.hxx | 46 ++++++ xmloff/source/chart/makefile.mk | 2 + xmloff/source/core/xmltoken.cxx | 1 + 13 files changed, 459 insertions(+), 227 deletions(-) create mode 100755 xmloff/source/chart/SchXMLEnumConverter.cxx create mode 100755 xmloff/source/chart/SchXMLEnumConverter.hxx create mode 100755 xmloff/source/chart/SchXMLLegendContext.cxx create mode 100755 xmloff/source/chart/SchXMLLegendContext.hxx diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx index 7168b2b811a8..c544e3a46ed8 100644 --- a/xmloff/inc/SchXMLImport.hxx +++ b/xmloff/inc/SchXMLImport.hxx @@ -141,14 +141,6 @@ enum SchXMLAxisAttrTokenMap XML_TOK_AXIS_STYLE_NAME }; -enum SchXMLLegendAttrMap -{ - XML_TOK_LEGEND_POSITION, - XML_TOK_LEGEND_X, - XML_TOK_LEGEND_Y, - XML_TOK_LEGEND_STYLE_NAME -}; - enum SchXMLAutoStyleAttrMap { XML_TOK_AS_FAMILY, diff --git a/xmloff/inc/xmloff/SchXMLImportHelper.hxx b/xmloff/inc/xmloff/SchXMLImportHelper.hxx index 03fa8c8e16c0..6c35072a3fb3 100644 --- a/xmloff/inc/xmloff/SchXMLImportHelper.hxx +++ b/xmloff/inc/xmloff/SchXMLImportHelper.hxx @@ -85,7 +85,6 @@ private: SvXMLTokenMap* mpChartAttrTokenMap; SvXMLTokenMap* mpPlotAreaAttrTokenMap; SvXMLTokenMap* mpAxisAttrTokenMap; - SvXMLTokenMap* mpLegendAttrTokenMap; SvXMLTokenMap* mpAutoStyleAttrTokenMap; SvXMLTokenMap* mpCellAttrTokenMap; SvXMLTokenMap* mpSeriesAttrTokenMap; @@ -128,7 +127,6 @@ public: const SvXMLTokenMap& GetChartAttrTokenMap(); const SvXMLTokenMap& GetPlotAreaAttrTokenMap(); const SvXMLTokenMap& GetAxisAttrTokenMap(); - const SvXMLTokenMap& GetLegendAttrTokenMap(); const SvXMLTokenMap& GetAutoStyleAttrTokenMap(); const SvXMLTokenMap& GetCellAttrTokenMap(); const SvXMLTokenMap& GetSeriesAttrTokenMap(); diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index 241201ea5ed7..9339b27cacce 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -3114,6 +3114,7 @@ namespace xmloff { namespace token { XML_OUTSIDE_MAXIMUM,//#i114142# XML_LEGEND_EXPANSION, //#i28760# + XML_LEGEND_EXPANSION_ASPECT_RATIO, //#i28760# XML_BALANCED, //#i28760# XML_HIGH, //#i28760# XML_WIDE, //#i28760# diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index e9e3771eb0d7..6fac2d62d782 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -30,6 +30,7 @@ #include "SchXMLChartContext.hxx" #include "SchXMLImport.hxx" +#include "SchXMLLegendContext.hxx" #include "SchXMLPlotAreaContext.hxx" #include "SchXMLParagraphContext.hxx" #include "SchXMLTableContext.hxx" @@ -52,7 +53,6 @@ #include #include #include -#include #include #include #include @@ -60,7 +60,6 @@ #include #include #include -#include #include #include @@ -277,19 +276,6 @@ uno::Sequence< sal_Int32 > lcl_getNumberSequenceFromString( const ::rtl::OUStrin } // anonymous namespace -static __FAR_DATA SvXMLEnumMapEntry aXMLLegendAlignmentMap[] = -{ -// { XML_LEFT, chart::ChartLegendPosition_LEFT }, - // #i35421# - { XML_START, chart::ChartLegendPosition_LEFT }, - { XML_TOP, chart::ChartLegendPosition_TOP }, -// { XML_RIGHT, chart::ChartLegendPosition_RIGHT }, - // #i35421# - { XML_END, chart::ChartLegendPosition_RIGHT }, - { XML_BOTTOM, chart::ChartLegendPosition_BOTTOM }, - { XML_TOKEN_INVALID, 0 } -}; - // ---------------------------------------- SchXMLChartContext::SchXMLChartContext( SchXMLImportHelper& rImpHelper, @@ -1318,115 +1304,3 @@ SvXMLImportContext* SchXMLTitleContext::CreateChildContext( } // ---------------------------------------- - -SchXMLLegendContext::SchXMLLegendContext( SchXMLImportHelper& rImpHelper, - SvXMLImport& rImport, const rtl::OUString& rLocalName ) : - SvXMLImportContext( rImport, XML_NAMESPACE_CHART, rLocalName ), - mrImportHelper( rImpHelper ) -{ -} - -void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList ) -{ - uno::Reference< chart::XChartDocument > xDoc = mrImportHelper.GetChartDocument(); - if( ! xDoc.is()) - return; - - // turn on legend - uno::Reference< beans::XPropertySet > xDocProp( xDoc, uno::UNO_QUERY ); - if( xDocProp.is()) - { - uno::Any aTrueBool; - aTrueBool <<= (sal_Bool)(sal_True); - try - { - xDocProp->setPropertyValue( rtl::OUString::createFromAscii( "HasLegend" ), aTrueBool ); - } - catch( beans::UnknownPropertyException ) - { - DBG_ERROR( "Property HasLegend not found" ); - } - } - - // parse attributes - sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0; - const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetLegendAttrTokenMap(); - - awt::Point aLegendPos; - bool bHasXPosition=false; - bool bHasYPosition=false; - - rtl::OUString sAutoStyleName; - - for( sal_Int16 i = 0; i < nAttrCount; i++ ) - { - rtl::OUString sAttrName = xAttrList->getNameByIndex( i ); - rtl::OUString aLocalName; - rtl::OUString aValue = xAttrList->getValueByIndex( i ); - USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); - - switch( rAttrTokenMap.Get( nPrefix, aLocalName )) - { - case XML_TOK_LEGEND_POSITION: - { - // set anchor position - uno::Reference< beans::XPropertySet > xProp( xDoc->getLegend(), uno::UNO_QUERY ); - if( xProp.is()) - { - try - { - USHORT nEnumVal; - if( GetImport().GetMM100UnitConverter().convertEnum( nEnumVal, aValue, aXMLLegendAlignmentMap )) - { - uno::Any aAny; - aAny <<= (chart::ChartLegendPosition)(nEnumVal); - xProp->setPropertyValue( rtl::OUString::createFromAscii( "Alignment" ), aAny ); - } - } - catch( beans::UnknownPropertyException ) - { - DBG_ERROR( "Property Alignment (legend) not found" ); - } - } - } - break; - - case XML_TOK_LEGEND_X: - GetImport().GetMM100UnitConverter().convertMeasure( aLegendPos.X, aValue ); - bHasXPosition = true; - break; - case XML_TOK_LEGEND_Y: - GetImport().GetMM100UnitConverter().convertMeasure( aLegendPos.Y, aValue ); - bHasYPosition = true; - break; - case XML_TOK_LEGEND_STYLE_NAME: - sAutoStyleName = aValue; - } - } - - uno::Reference< drawing::XShape > xLegendShape( xDoc->getLegend(), uno::UNO_QUERY ); - if( xLegendShape.is() && bHasXPosition && bHasYPosition ) - xLegendShape->setPosition( aLegendPos ); - - // set auto-styles for Legend - uno::Reference< beans::XPropertySet > xProp( xLegendShape, uno::UNO_QUERY ); - if( xProp.is()) - { - // the fill style has the default "none" in XML, but "solid" in the model. - xProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" )), - uno::makeAny( drawing::FillStyle_NONE )); - const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext(); - if( pStylesCtxt ) - { - const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext( - mrImportHelper.GetChartFamilyID(), sAutoStyleName ); - - if( pStyle && pStyle->ISA( XMLPropStyleContext )) - (( XMLPropStyleContext* )pStyle )->FillPropertySet( xProp ); - } - } -} - -SchXMLLegendContext::~SchXMLLegendContext() -{ -} diff --git a/xmloff/source/chart/SchXMLChartContext.hxx b/xmloff/source/chart/SchXMLChartContext.hxx index 0f1fb0b4ab83..2ff2a4e3571f 100644 --- a/xmloff/source/chart/SchXMLChartContext.hxx +++ b/xmloff/source/chart/SchXMLChartContext.hxx @@ -171,19 +171,4 @@ public: const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList ); }; -// ---------------------------------------- - -class SchXMLLegendContext : public SvXMLImportContext -{ -private: - SchXMLImportHelper& mrImportHelper; - -public: - SchXMLLegendContext( SchXMLImportHelper& rImpHelper, - SvXMLImport& rImport, const rtl::OUString& rLocalName ); - virtual ~SchXMLLegendContext(); - - virtual void StartElement( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList ); -}; - #endif // _SCH_XMLCHARTCONTEXT_HXX_ diff --git a/xmloff/source/chart/SchXMLEnumConverter.cxx b/xmloff/source/chart/SchXMLEnumConverter.cxx new file mode 100755 index 000000000000..fd4d7914a2fe --- /dev/null +++ b/xmloff/source/chart/SchXMLEnumConverter.cxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_xmloff.hxx" +#include "SchXMLEnumConverter.hxx" + +#include +#include +#include + +// header for rtl::Static +#include + +using ::rtl::OUString; +using namespace ::xmloff::token; +using namespace ::com::sun::star; + +namespace +{ +//----------------------------------------------------------------------- + +SvXMLEnumMapEntry aXMLLegendPositionEnumMap[] = +{ + { XML_START, chart::ChartLegendPosition_LEFT }, + { XML_TOP, chart::ChartLegendPosition_TOP }, + { XML_END, chart::ChartLegendPosition_RIGHT }, + { XML_BOTTOM, chart::ChartLegendPosition_BOTTOM }, + { XML_TOKEN_INVALID, 0 } +}; + +class XMLLegendPositionPropertyHdl : public XMLEnumPropertyHdl +{ +public: + XMLLegendPositionPropertyHdl() + : XMLEnumPropertyHdl( aXMLLegendPositionEnumMap, ::getCppuType((const chart::ChartLegendPosition*)0) ) {} + virtual ~XMLLegendPositionPropertyHdl() {}; +}; + +struct TheLegendPositionPropertyHdl : public rtl::Static< XMLLegendPositionPropertyHdl, TheLegendPositionPropertyHdl > +{ +}; + +//----------------------------------------------------------------------- + +SvXMLEnumMapEntry aXMLLegendExpansionEnumMap[] = +{ + { XML_WIDE, chart::ChartLegendExpansion_WIDE }, + { XML_HIGH, chart::ChartLegendExpansion_HIGH }, + { XML_BALANCED, chart::ChartLegendExpansion_BALANCED }, + { XML_CUSTOM, chart::ChartLegendExpansion_CUSTOM }, + { XML_TOKEN_INVALID, 0 } +}; + +class XMLLegendExpansionPropertyHdl : public XMLEnumPropertyHdl +{ +public: + XMLLegendExpansionPropertyHdl() + : XMLEnumPropertyHdl( aXMLLegendExpansionEnumMap, ::getCppuType((const chart::ChartLegendExpansion*)0) ) {} + virtual ~XMLLegendExpansionPropertyHdl() {}; +}; + +struct TheLegendExpansionPropertyHdl : public rtl::Static< XMLLegendExpansionPropertyHdl, TheLegendExpansionPropertyHdl > +{ +}; + +//----------------------------------------------------------------------- + +}//end anonymous namespace + +//----------------------------------------------------------------------- + +XMLEnumPropertyHdl& SchXMLEnumConverter::getLegendPositionConverter() +{ + return TheLegendPositionPropertyHdl::get(); +} +XMLEnumPropertyHdl& SchXMLEnumConverter::getLegendExpansionConverter() +{ + return TheLegendExpansionPropertyHdl::get(); +} diff --git a/xmloff/source/chart/SchXMLEnumConverter.hxx b/xmloff/source/chart/SchXMLEnumConverter.hxx new file mode 100755 index 000000000000..63a9fb7ffb95 --- /dev/null +++ b/xmloff/source/chart/SchXMLEnumConverter.hxx @@ -0,0 +1,39 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _XML_CHART_ENUM_CONVERTER_HXX_ +#define _XML_CHART_ENUM_CONVERTER_HXX_ + +#include + +class SchXMLEnumConverter +{ +public: + static XMLEnumPropertyHdl& getLegendPositionConverter();//returns a singleton + static XMLEnumPropertyHdl& getLegendExpansionConverter();//returns a singleton +}; + +#endif // _XML_CHART_ENUM_CONVERTER_HXX_ diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 9450eb383d1c..ff98ad9e92ea 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -35,6 +35,8 @@ #include "SchXMLSeriesHelper.hxx" #include "ColorPropertySet.hxx" #include "SchXMLTools.hxx" +#include "SchXMLEnumConverter.hxx" + #include #include #include @@ -66,7 +68,7 @@ #include #include -#include +#include #include #include #include @@ -1416,69 +1418,50 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& Reference< beans::XPropertySet > xProp( rChartDoc->getLegend(), uno::UNO_QUERY ); if( xProp.is()) { - chart::ChartLegendPosition aLegendPos = chart::ChartLegendPosition_NONE; + // export legend anchor position try { - Any aAny( xProp->getPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM( "Alignment" )))); - aAny >>= aLegendPos; + Any aAny( xProp->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Alignment" )))); + if( SchXMLEnumConverter::getLegendPositionConverter().exportXML( msString, aAny, mrExport.GetMM100UnitConverter() ) ) + mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LEGEND_POSITION, msString ); } catch( beans::UnknownPropertyException & ) { DBG_WARNING( "Property Align not found in ChartLegend" ); } - switch( aLegendPos ) - { - case chart::ChartLegendPosition_LEFT: -// msString = GetXMLToken(XML_LEFT); - // #i35421# change left->start (not clear why this was done) - msString = GetXMLToken(XML_START); - break; - case chart::ChartLegendPosition_RIGHT: -// msString = GetXMLToken(XML_RIGHT); - // #i35421# change right->end (not clear why this was done) - msString = GetXMLToken(XML_END); - break; - case chart::ChartLegendPosition_TOP: - msString = GetXMLToken(XML_TOP); - break; - case chart::ChartLegendPosition_BOTTOM: - msString = GetXMLToken(XML_BOTTOM); - break; - case chart::ChartLegendPosition_NONE: - case chart::ChartLegendPosition_MAKE_FIXED_SIZE: - // nothing - break; - } - - // export anchor position - if( msString.getLength()) - mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LEGEND_POSITION, msString ); - - // export absolute position - msString = OUString(); - Reference< drawing::XShape > xShape( xProp, uno::UNO_QUERY ); - if( xShape.is()) - addPosition( xShape ); + // export absolute legend position + Reference< drawing::XShape > xLegendShape( xProp, uno::UNO_QUERY ); + addPosition( xLegendShape ); - // export size - chart2::LegendExpansion aLegendExpansion = chart2::LegendExpansion_HIGH; - try + // export legend size + const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); + if( xLegendShape.is() && nCurrentODFVersion >= SvtSaveOptions::ODFVER_012 && nCurrentODFVersion == SvtSaveOptions::ODFVER_LATEST )//do not export legend-expansion to ODF 1.0 and export size only if extensions are enabled //#i28670# todo: change this dependent on fileformat evolution { - Any aAny( xProp->getPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM( "Expansion" )))); - bool bHasExpansion = (aAny >>= aLegendExpansion); - //todo - //if (bHasExpansion) - // mrExport.AddAttribute( XML_NAMESPACE_STYLE, XML_LEGEND_EXPANSION, ); - } - catch( beans::UnknownPropertyException & ) - { - DBG_WARNING( "Property Expansion not found in ChartLegend" ); + try + { + chart::ChartLegendExpansion nLegendExpansion = chart::ChartLegendExpansion_HIGH; + OUString aExpansionString; + Any aAny( xProp->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "Expansion" )))); + bool bHasExpansion = (aAny >>= nLegendExpansion); + if( bHasExpansion && SchXMLEnumConverter::getLegendExpansionConverter().exportXML( aExpansionString, aAny, mrExport.GetMM100UnitConverter() ) ) + { + mrExport.AddAttribute( XML_NAMESPACE_STYLE, XML_LEGEND_EXPANSION, aExpansionString ); + if( nLegendExpansion == chart::ChartLegendExpansion_CUSTOM) + { + awt::Size aSize( xLegendShape->getSize() ); + addSize( aSize, true ); + rtl::OUStringBuffer aAspectRatioString; + SvXMLUnitConverter::convertDouble(aAspectRatioString, double(aSize.Width)/double(aSize.Height)); + mrExport.AddAttribute( XML_NAMESPACE_STYLE, XML_LEGEND_EXPANSION_ASPECT_RATIO, aAspectRatioString.makeStringAndClear() ); + } + } + } + catch( beans::UnknownPropertyException & ) + { + DBG_WARNING( "Property Expansion not found in ChartLegend" ); + } } - - } // write style name diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index 587070202c9c..ef14384a11d8 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -148,7 +148,6 @@ SchXMLImportHelper::SchXMLImportHelper() : mpChartAttrTokenMap( 0 ), mpPlotAreaAttrTokenMap( 0 ), mpAxisAttrTokenMap( 0 ), - mpLegendAttrTokenMap( 0 ), mpAutoStyleAttrTokenMap( 0 ), mpCellAttrTokenMap( 0 ), mpSeriesAttrTokenMap( 0 ), @@ -178,8 +177,6 @@ SchXMLImportHelper::~SchXMLImportHelper() delete mpPlotAreaAttrTokenMap; if( mpAxisAttrTokenMap ) delete mpAxisAttrTokenMap; - if( mpLegendAttrTokenMap ) - delete mpLegendAttrTokenMap; if( mpAutoStyleAttrTokenMap ) delete mpAutoStyleAttrTokenMap; if( mpCellAttrTokenMap ) @@ -413,25 +410,6 @@ const SvXMLTokenMap& SchXMLImportHelper::GetAxisAttrTokenMap() return *mpAxisAttrTokenMap; } -const SvXMLTokenMap& SchXMLImportHelper::GetLegendAttrTokenMap() -{ - if( ! mpLegendAttrTokenMap ) - { - static __FAR_DATA SvXMLTokenMapEntry aLegendAttrTokenMap[] = -{ - { XML_NAMESPACE_CHART, XML_LEGEND_POSITION, XML_TOK_LEGEND_POSITION }, - { XML_NAMESPACE_SVG, XML_X, XML_TOK_LEGEND_X }, - { XML_NAMESPACE_SVG, XML_Y, XML_TOK_LEGEND_Y }, - { XML_NAMESPACE_CHART, XML_STYLE_NAME, XML_TOK_LEGEND_STYLE_NAME }, - XML_TOKEN_MAP_END -}; - - mpLegendAttrTokenMap = new SvXMLTokenMap( aLegendAttrTokenMap ); - } // if( ! mpLegendAttrTokenMap ) - - return *mpLegendAttrTokenMap; -} - const SvXMLTokenMap& SchXMLImportHelper::GetAutoStyleAttrTokenMap() { if( ! mpAutoStyleAttrTokenMap ) diff --git a/xmloff/source/chart/SchXMLLegendContext.cxx b/xmloff/source/chart/SchXMLLegendContext.cxx new file mode 100755 index 000000000000..2cd88dfb14b7 --- /dev/null +++ b/xmloff/source/chart/SchXMLLegendContext.cxx @@ -0,0 +1,229 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_xmloff.hxx" +#include "SchXMLLegendContext.hxx" +#include "SchXMLEnumConverter.hxx" + +#include "xmlnmspe.hxx" +#include +#include +#include +#include + +#include + +#include +#include +#include + +using namespace ::xmloff::token; +using namespace com::sun::star; + +using rtl::OUString; +using com::sun::star::uno::Reference; + +//---------------------------------------- + +namespace +{ + +enum LegendAttributeTokens +{ + XML_TOK_LEGEND_POSITION, + XML_TOK_LEGEND_X, + XML_TOK_LEGEND_Y, + XML_TOK_LEGEND_STYLE_NAME, + XML_TOK_LEGEND_EXPANSION, + XML_TOK_LEGEND_EXPANSION_ASPECT_RATIO, + XML_TOK_LEGEND_WIDTH, + XML_TOK_LEGEND_WIDTH_EXT, + XML_TOK_LEGEND_HEIGHT, + XML_TOK_LEGEND_HEIGHT_EXT +}; + +SvXMLTokenMapEntry aLegendAttributeTokenMap[] = +{ + { XML_NAMESPACE_CHART, XML_LEGEND_POSITION, XML_TOK_LEGEND_POSITION }, + { XML_NAMESPACE_SVG, XML_X, XML_TOK_LEGEND_X }, + { XML_NAMESPACE_SVG, XML_Y, XML_TOK_LEGEND_Y }, + { XML_NAMESPACE_CHART, XML_STYLE_NAME, XML_TOK_LEGEND_STYLE_NAME }, + { XML_NAMESPACE_STYLE, XML_LEGEND_EXPANSION, XML_TOK_LEGEND_EXPANSION }, + { XML_NAMESPACE_STYLE, XML_LEGEND_EXPANSION_ASPECT_RATIO, XML_TOK_LEGEND_EXPANSION_ASPECT_RATIO }, + { XML_NAMESPACE_SVG, XML_WIDTH, XML_TOK_LEGEND_WIDTH }, + { XML_NAMESPACE_CHART_EXT, XML_WIDTH, XML_TOK_LEGEND_WIDTH_EXT }, + { XML_NAMESPACE_SVG, XML_HEIGHT, XML_TOK_LEGEND_HEIGHT }, + { XML_NAMESPACE_CHART_EXT, XML_HEIGHT, XML_TOK_LEGEND_HEIGHT_EXT }, + XML_TOKEN_MAP_END +}; + +class LegendAttributeTokenMap : public SvXMLTokenMap +{ +public: + LegendAttributeTokenMap(): SvXMLTokenMap( aLegendAttributeTokenMap ) {} + virtual ~LegendAttributeTokenMap() {} +}; + +//a LegendAttributeTokenMap Singleton +struct theLegendAttributeTokenMap : public rtl::Static< LegendAttributeTokenMap, theLegendAttributeTokenMap > {}; + +}//end anonymous namespace + +//---------------------------------------- + +SchXMLLegendContext::SchXMLLegendContext( SchXMLImportHelper& rImpHelper, SvXMLImport& rImport, const rtl::OUString& rLocalName ) : + SvXMLImportContext( rImport, XML_NAMESPACE_CHART, rLocalName ), + mrImportHelper( rImpHelper ) +{ +} + +void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList ) +{ + uno::Reference< chart::XChartDocument > xDoc = mrImportHelper.GetChartDocument(); + if( !xDoc.is() ) + return; + + // turn on legend + uno::Reference< beans::XPropertySet > xDocProp( xDoc, uno::UNO_QUERY ); + if( xDocProp.is() ) + { + try + { + xDocProp->setPropertyValue( rtl::OUString::createFromAscii( "HasLegend" ), uno::makeAny( sal_True ) ); + } + catch( beans::UnknownPropertyException ) + { + DBG_ERROR( "Property HasLegend not found" ); + } + } + + uno::Reference< drawing::XShape > xLegendShape( xDoc->getLegend(), uno::UNO_QUERY ); + uno::Reference< beans::XPropertySet > xLegendProps( xLegendShape, uno::UNO_QUERY ); + if( !xLegendShape.is() || !xLegendProps.is() ) + { + DBG_ERROR( "legend could not be created" ); + return; + } + + // parse attributes + sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0; + const SvXMLTokenMap& rAttrTokenMap = theLegendAttributeTokenMap::get(); + + awt::Point aLegendPos; + bool bHasXPosition=false; + bool bHasYPosition=false; + awt::Size aLegendSize; + bool bHasWidth=false; + bool bHasHeight=false; + chart::ChartLegendExpansion nLegendExpansion = chart::ChartLegendExpansion_HIGH; + bool bHasExpansion=false; + + rtl::OUString sAutoStyleName; + uno::Any aAny; + + for( sal_Int16 i = 0; i < nAttrCount; i++ ) + { + rtl::OUString sAttrName = xAttrList->getNameByIndex( i ); + rtl::OUString aLocalName; + rtl::OUString aValue = xAttrList->getValueByIndex( i ); + USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); + + switch( rAttrTokenMap.Get( nPrefix, aLocalName )) + { + case XML_TOK_LEGEND_POSITION: + { + try + { + if( SchXMLEnumConverter::getLegendPositionConverter().importXML( aValue, aAny, GetImport().GetMM100UnitConverter() ) ) + xLegendProps->setPropertyValue( rtl::OUString::createFromAscii( "Alignment" ), aAny ); + } + catch( beans::UnknownPropertyException ) + { + DBG_ERROR( "Property Alignment (legend) not found" ); + } + } + break; + + case XML_TOK_LEGEND_X: + GetImport().GetMM100UnitConverter().convertMeasure( aLegendPos.X, aValue ); + bHasXPosition = true; + break; + case XML_TOK_LEGEND_Y: + GetImport().GetMM100UnitConverter().convertMeasure( aLegendPos.Y, aValue ); + bHasYPosition = true; + break; + case XML_TOK_LEGEND_STYLE_NAME: + sAutoStyleName = aValue; + break; + case XML_TOK_LEGEND_EXPANSION: + SchXMLEnumConverter::getLegendPositionConverter().importXML( aValue, aAny, GetImport().GetMM100UnitConverter() ); + bHasExpansion = (aAny>>=nLegendExpansion); + break; + case XML_TOK_LEGEND_EXPANSION_ASPECT_RATIO: + break; + case XML_TOK_LEGEND_WIDTH: + case XML_TOK_LEGEND_WIDTH_EXT: + GetImport().GetMM100UnitConverter().convertMeasure( aLegendSize.Width, aValue ); + bHasWidth = true; + break; + case XML_TOK_LEGEND_HEIGHT: + case XML_TOK_LEGEND_HEIGHT_EXT: + GetImport().GetMM100UnitConverter().convertMeasure( aLegendSize.Height, aValue ); + bHasHeight = true; + break; + default: + break; + } + } + + if( bHasXPosition && bHasYPosition ) + xLegendShape->setPosition( aLegendPos ); + + if( bHasExpansion && nLegendExpansion!= chart::ChartLegendExpansion_CUSTOM ) + xLegendProps->setPropertyValue( rtl::OUString::createFromAscii( "Expansion" ), uno::makeAny(nLegendExpansion) ); + else if( bHasHeight && bHasWidth ) + xLegendShape->setSize( aLegendSize ); + + // the fill style has the default "none" in XML, but "solid" in the model. + xLegendProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillStyle" )), uno::makeAny( drawing::FillStyle_NONE )); + + // set auto-styles for Legend + const SvXMLStylesContext* pStylesCtxt = mrImportHelper.GetAutoStylesContext(); + if( pStylesCtxt ) + { + const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext( + mrImportHelper.GetChartFamilyID(), sAutoStyleName ); + + if( pStyle && pStyle->ISA( XMLPropStyleContext )) + (( XMLPropStyleContext* )pStyle )->FillPropertySet( xLegendProps ); + } +} + +SchXMLLegendContext::~SchXMLLegendContext() +{ +} diff --git a/xmloff/source/chart/SchXMLLegendContext.hxx b/xmloff/source/chart/SchXMLLegendContext.hxx new file mode 100755 index 000000000000..1841b0cef24b --- /dev/null +++ b/xmloff/source/chart/SchXMLLegendContext.hxx @@ -0,0 +1,46 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _SCH_XMLLEGENDCONTEXT_HXX_ +#define _SCH_XMLLEGENDCONTEXT_HXX_ + +#include "SchXMLImport.hxx" + +// ---------------------------------------- + +class SchXMLLegendContext : public SvXMLImportContext +{ +public: + SchXMLLegendContext( SchXMLImportHelper& rImpHelper, SvXMLImport& rImport, const rtl::OUString& rLocalName ); + virtual ~SchXMLLegendContext(); + + virtual void StartElement( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList ); + +private: + SchXMLImportHelper& mrImportHelper; +}; + +#endif // _SCH_XMLLEGENDCONTEXT_HXX_ diff --git a/xmloff/source/chart/makefile.mk b/xmloff/source/chart/makefile.mk index bfdc9aeb5e22..187c5418aa33 100644 --- a/xmloff/source/chart/makefile.mk +++ b/xmloff/source/chart/makefile.mk @@ -45,11 +45,13 @@ SLOFILES = $(SLO)$/ColorPropertySet.obj \ $(SLO)$/contexts.obj \ $(SLO)$/SchXMLTableContext.obj \ $(SLO)$/SchXMLChartContext.obj \ + $(SLO)$/SchXMLLegendContext.obj \ $(SLO)$/SchXMLPlotAreaContext.obj \ $(SLO)$/SchXMLParagraphContext.obj \ $(SLO)$/SchXMLTextListContext.obj \ $(SLO)$/SchXMLSeriesHelper.obj \ $(SLO)$/SchXMLSeries2Context.obj \ + $(SLO)$/SchXMLEnumConverter.obj \ $(SLO)$/PropertyMaps.obj \ $(SLO)$/XMLChartStyleContext.obj \ $(SLO)$/XMLErrorIndicatorPropertyHdl.obj \ diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 6c077ff1e4d8..f0058337967f 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3114,6 +3114,7 @@ namespace xmloff { namespace token { TOKEN( "outside-maximum", XML_OUTSIDE_MAXIMUM ), TOKEN( "legend-expansion", XML_LEGEND_EXPANSION), + TOKEN( "legend-expansion-aspect-ratio", XML_LEGEND_EXPANSION_ASPECT_RATIO), TOKEN( "balanced", XML_BALANCED), TOKEN( "high", XML_HIGH), TOKEN( "wide", XML_WIDE), -- cgit From 358da7e4cf9bf78d2dc1d48d56e25777d4f12a13 Mon Sep 17 00:00:00 2001 From: "Daniel Rentz [dr]" Date: Mon, 24 Jan 2011 18:10:36 +0100 Subject: dr79: #i116540# change 'DataPilot' to 'Pivot Table' in Calc GUI; recover lost changes in resource file pivot.src, remove unused code --- .../registry/data/org/openoffice/Office/UI/CalcCommands.xcu | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu index 5c72d948436f..a30d746d5043 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu @@ -170,7 +170,7 @@ - DataPilot Filter + Pivot Table Filter @@ -323,10 +323,10 @@ - ~Start DataPilot... + ~Create Pivot Table... - ~Start... + ~Create... 1 @@ -1131,7 +1131,7 @@ - ~Refresh DataPilot + ~Refresh Pivot Table ~Refresh @@ -1139,7 +1139,7 @@ - ~Delete DataPilot + ~Delete Pivot Table ~Delete @@ -1532,7 +1532,7 @@ - Data~Pilot + ~Pivot Table -- cgit From 199d3adfdff55ceee979464450c3d4417bb45db3 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Mon, 24 Jan 2011 21:40:23 +0100 Subject: gridsort: extended diagnostics in non-pro --- framework/source/classes/fwktabwindow.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/source/classes/fwktabwindow.cxx b/framework/source/classes/fwktabwindow.cxx index aa550807460c..52b905839004 100644 --- a/framework/source/classes/fwktabwindow.cxx +++ b/framework/source/classes/fwktabwindow.cxx @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -156,7 +157,7 @@ sal_Bool FwkTabPage::CallMethod( const rtl::OUString& rMethod ) } catch ( uno::Exception& ) { - DBG_ERRORFILE( "FwkTabPage::CallMethod(): exception of XDialogEventHandler::callHandlerMethod()" ); + DBG_UNHANDLED_EXCEPTION(); } } return bRet; -- cgit From 3f328511e92e48df306da7088b0ca627bf921741 Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Tue, 25 Jan 2011 23:08:33 +0100 Subject: chart52: merge with DEV300_m98 --- xmloff/Library_xo.mk | 2 ++ xmloff/source/chart/SchXMLLegendContext.cxx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk index ddd7a21c8fb4..ff85c7c8507b 100644 --- a/xmloff/Library_xo.mk +++ b/xmloff/Library_xo.mk @@ -69,8 +69,10 @@ $(eval $(call gb_Library_add_exception_objects,xo,\ xmloff/source/chart/SchXMLAutoStylePoolP \ xmloff/source/chart/SchXMLCalculationSettingsContext \ xmloff/source/chart/SchXMLChartContext \ + xmloff/source/chart/SchXMLEnumConverter \ xmloff/source/chart/SchXMLExport \ xmloff/source/chart/SchXMLImport \ + xmloff/source/chart/SchXMLLegendContext \ xmloff/source/chart/SchXMLParagraphContext \ xmloff/source/chart/SchXMLPlotAreaContext \ xmloff/source/chart/SchXMLSeries2Context \ diff --git a/xmloff/source/chart/SchXMLLegendContext.cxx b/xmloff/source/chart/SchXMLLegendContext.cxx index 2cd88dfb14b7..0fea13825be2 100755 --- a/xmloff/source/chart/SchXMLLegendContext.cxx +++ b/xmloff/source/chart/SchXMLLegendContext.cxx @@ -30,7 +30,7 @@ #include "SchXMLLegendContext.hxx" #include "SchXMLEnumConverter.hxx" -#include "xmlnmspe.hxx" +#include #include #include #include -- cgit From 94c058640c77e30244c930c33f761fff4190e61f Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Thu, 27 Jan 2011 13:25:09 +0100 Subject: csvexport: #i116636# option to leave out unnecessary quotes in CSV export --- officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 913902731f29..aeddefb763c2 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1039,7 +1039,7 @@ with no exception. - true + false -- cgit From 9073d77706b0b8c32f63a5ebd2954e1d4c0a3ce9 Mon Sep 17 00:00:00 2001 From: "Ingrid Halama [iha]" Date: Thu, 27 Jan 2011 20:57:37 +0100 Subject: chart52: #28670# make the legend within charts resizeable - part 3 --- svx/inc/svx/chrtitem.hxx | 34 ---------------------------------- svx/source/items/chrtitem.cxx | 34 ---------------------------------- 2 files changed, 68 deletions(-) diff --git a/svx/inc/svx/chrtitem.hxx b/svx/inc/svx/chrtitem.hxx index 1cb9c2068f01..fdd65cb7d3c3 100644 --- a/svx/inc/svx/chrtitem.hxx +++ b/svx/inc/svx/chrtitem.hxx @@ -114,21 +114,6 @@ enum SvxChartDataDescr #define CHDESCR_COUNT (CHDESCR_TEXTANDVALUE + 1) -enum SvxChartLegendPos -{ - CHLEGEND_NONE, - CHLEGEND_LEFT, - CHLEGEND_TOP, - CHLEGEND_RIGHT, - CHLEGEND_BOTTOM, - CHLEGEND_NONE_TOP, - CHLEGEND_NONE_LEFT, - CHLEGEND_NONE_RIGHT, - CHLEGEND_NONE_BOTTOM -}; - -#define CHLEGEND_COUNT (CHLEGEND_BOTTOM + 1) - enum SvxChartTextOrder { CHTXTORDER_SIDEBYSIDE, @@ -243,25 +228,6 @@ public: //------------------------------------------------------------------ -class SVX_DLLPUBLIC SvxChartLegendPosItem : public SfxEnumItem -{ -public: - TYPEINFO(); - SvxChartLegendPosItem(SvxChartLegendPos eLegendPos /*= CHLEGEND_NONE*/, - USHORT nId ); - SvxChartLegendPosItem(SvStream& rIn, - USHORT nId ); - - virtual SfxPoolItem* Clone(SfxItemPool* pPool = 0) const; - virtual SfxPoolItem* Create(SvStream& rIn, USHORT nVer) const; - - USHORT GetValueCount() const { return CHLEGEND_COUNT; } - SvxChartLegendPos GetValue() const - { return (SvxChartLegendPos)SfxEnumItem::GetValue(); } -}; - -//------------------------------------------------------------------ - class SVX_DLLPUBLIC SvxChartTextOrderItem : public SfxEnumItem { public: diff --git a/svx/source/items/chrtitem.cxx b/svx/source/items/chrtitem.cxx index 474bf19f7bd6..bb6e9e0097b2 100644 --- a/svx/source/items/chrtitem.cxx +++ b/svx/source/items/chrtitem.cxx @@ -52,7 +52,6 @@ using namespace ::com::sun::star; TYPEINIT1_FACTORY(SvxChartStyleItem, SfxEnumItem, new SvxChartStyleItem(CHSTYLE_2D_LINE, 0)); TYPEINIT1(SvxChartDataDescrItem, SfxEnumItem); -TYPEINIT1(SvxChartLegendPosItem, SfxEnumItem); TYPEINIT1(SvxChartTextOrderItem, SfxEnumItem); TYPEINIT1(SvxChartTextOrientItem, SfxEnumItem); TYPEINIT1(SvxChartIndicateItem, SfxEnumItem); @@ -125,39 +124,6 @@ SfxPoolItem* SvxChartDataDescrItem::Create(SvStream& rIn, USHORT /*nVer*/) const return new SvxChartDataDescrItem(rIn, Which()); } -/************************************************************************* -|* -|* SvxChartLegendPosItem -|* -*************************************************************************/ - -SvxChartLegendPosItem::SvxChartLegendPosItem(SvxChartLegendPos eLegendPos, - USHORT nId) : - SfxEnumItem(nId, (USHORT)eLegendPos) -{ -} - -// ----------------------------------------------------------------------- - -SvxChartLegendPosItem::SvxChartLegendPosItem(SvStream& rIn, USHORT nId) : - SfxEnumItem(nId, rIn) -{ -} - -// ----------------------------------------------------------------------- - -SfxPoolItem* SvxChartLegendPosItem::Clone(SfxItemPool* /*pPool*/) const -{ - return new SvxChartLegendPosItem(*this); -} - -// ----------------------------------------------------------------------- - -SfxPoolItem* SvxChartLegendPosItem::Create(SvStream& rIn, USHORT /*nVer*/) const -{ - return new SvxChartLegendPosItem(rIn, Which()); -} - /************************************************************************* |* |* SvxChartTextOrderItem -- cgit From 76a4d7a1fbfdab961e4cc936eb99c1db8bc41bb1 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 28 Jan 2011 11:24:21 +0100 Subject: gridsort: #164359# Fixed side pane broken due to inconsistent entries of tabwindowservice in fwl.component and Library_fwk.ml --- framework/util/fwk.component | 3 +++ framework/util/fwl.component | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/util/fwk.component b/framework/util/fwk.component index e6ceb91e8090..c460ecbccd70 100644 --- a/framework/util/fwk.component +++ b/framework/util/fwk.component @@ -139,4 +139,7 @@ + + + diff --git a/framework/util/fwl.component b/framework/util/fwl.component index aa124d1cdc4b..99c5ca7213e6 100644 --- a/framework/util/fwl.component +++ b/framework/util/fwl.component @@ -85,9 +85,6 @@ - - - -- cgit From fcad8a5c8b77bfc6b3cb41d7465147ad157d0124 Mon Sep 17 00:00:00 2001 From: Andreas Bregas Date: Fri, 11 Feb 2011 15:06:12 +0100 Subject: ab80: Adding changes of cws mib21, ab77, ab77run2, dr77i to dev300 ab77: #163789# Handle class module factories document specific ab77: #163732# Defer removal of documents until XCloseListener::notifyClosing ab77: #163808# make VBA symbols Application.ScreenUpdating and Application.Interactive work globally on all documents ab77: wae ab77: #163840# read UTF-8 BOM ab77: #163732# VBA UserForm_Terminate triggered too late while closing document ab77: minor correction ab77: assertion: do not call ::rtl::OUString::copy() with negative index ab77run2: #163869# do not call Class_Terminate VBA macros when document disposes dr77i: #163941# do not update drawing layer when pasting from clipboard after cut mib21: #163944# ignore trailing whitespace in Basic source lines mib21: #163948# allow to manually pack MSVC DLLs into extensions mib21: #163948# multiprocess build fix Authors: Andreas Bregas Daniel Rentz [dr] Eike Rathke [er] --- basic/inc/basic/sbstar.hxx | 2 + basic/source/basmgr/makefile.mk | 3 +- basic/source/classes/sb.cxx | 193 +++++++++++++++++++--- basic/source/classes/sbxmod.cxx | 103 ++++++++---- basic/source/comp/scanner.cxx | 20 ++- ucb/source/ucp/tdoc/tdoc_docmgr.cxx | 105 ++++++++++-- ucb/source/ucp/tdoc/tdoc_docmgr.hxx | 34 +++- vbahelper/source/vbahelper/vbaapplicationbase.cxx | 13 +- vbahelper/source/vbahelper/vbadocumentbase.cxx | 13 +- vbahelper/source/vbahelper/vbadocumentsbase.cxx | 61 ++++++- 10 files changed, 447 insertions(+), 100 deletions(-) diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx index db67836890e9..00bfd4a9717b 100644 --- a/basic/inc/basic/sbstar.hxx +++ b/basic/inc/basic/sbstar.hxx @@ -48,6 +48,7 @@ class BasicLibInfo; // info block for basic manager class SbTextPortions; class SbMethod; class BasicManager; +class DocBasicItem; class StarBASICImpl; @@ -57,6 +58,7 @@ class StarBASIC : public SbxObject friend class SbiExpression; // Access to RTL friend class SbiInstance; friend class SbiRuntime; + friend class DocBasicItem; StarBASICImpl* mpStarBASICImpl; diff --git a/basic/source/basmgr/makefile.mk b/basic/source/basmgr/makefile.mk index e08e9cc753bd..d177379f32b8 100644 --- a/basic/source/basmgr/makefile.mk +++ b/basic/source/basmgr/makefile.mk @@ -39,7 +39,8 @@ ENABLE_EXCEPTIONS=TRUE SLOFILES= \ $(SLO)$/basmgr.obj \ - $(SLO)$/basicmanagerrepository.obj + $(SLO)$/basicmanagerrepository.obj \ + $(SLO)$/vbahelper.obj # --- Targets ------------------------------------------------------------- diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 30e01892fab9..87c26805b18f 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -55,8 +55,12 @@ #include "sb.hrc" #include #include +#include #include +#include +#include #include "errobject.hxx" +#include #include #include @@ -80,6 +84,143 @@ using com::sun::star::lang::XMultiServiceFactory; const static String aThisComponent( RTL_CONSTASCII_USTRINGPARAM("ThisComponent") ); const static String aVBAHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) ); +// ============================================================================ + +class DocBasicItem : public ::cppu::WeakImplHelper1< util::XCloseListener > +{ +public: + explicit DocBasicItem( StarBASIC& rDocBasic ); + virtual ~DocBasicItem(); + + inline const SbxObjectRef& getClassModules() const { return mxClassModules; } + inline bool isDocClosed() const { return mbDocClosed; } + + void clearDependingVarsOnDelete( StarBASIC& rDeletedBasic ); + + void startListening(); + void stopListening(); + + virtual void SAL_CALL queryClosing( const lang::EventObject& rSource, sal_Bool bGetsOwnership ) throw (util::CloseVetoException, uno::RuntimeException); + virtual void SAL_CALL notifyClosing( const lang::EventObject& rSource ) throw (uno::RuntimeException); + virtual void SAL_CALL disposing( const lang::EventObject& rSource ) throw (uno::RuntimeException); + +private: + StarBASIC& mrDocBasic; + SbxObjectRef mxClassModules; + bool mbDocClosed; + bool mbDisposed; +}; + +// ---------------------------------------------------------------------------- + +DocBasicItem::DocBasicItem( StarBASIC& rDocBasic ) : + mrDocBasic( rDocBasic ), + mxClassModules( new SbxObject( String() ) ), + mbDocClosed( false ), + mbDisposed( false ) +{ +} + +DocBasicItem::~DocBasicItem() +{ + stopListening(); +} + +void DocBasicItem::clearDependingVarsOnDelete( StarBASIC& rDeletedBasic ) +{ + mrDocBasic.implClearDependingVarsOnDelete( &rDeletedBasic ); +} + +void DocBasicItem::startListening() +{ + Any aThisComp; + mrDocBasic.GetUNOConstant( "ThisComponent", aThisComp ); + Reference< util::XCloseBroadcaster > xCloseBC( aThisComp, UNO_QUERY ); + if( xCloseBC.is() ) + try { xCloseBC->addCloseListener( this ); } catch( uno::Exception& ) {} +} + +void DocBasicItem::stopListening() +{ + if( mbDisposed ) return; + mbDisposed = true; + Any aThisComp; + mrDocBasic.GetUNOConstant( "ThisComponent", aThisComp ); + Reference< util::XCloseBroadcaster > xCloseBC( aThisComp, UNO_QUERY ); + if( xCloseBC.is() ) + try { xCloseBC->removeCloseListener( this ); } catch( uno::Exception& ) {} +} + +void SAL_CALL DocBasicItem::queryClosing( const lang::EventObject& /*rSource*/, sal_Bool /*bGetsOwnership*/ ) throw (util::CloseVetoException, uno::RuntimeException) +{ +} + +void SAL_CALL DocBasicItem::notifyClosing( const lang::EventObject& /*rEvent*/ ) throw (uno::RuntimeException) +{ + stopListening(); + mbDocClosed = true; +} + +void SAL_CALL DocBasicItem::disposing( const lang::EventObject& /*rEvent*/ ) throw (uno::RuntimeException) +{ + stopListening(); +} + +// ---------------------------------------------------------------------------- + +namespace { + +typedef ::rtl::Reference< DocBasicItem > DocBasicItemRef; +typedef std::map< const StarBASIC*, DocBasicItemRef > DocBasicItemMap; +static DocBasicItemMap GaDocBasicItems; + +const DocBasicItem* lclFindDocBasicItem( const StarBASIC* pDocBasic ) +{ + DocBasicItemMap::iterator it = GaDocBasicItems.find( pDocBasic ); + return (it != GaDocBasicItems.end()) ? it->second.get() : 0; +} + +void lclInsertDocBasicItem( StarBASIC& rDocBasic ) +{ + DocBasicItemRef& rxDocBasicItem = GaDocBasicItems[ &rDocBasic ]; + rxDocBasicItem.set( new DocBasicItem( rDocBasic ) ); + rxDocBasicItem->startListening(); +} + +void lclRemoveDocBasicItem( StarBASIC& rDocBasic ) +{ + DocBasicItemMap::iterator it = GaDocBasicItems.find( &rDocBasic ); + if( it != GaDocBasicItems.end() ) + { + it->second->stopListening(); + GaDocBasicItems.erase( it ); + } + DocBasicItemMap::iterator it_end = GaDocBasicItems.end(); + for( it = GaDocBasicItems.begin(); it != it_end; ++it ) + it->second->clearDependingVarsOnDelete( rDocBasic ); +} + +StarBASIC* lclGetDocBasicForModule( SbModule* pModule ) +{ + StarBASIC* pRetBasic = NULL; + SbxObject* pCurParent = pModule; + while( pCurParent->GetParent() != NULL ) + { + pCurParent = pCurParent->GetParent(); + StarBASIC* pDocBasic = PTR_CAST( StarBASIC, pCurParent ); + if( pDocBasic != NULL && pDocBasic->IsDocBasic() ) + { + pRetBasic = pDocBasic; + break; + } + } + return pRetBasic; +} + +} // namespace + +// ============================================================================ + SbxObject* StarBASIC::getVBAGlobals( ) { if ( !pVBAGlobals ) @@ -461,6 +602,7 @@ SbxObject* createUserTypeImpl( const String& rClassName ) return pRetObj; } + TYPEINIT1(SbClassModuleObject,SbModule) SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) @@ -610,8 +752,12 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) SbClassModuleObject::~SbClassModuleObject() { + // do not trigger termination event when document is already closed if( StarBASIC::IsRunning() ) - triggerTerminateEvent(); + if( StarBASIC* pDocBasic = lclGetDocBasicForModule( this ) ) + if( const DocBasicItem* pDocBasicItem = lclFindDocBasicItem( pDocBasic ) ) + if( !pDocBasicItem->isDocClosed() ) + triggerTerminateEvent(); // Must be deleted by base class dtor because this data // is not owned by the SbClassModuleObject object @@ -699,8 +845,14 @@ SbClassFactory::~SbClassFactory() void SbClassFactory::AddClassModule( SbModule* pClassModule ) { + SbxObjectRef xToUseClassModules = xClassModules; + + if( StarBASIC* pDocBasic = lclGetDocBasicForModule( pClassModule ) ) + if( const DocBasicItem* pDocBasicItem = lclFindDocBasicItem( pDocBasic ) ) + xToUseClassModules = pDocBasicItem->getClassModules(); + SbxObject* pParent = pClassModule->GetParent(); - xClassModules->Insert( pClassModule ); + xToUseClassModules->Insert( pClassModule ); pClassModule->SetParent( pParent ); } @@ -717,12 +869,19 @@ SbxBase* SbClassFactory::Create( UINT16, UINT32 ) SbxObject* SbClassFactory::CreateObject( const String& rClassName ) { - SbxVariable* pVar = xClassModules->Find( rClassName, SbxCLASS_DONTCARE ); + SbxObjectRef xToUseClassModules = xClassModules; + + if( SbModule* pMod = pMOD ) + if( StarBASIC* pDocBasic = lclGetDocBasicForModule( pMod ) ) + if( const DocBasicItem* pDocBasicItem = lclFindDocBasicItem( pDocBasic ) ) + xToUseClassModules = pDocBasicItem->getClassModules(); + + SbxVariable* pVar = xToUseClassModules->Find( rClassName, SbxCLASS_OBJECT ); SbxObject* pRet = NULL; if( pVar ) { - SbModule* pMod = (SbModule*)pVar; - pRet = new SbClassModuleObject( pMod ); + SbModule* pVarMod = (SbModule*)pVar; + pRet = new SbClassModuleObject( pVarMod ); } return pRet; } @@ -734,9 +893,6 @@ SbModule* SbClassFactory::FindClass( const String& rClassName ) return pMod; } -typedef std::vector< StarBASIC* > DocBasicVector; -static DocBasicVector GaDocBasics; - StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic ) : SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASIC") ) ), bDocBasic( bIsDocBasic ) { @@ -768,7 +924,7 @@ StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic ) bQuit = FALSE; if( bDocBasic ) - GaDocBasics.push_back( this ); + lclInsertDocBasicItem( *this ); } // #51727 Override SetModified so that the modified state @@ -780,6 +936,9 @@ void StarBASIC::SetModified( BOOL b ) StarBASIC::~StarBASIC() { + // Needs to be first action as it can trigger events + disposeComVariablesForBasic( this ); + if( !--GetSbData()->nInst ) { RemoveFactory( pSBFAC ); @@ -812,20 +971,7 @@ StarBASIC::~StarBASIC() { SbxError eOld = SbxBase::GetError(); - DocBasicVector::iterator it; - for( it = GaDocBasics.begin() ; it != GaDocBasics.end() ; ++it ) - { - if( *it == this ) - { - GaDocBasics.erase( it ); - break; - } - } - for( it = GaDocBasics.begin() ; it != GaDocBasics.end() ; ++it ) - { - StarBASIC* pBasic = *it; - pBasic->implClearDependingVarsOnDelete( this ); - } + lclRemoveDocBasicItem( *this ); SbxBase::ResetError(); if( eOld != SbxERR_OK ) @@ -845,7 +991,6 @@ StarBASIC::~StarBASIC() } clearUnoMethodsForBasic( this ); - disposeComVariablesForBasic( this ); } // Override new() operator, so that everyone can create a new instance diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 0f807db7cf8f..541f3d8d6c82 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -54,11 +54,15 @@ #include #include #include -#include +#include +#include +#include #include #include #include #include +#include +#include using namespace com::sun::star; @@ -496,24 +500,18 @@ IMPL_LINK( AsyncQuitHandler, OnAsyncQuit, void*, /*pNull*/ ) return 0L; } -bool VBAUnlockControllers( StarBASIC* pBasic ) +void VBAUnlockDocuments( StarBASIC* pBasic ) { - bool bRes = false; if ( pBasic && pBasic->IsDocBasic() ) { SbUnoObject* pGlobs = dynamic_cast< SbUnoObject* >( pBasic->Find( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ThisComponent" ) ), SbxCLASS_DONTCARE ) ); - if ( pGlobs ) try - { - uno::Reference< frame::XModel > xModel( pGlobs->getUnoAny(), uno::UNO_QUERY_THROW ); - if ( xModel->hasControllersLocked() ) - xModel->unlockControllers(); - bRes = true; - } - catch( uno::Exception& ) + if ( pGlobs ) { + uno::Reference< frame::XModel > xModel( pGlobs->getUnoAny(), uno::UNO_QUERY ); + ::basic::vba::lockControllersOfAllDocuments( xModel, sal_False ); + ::basic::vba::enableContainerWindowsOfAllDocuments( xModel, sal_True ); } } - return bRes; } ///////////////////////////////////////////////////////////////////////////// @@ -1182,7 +1180,7 @@ USHORT SbModule::Run( SbMethod* pMeth ) // VBA always ensures screenupdating is enabled after completing if ( mbVBACompat ) - VBAUnlockControllers( PTR_CAST( StarBASIC, GetParent() ) ); + VBAUnlockDocuments( PTR_CAST( StarBASIC, GetParent() ) ); #ifdef DBG_TRACE_BASIC dbg_DeInitTrace(); @@ -2162,22 +2160,27 @@ void SbObjModule::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCType, } -typedef ::cppu::WeakImplHelper2< awt::XTopWindowListener, awt::XWindowListener > FormObjEventListener_BASE; +typedef ::cppu::WeakImplHelper3< + awt::XTopWindowListener, + awt::XWindowListener, + document::XEventListener > FormObjEventListener_BASE; class FormObjEventListenerImpl : public FormObjEventListener_BASE { SbUserFormModule* mpUserForm; uno::Reference< lang::XComponent > mxComponent; + uno::Reference< frame::XModel > mxModel; bool mbDisposed; sal_Bool mbOpened; sal_Bool mbActivated; sal_Bool mbShowing; - FormObjEventListenerImpl(); // not defined + FormObjEventListenerImpl(const FormObjEventListenerImpl&); // not defined + FormObjEventListenerImpl& operator=(const FormObjEventListenerImpl&); // not defined public: - FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent ) : - mpUserForm( pUserForm ), mxComponent( xComponent) , + FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent, const uno::Reference< frame::XModel >& xModel ) : + mpUserForm( pUserForm ), mxComponent( xComponent), mxModel( xModel ), mbDisposed( false ), mbOpened( sal_False ), mbActivated( sal_False ), mbShowing( sal_False ) { if ( mxComponent.is() ) @@ -2194,6 +2197,15 @@ public: } catch( uno::Exception& ) {} } + + if ( mxModel.is() ) + { + try + { + uno::Reference< document::XEventBroadcaster >( mxModel, uno::UNO_QUERY_THROW )->addEventListener( this ); + } + catch( uno::Exception& ) {} + } } virtual ~FormObjEventListenerImpl() @@ -2220,6 +2232,16 @@ public: catch( uno::Exception& ) {} } mxComponent.clear(); + + if ( mxModel.is() && !mbDisposed ) + { + try + { + uno::Reference< document::XEventBroadcaster >( mxModel, uno::UNO_QUERY_THROW )->removeEventListener( this ); + } + catch( uno::Exception& ) {} + } + mxModel.clear(); } virtual void SAL_CALL windowOpened( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) @@ -2327,13 +2349,25 @@ public: { } + virtual void SAL_CALL notifyEvent( const document::EventObject& rEvent ) throw (uno::RuntimeException) + { + // early dosposing on document event "OnUnload", to be sure Basic still exists when calling VBA "UserForm_Terminate" + if( rEvent.EventName == GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ) ) + { + removeListener(); + mbDisposed = true; + if ( mpUserForm ) + mpUserForm->ResetApiObj(); // will trigger "UserForm_Terminate" + } + } + virtual void SAL_CALL disposing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException) { OSL_TRACE("** Userform/Dialog disposing"); + removeListener(); mbDisposed = true; - mxComponent.clear(); if ( mpUserForm ) - mpUserForm->ResetApiObj(); + mpUserForm->ResetApiObj( false ); // pass false (too late to trigger VBA events here) } }; @@ -2567,30 +2601,27 @@ void SbUserFormModule::InitObject() aArgs[ 2 ] <<= m_xModel; aArgs[ 3 ] <<= rtl::OUString( GetParent()->GetName() ); pDocObject = new SbUnoObject( GetName(), uno::makeAny( xVBAFactory->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.UserForm")), aArgs ) ) ); - uno::Reference< lang::XComponent > xComponent( aArgs[ 1 ], uno::UNO_QUERY_THROW ); + + uno::Reference< lang::XComponent > xComponent( m_xDialog, uno::UNO_QUERY_THROW ); // the dialog must be disposed at the end! - if( xComponent.is() ) + StarBASIC* pParentBasic = NULL; + SbxObject* pCurObject = this; + do { - StarBASIC* pParentBasic = NULL; - SbxObject* pCurObject = this; - do - { - SbxObject* pObjParent = pCurObject->GetParent(); - pParentBasic = PTR_CAST( StarBASIC, pObjParent ); - pCurObject = pObjParent; - } - while( pParentBasic == NULL && pCurObject != NULL ); - - OSL_ASSERT( pParentBasic != NULL ); - registerComponentToBeDisposedForBasic( xComponent, pParentBasic ); + SbxObject* pObjParent = pCurObject->GetParent(); + pParentBasic = PTR_CAST( StarBASIC, pObjParent ); + pCurObject = pObjParent; } + while( pParentBasic == NULL && pCurObject != NULL ); + OSL_ASSERT( pParentBasic != NULL ); + registerComponentToBeDisposedForBasic( xComponent, pParentBasic ); - // remove old listener if it exists - if ( m_DialogListener.get() ) + // if old listener object exists, remove it from dialog and document model + if( m_DialogListener.is() ) m_DialogListener->removeListener(); - m_DialogListener = new FormObjEventListenerImpl( this, xComponent ); + m_DialogListener.set( new FormObjEventListenerImpl( this, xComponent, m_xModel ) ); triggerInitializeEvent(); } diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index 26c6af53cc56..4b917e61e179 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -152,6 +152,16 @@ static SbxDataType GetSuffixType( sal_Unicode c ) // Returnwert ist FALSE bei EOF oder Fehlern #define BUF_SIZE 80 +namespace { + +/** Returns true, if the passed character is a white space character. */ +inline bool lclIsWhitespace( sal_Unicode cChar ) +{ + return (cChar == ' ') || (cChar == '\t') || (cChar == '\f'); +} + +} // namespace + BOOL SbiScanner::NextSym() { // Fuer den EOLN-Fall merken @@ -177,7 +187,11 @@ BOOL SbiScanner::NextSym() p2 += n; while( ( n < nLen ) && ( *p2 != '\n' ) && ( *p2 != '\r' ) ) p2++, n++; - aLine = aBuf.copy( nBufPos, n - nBufPos ); + // #163944# ignore trailing whitespace + sal_Int32 nCopyEndPos = n; + while( (nBufPos < nCopyEndPos) && lclIsWhitespace( aBuf[ nCopyEndPos - 1 ] ) ) + --nCopyEndPos; + aLine = aBuf.copy( nBufPos, nCopyEndPos - nBufPos ); if( n < nLen ) { if( *p2 == '\r' && *( p2+1 ) == '\n' ) @@ -193,7 +207,7 @@ BOOL SbiScanner::NextSym() } // Leerstellen weg: - while( *pLine && (( *pLine == ' ' ) || ( *pLine == '\t' ) || ( *pLine == '\f' )) ) + while( lclIsWhitespace( *pLine ) ) pLine++, nCol++, bSpaces = TRUE; nCol1 = nCol; @@ -230,7 +244,7 @@ BOOL SbiScanner::NextSym() { const sal_Unicode* pTestLine = pLine; short nTestCol = nCol; - while( *pTestLine && (( *pTestLine == ' ' ) || ( *pTestLine == '\t' )) ) + while( lclIsWhitespace( *pTestLine ) ) { pTestLine++; nTestCol++; diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx index 46aa1ae69ec3..5bd774d618d5 100644 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx @@ -27,14 +27,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_ucb.hxx" + /************************************************************************** TODO ************************************************************************** - - filter unwanted models notified by global document event broadcaster - - help documents - - others, which I don't know yet - *************************************************************************/ #include "osl/diagnose.h" @@ -44,12 +41,13 @@ #include "comphelper/namedvaluecollection.hxx" #include "comphelper/documentinfo.hxx" +#include "com/sun/star/awt/XTopWindow.hpp" #include "com/sun/star/beans/XPropertySet.hpp" #include "com/sun/star/container/XEnumerationAccess.hpp" +#include "com/sun/star/document/XStorageBasedDocument.hpp" #include "com/sun/star/frame/XStorable.hpp" #include "com/sun/star/lang/DisposedException.hpp" -#include "com/sun/star/document/XStorageBasedDocument.hpp" -#include "com/sun/star/awt/XTopWindow.hpp" +#include "com/sun/star/util/XCloseBroadcaster.hpp" #include "tdoc_docmgr.hxx" @@ -57,6 +55,53 @@ using namespace com::sun::star; using namespace tdoc_ucp; using ::comphelper::DocumentInfo; +//========================================================================= +//========================================================================= +// +// OfficeDocumentsCloseListener Implementation. +// +//========================================================================= +//========================================================================= + +//========================================================================= +// +// util::XCloseListener +// +//========================================================================= + +// virtual +void SAL_CALL OfficeDocumentsManager::OfficeDocumentsCloseListener::queryClosing( + const lang::EventObject& /*Source*/, sal_Bool /*GetsOwnership*/ ) + throw ( util::CloseVetoException, + uno::RuntimeException ) +{ +} + +//========================================================================= +void SAL_CALL OfficeDocumentsManager::OfficeDocumentsCloseListener::notifyClosing( + const lang::EventObject& Source ) + throw ( uno::RuntimeException ) +{ + document::EventObject aDocEvent; + aDocEvent.Source = Source.Source; + aDocEvent.EventName = rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( "OfficeDocumentsListener::notifyClosing" ) ); + m_pManager->notifyEvent( aDocEvent ); +} + +//========================================================================= +// +// lang::XEventListener (base of util::XCloseListener) +// +//========================================================================= + +// virtual +void SAL_CALL OfficeDocumentsManager::OfficeDocumentsCloseListener::disposing( + const lang::EventObject& /*Source*/ ) + throw ( uno::RuntimeException ) +{ +} + //========================================================================= //========================================================================= // @@ -70,7 +115,8 @@ OfficeDocumentsManager::OfficeDocumentsManager( OfficeDocumentsEventListener * pDocEventListener ) : m_xSMgr( xSMgr ), m_xDocEvtNotifier( createDocumentEventNotifier( xSMgr ) ), - m_pDocEventListener( pDocEventListener ) + m_pDocEventListener( pDocEventListener ), + m_xDocCloseListener( new OfficeDocumentsCloseListener( this ) ) { if ( m_xDocEvtNotifier.is() ) { @@ -188,10 +234,19 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( OSL_ENSURE( xStorage.is(), "Got no document storage!" ); rtl:: OUString aDocId = getDocumentId( Event.Source ); - rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) ); + rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( + uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) ); m_aDocs[ aDocId ] = StorageInfo( aTitle, xStorage, xModel ); + uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( + Event.Source, uno::UNO_QUERY ); + OSL_ENSURE( xCloseBroadcaster.is(), + "OnLoadFinished/OnCreate event: got no close broadcaster!" ); + + if ( xCloseBroadcaster.is() ) + xCloseBroadcaster->addCloseListener( m_xDocCloseListener ); + // Propagate document closure. OSL_ENSURE( m_pDocEventListener, "OnLoadFinished/OnCreate event: no owner for insert event propagation!" ); @@ -202,12 +257,18 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( } } else if ( Event.EventName.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( "OnUnload" ) ) ) + RTL_CONSTASCII_STRINGPARAM( "OfficeDocumentsListener::notifyClosing" ) ) ) { if ( isOfficeDocument( Event.Source ) ) { // Document has been closed (unloaded) + // #163732# - Official event "OnUnload" does not work here. Event + // gets fired to early. Other OnUnload listeners called after this + // listener may still need TDOC access to the document. Remove the + // document from TDOC docs list on XCloseListener::notifyClosing. + // See OfficeDocumentsManager::OfficeDocumentsListener::notifyClosing. + osl::MutexGuard aGuard( m_aMtx ); uno::Reference< frame::XModel > @@ -228,8 +289,6 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( rtl::OUString aDocId( (*it).first ); m_pDocEventListener->notifyDocumentClosed( aDocId ); } - - break; } ++it; @@ -238,8 +297,18 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( OSL_ENSURE( it != m_aDocs.end(), "OnUnload event notified for unknown document!" ); - if( it != m_aDocs.end() ) + if ( it != m_aDocs.end() ) + { + uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( + Event.Source, uno::UNO_QUERY ); + OSL_ENSURE( xCloseBroadcaster.is(), + "OnUnload event: got no XCloseBroadcaster from XModel" ); + + if ( xCloseBroadcaster.is() ) + xCloseBroadcaster->removeCloseListener( m_xDocCloseListener ); + m_aDocs.erase( it ); + } } } else if ( Event.EventName.equalsAsciiL( @@ -307,7 +376,7 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( (*it).second.xStorage = xStorage; // Adjust title. - (*it).second.aTitle = DocumentInfo::getDocumentTitle( uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) ); + (*it).second.aTitle = DocumentInfo::getDocumentTitle( xModel ); break; } ++it; @@ -334,7 +403,7 @@ void SAL_CALL OfficeDocumentsManager::notifyEvent( if ( (*it).second.xModel == xModel ) { // Adjust title. - rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( uno::Reference< frame::XModel >( Event.Source, uno::UNO_QUERY ) ); + rtl:: OUString aTitle = DocumentInfo::getDocumentTitle( xModel ); (*it).second.aTitle = aTitle; // Adjust storage. @@ -475,6 +544,14 @@ void OfficeDocumentsManager::buildDocumentsList() m_aDocs[ aDocId ] = StorageInfo( aTitle, xStorage, xModel ); + + uno::Reference< util::XCloseBroadcaster > xCloseBroadcaster( + xModel, uno::UNO_QUERY ); + OSL_ENSURE( xCloseBroadcaster.is(), + "buildDocumentsList: got no close broadcaster!" ); + + if ( xCloseBroadcaster.is() ) + xCloseBroadcaster->addCloseListener( m_xDocCloseListener ); } } } diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx index 8f8b2fc117f0..b1c0ed41d9d9 100644 --- a/ucb/source/ucp/tdoc/tdoc_docmgr.hxx +++ b/ucb/source/ucp/tdoc/tdoc_docmgr.hxx @@ -39,6 +39,7 @@ #include "com/sun/star/embed/XStorage.hpp" #include "com/sun/star/frame/XModel.hpp" #include "com/sun/star/frame/XModuleManager.hpp" +#include "com/sun/star/util/XCloseListener.hpp" namespace tdoc_ucp { @@ -88,6 +89,33 @@ namespace tdoc_ucp { class OfficeDocumentsManager : public cppu::WeakImplHelper1< com::sun::star::document::XEventListener > { + class OfficeDocumentsCloseListener : + public cppu::WeakImplHelper1< com::sun::star::util::XCloseListener > + + { + public: + OfficeDocumentsCloseListener( OfficeDocumentsManager * pMgr ) + : m_pManager( pMgr ) {}; + + // util::XCloseListener + virtual void SAL_CALL queryClosing( + const ::com::sun::star::lang::EventObject& Source, + ::sal_Bool GetsOwnership ) + throw (::com::sun::star::util::CloseVetoException, + ::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL notifyClosing( + const ::com::sun::star::lang::EventObject& Source ) + throw (::com::sun::star::uno::RuntimeException); + + // lang::XEventListener (base of util::XCloseListener) + virtual void SAL_CALL disposing( + const com::sun::star::lang::EventObject & Source ) + throw ( com::sun::star::uno::RuntimeException ); + private: + OfficeDocumentsManager * m_pManager; + }; + public: OfficeDocumentsManager( const com::sun::star::uno::Reference< @@ -131,7 +159,9 @@ namespace tdoc_ucp { createDocumentEventNotifier( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rXSMgr ); + void buildDocumentsList(); + bool isOfficeDocument( const com::sun::star::uno::Reference< @@ -163,9 +193,11 @@ namespace tdoc_ucp { com::sun::star::uno::Reference< com::sun::star::document::XEventBroadcaster > m_xDocEvtNotifier; com::sun::star::uno::Reference< - com::sun::star::frame::XModuleManager > m_xModuleMgr; + com::sun::star::frame::XModuleManager > m_xModuleMgr; DocumentList m_aDocs; OfficeDocumentsEventListener * m_pDocEventListener; + com::sun::star::uno::Reference< + com::sun::star::util::XCloseListener > m_xDocCloseListener; }; } // namespace tdoc_ucp diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index bddd756f6836..54d280094f2c 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include "vbacommandbars.hxx" @@ -200,10 +201,8 @@ void SAL_CALL VbaApplicationBase::setScreenUpdating(sal_Bool bUpdate) throw (uno::RuntimeException) { uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW ); - if (bUpdate) - xModel->unlockControllers(); - else - xModel->lockControllers(); + // #163808# use helper from module "basic" to lock all documents of this application + ::basic::vba::lockControllersOfAllDocuments( xModel, !bUpdate ); } sal_Bool SAL_CALL @@ -262,10 +261,8 @@ void SAL_CALL VbaApplicationBase::setInteractive( ::sal_Bool bInteractive ) throw (uno::RuntimeException) { uno::Reference< frame::XModel > xModel( getCurrentDocument(), uno::UNO_QUERY_THROW ); - uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW ); - uno::Reference< awt::XWindow > xWindow( xFrame->getContainerWindow(), uno::UNO_SET_THROW ); - - xWindow->setEnable( bInteractive ); + // #163808# use helper from module "basic" to enable/disable all container windows of all documents of this application + ::basic::vba::enableContainerWindowsOfAllDocuments( xModel, bInteractive ); } sal_Bool SAL_CALL VbaApplicationBase::getVisible() throw (uno::RuntimeException) diff --git a/vbahelper/source/vbahelper/vbadocumentbase.cxx b/vbahelper/source/vbahelper/vbadocumentbase.cxx index 0df38b003556..087e7188c8f6 100644 --- a/vbahelper/source/vbahelper/vbadocumentbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentbase.cxx @@ -86,11 +86,14 @@ VbaDocumentBase::getName() throw (uno::RuntimeException) ::rtl::OUString VbaDocumentBase::getPath() throw (uno::RuntimeException) { - INetURLObject aURL( getModel()->getURL() ); - rtl::OUString sURL( aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) ); - sURL = sURL.copy( 0, sURL.getLength() - aURL.GetLastName().getLength() - 1 ); - rtl::OUString sPath; - ::osl::File::getSystemPathFromFileURL( sURL, sPath ); + INetURLObject aURL( getModel()->getURL() ); + rtl::OUString sURL = aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ); + rtl::OUString sPath; + if( sURL.getLength() > 0 ) + { + sURL = sURL.copy( 0, sURL.getLength() - aURL.GetLastName().getLength() - 1 ); + ::osl::File::getSystemPathFromFileURL( sURL, sPath ); + } return sPath; } diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx index f2b70ab231c7..b65a58542b92 100644 --- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx @@ -24,7 +24,9 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#include + +#include "vbahelper/vbadocumentsbase.hxx" + #include #include #include @@ -49,10 +51,12 @@ #include #include #include -#include #include #include +#include "vbahelper/vbahelper.hxx" +#include "vbahelper/vbaapplicationbase.hxx" + using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -213,8 +217,39 @@ VbaDocumentsBase::VbaDocumentsBase( const uno::Reference< XHelperInterface >& xP { } +namespace { + +void lclSetupComponent( const uno::Reference< lang::XComponent >& rxComponent, sal_Bool bScreenUpdating, sal_Bool bInteractive ) +{ + if( !bScreenUpdating ) try + { + uno::Reference< frame::XModel >( rxComponent, uno::UNO_QUERY_THROW )->lockControllers(); + } + catch( uno::Exception& ) + { + } + + if( !bInteractive ) try + { + uno::Reference< frame::XModel > xModel( rxComponent, uno::UNO_QUERY_THROW ); + uno::Reference< frame::XController > xController( xModel->getCurrentController(), uno::UNO_SET_THROW ); + uno::Reference< frame::XFrame > xFrame( xController->getFrame(), uno::UNO_SET_THROW ); + uno::Reference< awt::XWindow >( xFrame->getContainerWindow(), uno::UNO_SET_THROW )->setEnable( sal_False ); + } + catch( uno::Exception& ) + { + } +} + +} // namespace + uno::Any VbaDocumentsBase::createDocument() throw (uno::RuntimeException) { + // #163808# determine state of Application.ScreenUpdating and Application.Interactive symbols (before new document is opened) + uno::Reference< XApplicationBase > xApplication( Application(), uno::UNO_QUERY ); + sal_Bool bScreenUpdating = !xApplication.is() || xApplication->getScreenUpdating(); + sal_Bool bInteractive = !xApplication.is() || xApplication->getInteractive(); + uno::Reference< lang::XMultiComponentFactory > xSMgr( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); @@ -240,6 +275,10 @@ uno::Any VbaDocumentsBase::createDocument() throw (uno::RuntimeException) sURL , rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_blank") ), 0, aMediaDesc.getAsConstPropertyValueList() ); + + // #163808# lock document controllers and container window if specified by application + lclSetupComponent( xComponent, bScreenUpdating, bInteractive ); + return uno::makeAny( xComponent ); } @@ -259,6 +298,11 @@ void VbaDocumentsBase::closeDocuments() throw (uno::RuntimeException) // #TODO# #FIXME# can any of the unused params below be used? uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException) { + // #163808# determine state of Application.ScreenUpdating and Application.Interactive symbols (before new document is opened) + uno::Reference< XApplicationBase > xApplication( Application(), uno::UNO_QUERY ); + sal_Bool bScreenUpdating = !xApplication.is() || xApplication->getScreenUpdating(); + sal_Bool bInteractive = !xApplication.is() || xApplication->getInteractive(); + // we need to detect if this is a URL, if not then assume its a file path rtl::OUString aURL; INetURLObject aObj; @@ -282,19 +326,16 @@ uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const u uno::Sequence< beans::PropertyValue > sProps( rProps ); sProps.realloc( sProps.getLength() + 1 ); sProps[ sProps.getLength() - 1 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("MacroExecutionMode") ); - sProps[ sProps.getLength() - 1 ].Value <<= uno::makeAny( document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN ); - - sal_Int32 nIndex = sProps.getLength() - 1; + sProps[ sProps.getLength() - 1 ].Value <<= document::MacroExecMode::ALWAYS_EXECUTE_NO_WARN; if ( ReadOnly.hasValue() ) { sal_Bool bIsReadOnly = sal_False; ReadOnly >>= bIsReadOnly; if ( bIsReadOnly ) { - static const rtl::OUString sReadOnly( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ); sProps.realloc( sProps.getLength() + 1 ); - sProps[ nIndex ].Name = sReadOnly; - sProps[ nIndex++ ].Value = uno::makeAny( (sal_Bool)sal_True ); + sProps[ sProps.getLength() - 1 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ReadOnly") ); + sProps[ sProps.getLength() - 1 ].Value <<= true; } } @@ -302,6 +343,10 @@ uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const u rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_default") ), frame::FrameSearchFlag::CREATE, sProps); + + // #163808# lock document controllers and container window if specified by application + lclSetupComponent( xComponent, bScreenUpdating, bInteractive ); + return uno::makeAny( xComponent ); } -- cgit From e5e1326484ae73223c18d2d069ab598de38dcf3a Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Fri, 18 Feb 2011 15:28:11 +0100 Subject: masterfix DEV300: #i10000# cxx removed --- basic/source/basmgr/makefile.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basic/source/basmgr/makefile.mk b/basic/source/basmgr/makefile.mk index d177379f32b8..b4855d5bb950 100644 --- a/basic/source/basmgr/makefile.mk +++ b/basic/source/basmgr/makefile.mk @@ -39,8 +39,8 @@ ENABLE_EXCEPTIONS=TRUE SLOFILES= \ $(SLO)$/basmgr.obj \ - $(SLO)$/basicmanagerrepository.obj \ - $(SLO)$/vbahelper.obj + $(SLO)$/basicmanagerrepository.obj +# $(SLO)$/vbahelper.obj # --- Targets ------------------------------------------------------------- -- cgit From fc6f2208c54e02008839d1289631898721878340 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Fri, 18 Feb 2011 15:28:53 +0100 Subject: masterfix DEV300: #i10000# include removed --- basic/source/classes/sbxmod.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 592d69c514a0..2cf098655d8f 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -54,7 +54,7 @@ #include #include #include -#include +//#include #include #include #include -- cgit From 2ea89ad160dd6b03bfbbc0758ef95b49a02256ba Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 21 Feb 2011 12:34:10 +0100 Subject: masterfix DEV300: #i10000# added missing file --- basic/inc/basic/vbahelper.hxx | 86 ++++++++++++++++ basic/source/basmgr/makefile.mk | 4 +- basic/source/basmgr/vbahelper.cxx | 212 ++++++++++++++++++++++++++++++++++++++ basic/source/classes/sbxmod.cxx | 2 +- 4 files changed, 301 insertions(+), 3 deletions(-) create mode 100755 basic/inc/basic/vbahelper.hxx create mode 100755 basic/source/basmgr/vbahelper.cxx diff --git a/basic/inc/basic/vbahelper.hxx b/basic/inc/basic/vbahelper.hxx new file mode 100755 index 000000000000..0d99387965fe --- /dev/null +++ b/basic/inc/basic/vbahelper.hxx @@ -0,0 +1,86 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef BASIC_VBAHELPR_HXX +#define BASIC_VBAHELPR_HXX + +#include + +namespace basic { +namespace vba { + +/* This header contains public helper functions for VBA used from this module + and from other VBA implementation modules such as vbahelper. + */ + +// ============================================================================ + +/** Locks or unlocks the controllers of all documents that have the same type + as the specified document. + + First, the global module manager (com.sun.star.frame.ModuleManager) is + asked for the type of the passed model, and all open documents with the + same type will be locked or unlocked. + + @param rxModel + A document model determining the type of the documents to be locked or + unlocked. + + @param bLockControllers + Passing true will lock all controllers, passing false will unlock them. + */ +void lockControllersOfAllDocuments( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel, + sal_Bool bLockControllers ); + +// ============================================================================ + +/** Enables or disables the container windows of all controllers of all + documents that have the same type as the specified document. + + First, the global module manager (com.sun.star.frame.ModuleManager) is + asked for the type of the passed model, and the container windows of all + open documents with the same type will be enabled or disabled. + + @param rxModel + A document model determining the type of the documents to be enabled or + disabled. + + @param bEnableWindows + Passing true will enable all container windows of all controllers, + passing false will disable them. + */ +void enableContainerWindowsOfAllDocuments( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxModel, + sal_Bool bEnableWindows ); + +// ============================================================================ + +} // namespace vba +} // namespace basic + +#endif diff --git a/basic/source/basmgr/makefile.mk b/basic/source/basmgr/makefile.mk index b4855d5bb950..615a8e8465ef 100644 --- a/basic/source/basmgr/makefile.mk +++ b/basic/source/basmgr/makefile.mk @@ -39,8 +39,8 @@ ENABLE_EXCEPTIONS=TRUE SLOFILES= \ $(SLO)$/basmgr.obj \ - $(SLO)$/basicmanagerrepository.obj -# $(SLO)$/vbahelper.obj + $(SLO)$/basicmanagerrepository.obj\ + $(SLO)$/vbahelper.obj # --- Targets ------------------------------------------------------------- diff --git a/basic/source/basmgr/vbahelper.cxx b/basic/source/basmgr/vbahelper.cxx new file mode 100755 index 000000000000..a09446f2e40b --- /dev/null +++ b/basic/source/basmgr/vbahelper.cxx @@ -0,0 +1,212 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_basic.hxx" + +#include "basic/vbahelper.hxx" +#include +#include +#include +#include +#include +#include + +namespace basic { +namespace vba { + +using namespace ::com::sun::star; + +// ============================================================================ + +namespace { + +/** Creates the global module manager needed to identify the type of documents. + */ +uno::Reference< frame::XModuleManager > lclCreateModuleManager() +{ + uno::Reference< frame::XModuleManager > xModuleManager; + try + { + uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), uno::UNO_SET_THROW ); + xModuleManager.set( xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ) ) ), uno::UNO_QUERY ); + } + catch( uno::Exception& ) + { + } + OSL_ENSURE( xModuleManager.is(), "::basic::vba::lclCreateModuleManager - cannot create module manager" ); + return xModuleManager; +} + +// ---------------------------------------------------------------------------- + +/** Returns the document service name of the specified document. + */ +::rtl::OUString lclIdentifyDocument( const uno::Reference< frame::XModuleManager >& rxModuleManager, const uno::Reference< frame::XModel >& rxModel ) +{ + ::rtl::OUString aServiceName; + if( rxModuleManager.is() ) + { + try + { + aServiceName = rxModuleManager->identify( rxModel ); + } + catch( uno::Exception& ) + { + } + OSL_ENSURE( aServiceName.getLength() > 0, "::basic::vba::lclIdentifyDocument - cannot identify document" ); + } + return aServiceName; +} + +// ---------------------------------------------------------------------------- + +/** Returns an enumeration of all open documents. + */ +uno::Reference< container::XEnumeration > lclCreateDocumentEnumeration() +{ + uno::Reference< container::XEnumeration > xEnumeration; + try + { + uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), uno::UNO_SET_THROW ); + uno::Reference< frame::XDesktop > xDesktop( xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ) ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XEnumerationAccess > xComponentsEA( xDesktop->getComponents(), uno::UNO_SET_THROW ); + xEnumeration = xComponentsEA->createEnumeration(); + + } + catch( uno::Exception& ) + { + } + OSL_ENSURE( xEnumeration.is(), "::basic::vba::lclCreateDocumentEnumeration - cannot create enumeration of all documents" ); + return xEnumeration; +} + +// ---------------------------------------------------------------------------- + +/** Locks or unlocks the controllers of the specified document model. + */ +void lclLockControllers( const uno::Reference< frame::XModel >& rxModel, sal_Bool bLockControllers ) +{ + if( rxModel.is() ) try + { + if( bLockControllers ) + rxModel->lockControllers(); + else + rxModel->unlockControllers(); + } + catch( uno::Exception& ) + { + } +} + +// ---------------------------------------------------------------------------- + +/** Enables or disables the container windows of all controllers of the + specified document model. + */ +void lclEnableContainerWindows( const uno::Reference< frame::XModel >& rxModel, sal_Bool bEnableWindows ) +{ + try + { + uno::Reference< frame::XModel2 > xModel2( rxModel, uno::UNO_QUERY_THROW ); + uno::Reference< container::XEnumeration > xControllersEnum( xModel2->getControllers(), uno::UNO_SET_THROW ); + // iterate over all controllers + while( xControllersEnum->hasMoreElements() ) + { + try + { + uno::Reference< frame::XController > xController( xControllersEnum->nextElement(), uno::UNO_QUERY_THROW ); + uno::Reference< frame::XFrame > xFrame( xController->getFrame(), uno::UNO_SET_THROW ); + uno::Reference< awt::XWindow > xWindow( xFrame->getContainerWindow(), uno::UNO_SET_THROW ); + xWindow->setEnable( bEnableWindows ); + } + catch( uno::Exception& ) + { + } + } + } + catch( uno::Exception& ) + { + } +} + +// ---------------------------------------------------------------------------- + +typedef void (*ModifyDocumentFunc)( const uno::Reference< frame::XModel >&, sal_Bool ); + +/** Implementation iterating over all documents that have the same type as the + specified model, and calling the passed functor. + */ +void lclIterateDocuments( ModifyDocumentFunc pModifyDocumentFunc, const uno::Reference< frame::XModel >& rxModel, sal_Bool bModificator ) +{ + uno::Reference< frame::XModuleManager > xModuleManager = lclCreateModuleManager(); + uno::Reference< container::XEnumeration > xDocumentsEnum = lclCreateDocumentEnumeration(); + ::rtl::OUString aIdentifier = lclIdentifyDocument( xModuleManager, rxModel ); + if( xModuleManager.is() && xDocumentsEnum.is() && (aIdentifier.getLength() > 0) ) + { + // iterate over all open documents + while( xDocumentsEnum->hasMoreElements() ) + { + try + { + uno::Reference< frame::XModel > xCurrModel( xDocumentsEnum->nextElement(), uno::UNO_QUERY_THROW ); + ::rtl::OUString aCurrIdentifier = lclIdentifyDocument( xModuleManager, xCurrModel ); + if( aCurrIdentifier == aIdentifier ) + pModifyDocumentFunc( xCurrModel, bModificator ); + } + catch( uno::Exception& ) + { + } + } + } + else + { + // no module manager, no documents enumeration, no identifier -> at least process the passed document + pModifyDocumentFunc( rxModel, bModificator ); + } +} + +} // namespace + +// ============================================================================ + +void lockControllersOfAllDocuments( const uno::Reference< frame::XModel >& rxModel, sal_Bool bLockControllers ) +{ + lclIterateDocuments( &lclLockControllers, rxModel, bLockControllers ); +} + +// ============================================================================ + +void enableContainerWindowsOfAllDocuments( const uno::Reference< frame::XModel >& rxModel, sal_Bool bEnableWindows ) +{ + lclIterateDocuments( &lclEnableContainerWindows, rxModel, bEnableWindows ); +} + +// ============================================================================ + +} // namespace vba +} // namespace basic diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 2cf098655d8f..592d69c514a0 100755 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -54,7 +54,7 @@ #include #include #include -//#include +#include #include #include #include -- cgit From 87c0b74710557e0ae8669f0873a7e49dff222ff4 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Mon, 21 Feb 2011 13:41:58 +0100 Subject: masterfix DEV300: #i10000# init order fix --- sfx2/source/dialog/dinfdlg.cxx | 4 ++-- sfx2/source/dialog/mgetempl.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 690a514a91f5..2d5c383f8b89 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2395,9 +2395,9 @@ void CustomPropertiesControl::AddLine( const ::rtl::OUString& sName, Any& rAny, SfxCustomPropertiesPage::SfxCustomPropertiesPage( Window* pParent, const SfxItemSet& rItemSet ) : SfxTabPage( pParent, SfxResId( TP_CUSTOMPROPERTIES ), rItemSet ), - m_aPropertiesFT ( this, SfxResId( FT_PROPERTIES ) ), m_aPropertiesCtrl ( this, SfxResId( CTRL_PROPERTIES ) ), - m_aAddBtn ( this, SfxResId( BTN_ADD ) ) + m_aAddBtn ( this, SfxResId( BTN_ADD ) ), + m_aPropertiesFT ( this, SfxResId( FT_PROPERTIES ) ) { FreeResource(); diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 454c42896cfe..5cac88236f4a 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -77,9 +77,9 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem aFilterFt ( this, SfxResId( FT_REGION ) ), aFilterLb ( this, SfxResId( LB_REGION ) ), + aDescGb ( this, SfxResId( GB_DESC ) ), aDescFt ( this, SfxResId( FT_DESC ) ), aDescED ( this, SfxResId( ED_DESC ) ), - aDescGb ( this, SfxResId( GB_DESC ) ), pStyle( &( (SfxStyleDialog*)pParent->GetParent() )->GetStyleSheet() ), -- cgit From 4fba42e5f98fcc0fa9addf41a793c1d7f11602c8 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 22 Feb 2011 19:07:34 +0100 Subject: masterfix DEV300: #i10000# usage of L10N build_type --- avmedia/prj/build.lst | 2 +- basic/prj/build.lst | 2 +- connectivity/prj/build.lst | 2 +- desktop/prj/build.lst | 2 +- editeng/prj/build.lst | 2 +- fpicker/prj/build.lst | 2 +- framework/prj/build.lst | 2 +- officecfg/prj/build.lst | 2 +- readlicense_oo/prj/build.lst | 2 +- sfx2/prj/build.lst | 2 +- shell/prj/build.lst | 2 +- svx/prj/build.lst | 2 +- sysui/prj/build.lst | 2 +- uui/prj/build.lst | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/avmedia/prj/build.lst b/avmedia/prj/build.lst index 2348b606dcab..7d9343b916fd 100644 --- a/avmedia/prj/build.lst +++ b/avmedia/prj/build.lst @@ -1,4 +1,4 @@ -av avmedia : l10n tools sfx2 LIBXSLT:libxslt NULL +av avmedia : L10N:l10n tools sfx2 LIBXSLT:libxslt NULL av avmedia usr1 - all av_mkout NULL av avmedia\prj get - all av_prj NULL av avmedia\inc get - all av_inv NULL diff --git a/basic/prj/build.lst b/basic/prj/build.lst index 8eab007313ec..17a34fa5bd9f 100644 --- a/basic/prj/build.lst +++ b/basic/prj/build.lst @@ -1,4 +1,4 @@ -sb basic : l10n offuh oovbaapi svtools xmlscript framework salhelper LIBXSLT:libxslt NULL +sb basic : L10N:l10n offuh oovbaapi svtools xmlscript framework salhelper LIBXSLT:libxslt NULL sb basic usr1 - all sb_mkout NULL sb basic\inc nmake - all sb_inc NULL sb basic\source\app nmake - all sb_app sb_class sb_inc NULL diff --git a/connectivity/prj/build.lst b/connectivity/prj/build.lst index 8d16197961fa..509b61cc6f9a 100644 --- a/connectivity/prj/build.lst +++ b/connectivity/prj/build.lst @@ -1,4 +1,4 @@ -cn connectivity : shell l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb qadevOOo officecfg NSS:nss LIBXSLT:libxslt NULL +cn connectivity : shell L10N:l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb qadevOOo officecfg NSS:nss LIBXSLT:libxslt NULL cn connectivity usr1 - all cn_mkout NULL cn connectivity\inc nmake - all cn_inc NULL cn connectivity\com\sun\star\sdbcx\comp\hsqldb nmake - all cn_jhsqldbdb cn_hsqldb cn_inc NULL diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst index 146579cab8bc..fc782c35a71b 100644 --- a/desktop/prj/build.lst +++ b/desktop/prj/build.lst @@ -1,4 +1,4 @@ -dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh filter LIBXSLT:libxslt NULL +dt desktop : L10N:l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh filter LIBXSLT:libxslt NULL dt desktop usr1 - all dt_mkout NULL dt desktop\inc nmake - all dt_inc NULL dt desktop\prj get - all dt_prj NULL diff --git a/editeng/prj/build.lst b/editeng/prj/build.lst index 3c714c6dac25..bba7f2666744 100644 --- a/editeng/prj/build.lst +++ b/editeng/prj/build.lst @@ -1,3 +1,3 @@ -ed editeng : l10n svtools xmloff linguistic NULL +ed editeng : L10N:l10n svtools xmloff linguistic NULL ed editeng\prj nmake - all ed_prj NULL diff --git a/fpicker/prj/build.lst b/fpicker/prj/build.lst index 52d99ec0759a..1be09c5d8fd1 100644 --- a/fpicker/prj/build.lst +++ b/fpicker/prj/build.lst @@ -1,4 +1,4 @@ -fp fpicker : LIBXSLT:libxslt l10n rdbmaker svtools NULL +fp fpicker : LIBXSLT:libxslt L10N:l10n rdbmaker svtools NULL fp fpicker\inc nmake - all fp_inc NULL fp fpicker\source\generic nmake - all fp_generic fp_inc NULL fp fpicker\source\office nmake - all fp_office fp_inc NULL diff --git a/framework/prj/build.lst b/framework/prj/build.lst index 2c847918fee4..8fe5b3b2f0ef 100644 --- a/framework/prj/build.lst +++ b/framework/prj/build.lst @@ -1,2 +1,2 @@ -fr framework : LIBXSLT:libxslt l10n svtools NULL +fr framework : LIBXSLT:libxslt L10N:l10n svtools NULL fr framework\prj nmake - all fr_all NULL diff --git a/officecfg/prj/build.lst b/officecfg/prj/build.lst index 04d2cfd87aef..b07a34aee982 100644 --- a/officecfg/prj/build.lst +++ b/officecfg/prj/build.lst @@ -1,4 +1,4 @@ -oc officecfg : l10n soltools solenv LIBXSLT:libxslt NULL +oc officecfg : L10N:l10n soltools solenv LIBXSLT:libxslt NULL oc officecfg usr1 - all oc_mkout NULL oc officecfg\registry\schema nmake - all oc_reg_schema NULL oc officecfg\registry nmake - all oc_reg NULL diff --git a/readlicense_oo/prj/build.lst b/readlicense_oo/prj/build.lst index 987672db4ebe..bf438e28fe1d 100644 --- a/readlicense_oo/prj/build.lst +++ b/readlicense_oo/prj/build.lst @@ -1,4 +1,4 @@ -ro readlicense_oo : l10n solenv LIBXSLT:libxslt NULL +ro readlicense_oo : L10N:l10n solenv LIBXSLT:libxslt NULL ro readlicense_oo usr1 - all ro_root NULL ro readlicense_oo\docs\readme nmake - all ro_readme NULL ro readlicense_oo\html nmake - all ro_html NULL diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst index ca582c0aaf12..f25e991f84f4 100644 --- a/sfx2/prj/build.lst +++ b/sfx2/prj/build.lst @@ -1,3 +1,3 @@ -sf sfx2 : l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 LIBXSLT:libxslt NULL +sf sfx2 : L10N:l10n idl basic xmlscript framework readlicense_oo shell setup_native sax SYSTRAY_GTK:libegg LIBXML2:libxml2 LIBXSLT:libxslt NULL sf sfx2\prj nmake - all sf_prj NULL diff --git a/shell/prj/build.lst b/shell/prj/build.lst index ad157a677bff..abf9af0c0c8e 100755 --- a/shell/prj/build.lst +++ b/shell/prj/build.lst @@ -1,4 +1,4 @@ -sl shell : l10n offuh rdbmaker tools sal EXPAT:expat LIBXSLT:libxslt NULL +sl shell : L10N:l10n offuh rdbmaker tools sal EXPAT:expat LIBXSLT:libxslt NULL sl shell\inc nmake - all sl_inc NULL sl shell\source\win32 nmake - w sl_win32 sl_inc NULL sl shell\source\win32\simplemail nmake - w sl_win32_simplemail sl_inc NULL diff --git a/svx/prj/build.lst b/svx/prj/build.lst index 7b541b2d77c4..641f4e528793 100644 --- a/svx/prj/build.lst +++ b/svx/prj/build.lst @@ -1,2 +1,2 @@ -sx svx : sfx2 l10n oovbaapi connectivity xmloff linguistic jvmfwk avmedia drawinglayer editeng LIBXSLT:libxslt NULL +sx svx : sfx2 L10N:l10n oovbaapi connectivity xmloff linguistic jvmfwk avmedia drawinglayer editeng LIBXSLT:libxslt NULL sx svx\prj nmake - all sx_prj NULL diff --git a/sysui/prj/build.lst b/sysui/prj/build.lst index 1530997a3ec3..b5f26eb936b9 100644 --- a/sysui/prj/build.lst +++ b/sysui/prj/build.lst @@ -1,4 +1,4 @@ -su sysui : l10n offapi xml2cmp rdbmaker l10ntools setup_native NULL +su sysui : L10N:l10n offapi xml2cmp rdbmaker l10ntools setup_native NULL su sysui\source\win32\QuickStart nmake - w su_win32_quickstart NULL su sysui\source\win32\QuickStart\so nmake - w su_win32_quickstart_so su_win32_quickstart.w NULL su sysui\desktop\icons nmake - w su_iconsw NULL diff --git a/uui/prj/build.lst b/uui/prj/build.lst index 6816f8416bdf..b4a009cd0b9e 100644 --- a/uui/prj/build.lst +++ b/uui/prj/build.lst @@ -1,4 +1,4 @@ -uu uui : l10n vcl svtools LIBXSLT:libxslt NULL +uu uui : L10N:l10n vcl svtools LIBXSLT:libxslt NULL uu uui usr1 - all uu_mkout NULL uu uui\source nmake - all uu_source NULL uu uui\util nmake - all uu_util uu_source NULL -- cgit