summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/basidesh.cxx2
-rw-r--r--connectivity/source/commontools/formattedcolumnvalue.cxx13
-rw-r--r--connectivity/source/drivers/odbcbase/OTools.cxx2
-rw-r--r--dbaccess/source/core/api/KeySet.cxx7
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx4
-rw-r--r--dbaccess/source/ui/app/AppController.cxx11
-rw-r--r--dbaccess/source/ui/app/subcomponentmanager.cxx10
-rw-r--r--dbaccess/source/ui/app/subcomponentmanager.hxx3
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx406
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx7
-rw-r--r--editeng/inc/editeng/unoipset.hxx1
-rw-r--r--editeng/source/uno/unoipset.cxx21
-rw-r--r--forms/source/component/FormComponent.cxx104
-rw-r--r--forms/source/component/ImageControl.cxx177
-rw-r--r--forms/source/component/ImageControl.hxx15
-rw-r--r--forms/source/component/imgprod.cxx3
-rw-r--r--forms/source/inc/FormComponent.hxx22
-rw-r--r--forms/source/inc/frm_strings.hxx1
-rw-r--r--forms/source/inc/property.hrc2
-rw-r--r--forms/source/misc/property.cxx1
-rw-r--r--l10ntools/java/jpropex/java/JPropEx.java10
-rw-r--r--l10ntools/prj/build.lst3
-rw-r--r--l10ntools/prj/d.lst16
-rw-r--r--l10ntools/scripts/makefile.mk59
-rw-r--r--l10ntools/scripts/tool/xhtex.py2
-rwxr-xr-xl10ntools/scripts/xhtex8
-rwxr-xr-xl10ntools/scripts/xtxex8
-rw-r--r--l10ntools/source/help/HelpIndexerTool.java24
-rw-r--r--l10ntools/source/help/HelpLinker.cxx117
-rw-r--r--more_fonts/fonts/ttf_dejavu/makefile.mk6
-rw-r--r--more_fonts/prj/d.lst4
-rwxr-xr-x[-rw-r--r--]odk/setsdkenv_unix0
-rw-r--r--offapi/com/sun/star/sheet/DataPilotSourceDimension.idl8
-rw-r--r--offapi/com/sun/star/sheet/DimensionFlags.idl74
-rw-r--r--offapi/com/sun/star/sheet/makefile.mk1
-rwxr-xr-xooo.lst2
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java10
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java7
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java9
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java4
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java3
-rwxr-xr-xreportbuilder/util/description.xml2
-rw-r--r--sal/inc/rtl/math.h20
-rw-r--r--sal/osl/w32/signal.cxx2
-rw-r--r--sal/rtl/source/math.cxx292
-rw-r--r--sc/inc/ViewSettingsSequenceDefines.hxx2
-rw-r--r--sc/inc/dpobject.hxx4
-rw-r--r--sc/inc/dpsave.hxx1
-rw-r--r--sc/inc/pivot.hxx1
-rw-r--r--sc/inc/unonames.hxx1
-rw-r--r--sc/source/core/data/dpobject.cxx35
-rw-r--r--sc/source/core/data/dpsave.cxx5
-rw-r--r--[-rwxr-xr-x]sc/source/core/data/dptabsrc.cxx6
-rw-r--r--sc/source/core/data/pivot2.cxx1
-rw-r--r--sc/source/core/data/table2.cxx11
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx10
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx5
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx57
-rw-r--r--sc/source/ui/inc/pvlaydlg.hxx1
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx1
-rw-r--r--sc/source/ui/view/gridwin2.cxx13
-rw-r--r--sc/source/ui/view/prevwsh.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx8
-rwxr-xr-x[-rw-r--r--]sd/inc/FactoryIds.hxx3
-rwxr-xr-xsd/source/ui/app/strings.src4
-rwxr-xr-xsd/source/ui/dlg/PaneChildWindows.cxx26
-rwxr-xr-xsd/source/ui/inc/strings.hrc1
-rwxr-xr-xsd/source/ui/toolpanel/controls/DocumentHelper.cxx93
-rwxr-xr-xsd/source/ui/view/GraphicViewShellBase.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/ImpressViewShellBase.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/OutlineViewShellBase.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/PresentationViewShellBase.cxx2
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/SlideSorterViewShellBase.cxx2
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx2
-rw-r--r--sdext/prj/build.lst2
-rw-r--r--sdext/prj/d.lst2
-rw-r--r--sdext/source/minimizer/aboutdialog.cxx276
-rw-r--r--sdext/source/minimizer/aboutdialog.hxx91
-rw-r--r--sdext/source/minimizer/informationdialog.cxx7
-rwxr-xr-xsdext/source/minimizer/makefile.mk15
-rw-r--r--sdext/source/minimizer/pppoptimizerdialog.cxx6
-rw-r--r--sdext/source/minimizer/pppoptimizertoken.cxx3
-rw-r--r--sdext/source/minimizer/pppoptimizertoken.hxx3
-rw-r--r--sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu26
-rw-r--r--sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs24
-rw-r--r--sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp10
-rwxr-xr-xsdext/source/presenter/makefile.mk36
-rw-r--r--sfx2/inc/sfx2/docfac.hxx2
-rw-r--r--sfx2/inc/sfx2/viewfrm.hxx1
-rw-r--r--sfx2/inc/sfx2/viewsh.hxx4
-rw-r--r--sfx2/inc/viewfac.hxx17
-rw-r--r--sfx2/source/dialog/taskpane.cxx3
-rw-r--r--sfx2/source/doc/docfac.cxx19
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx4
-rw-r--r--sfx2/source/view/frmload.cxx2
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx51
-rw-r--r--sfx2/source/view/viewfac.cxx19
-rw-r--r--sfx2/source/view/viewfrm.cxx73
-rw-r--r--solenv/inc/extension_helplink.mk80
-rw-r--r--solenv/inc/extension_post.mk4
-rw-r--r--solenv/inc/minor.mk6
-rw-r--r--solenv/inc/tg_help.mk22
-rw-r--r--starmath/inc/starmath.hrc2
-rwxr-xr-xstarmath/source/smres.src4
-rwxr-xr-xstarmath/source/view.cxx2
-rw-r--r--svtools/inc/svtools/table/tabledatawindow.hxx1
-rw-r--r--svtools/source/contnr/svimpbox.cxx8
-rw-r--r--svtools/source/table/defaultinputhandler.cxx1
-rw-r--r--svtools/source/table/tabledatawindow.cxx7
-rw-r--r--svx/source/dialog/checklbx.cxx9
-rw-r--r--svx/source/unodraw/unoshape.cxx1
-rw-r--r--sw/source/core/attr/cellatr.cxx11
-rw-r--r--sw/source/core/unocore/unotbl.cxx9
-rw-r--r--sw/source/ui/lingu/olmenu.cxx2
-rw-r--r--sw/source/ui/uiview/pview.cxx2
-rw-r--r--sw/source/ui/uiview/srcview.cxx2
-rw-r--r--sw/source/ui/uiview/view0.cxx2
-rw-r--r--sw/source/ui/web/wview.cxx2
-rw-r--r--swext/mediawiki/build.xml16
-rw-r--r--swext/mediawiki/help/makefile.mk60
-rw-r--r--swext/prj/build.lst2
-rwxr-xr-xtestautomation/dbaccess/optional/includes/rpt_Formating.inc12
-rw-r--r--toolkit/inc/toolkit/helper/solarrelease.hxx27
-rw-r--r--toolkit/source/awt/vclxwindow.cxx3
-rw-r--r--vcl/aqua/source/a11y/aqua11yselectionwrapper.mm25
-rw-r--r--vcl/aqua/source/gdi/salgdi.cxx12
-rw-r--r--vcl/aqua/source/gdi/salnativewidgets.cxx8
-rw-r--r--vcl/source/window/syswin.cxx2
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx10
-rwxr-xr-xvcl/win/source/gdi/winlayout.cxx4
-rw-r--r--xmlhelp/prj/d.lst3
-rw-r--r--xmlhelp/util/delzip0
-rw-r--r--xmlhelp/util/embed.xsl83
-rw-r--r--xmlhelp/util/idxcaption.xsl34
-rw-r--r--xmlhelp/util/idxcontent.xsl104
-rw-r--r--xmlhelp/util/main_transform.xsl972
-rw-r--r--xmlhelp/util/makefile.mk6
-rw-r--r--xmloff/inc/xmloff/xmltoken.hxx3
-rw-r--r--xmloff/source/chart/PropertyMap.hxx2
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx42
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx70
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx23
-rw-r--r--xmloff/source/chart/SchXMLTools.hxx2
-rw-r--r--xmloff/source/core/xmltoken.cxx7
145 files changed, 2982 insertions, 1231 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 2f9303756e09..55dec2566205 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -155,7 +155,7 @@ public:
TYPEINIT1( BasicIDEShell, SfxViewShell );
-SFX_IMPL_VIEWFACTORY( BasicIDEShell, IDEResId( SVX_INTERFACE_BASIDE_VIEWSH ) )
+SFX_IMPL_NAMED_VIEWFACTORY( BasicIDEShell, "Default" )
{
SFX_VIEW_REGISTRATION( BasicDocShell );
}
diff --git a/connectivity/source/commontools/formattedcolumnvalue.cxx b/connectivity/source/commontools/formattedcolumnvalue.cxx
index 3707b7fdb65d..d63c83524389 100644
--- a/connectivity/source/commontools/formattedcolumnvalue.cxx
+++ b/connectivity/source/commontools/formattedcolumnvalue.cxx
@@ -326,9 +326,16 @@ namespace dbtools
::rtl::OUString sStringValue;
if ( m_pData->m_xColumn.is() )
{
- sStringValue = DBTypeConversion::getValue(
- m_pData->m_xColumn, m_pData->m_xFormatter, m_pData->m_aNullDate, m_pData->m_nFormatKey, m_pData->m_nKeyType
- );
+ if ( m_pData->m_bNumericField )
+ {
+ sStringValue = DBTypeConversion::getValue(
+ m_pData->m_xColumn, m_pData->m_xFormatter, m_pData->m_aNullDate, m_pData->m_nFormatKey, m_pData->m_nKeyType
+ );
+ }
+ else
+ {
+ sStringValue = m_pData->m_xColumn->getString();
+ }
}
return sStringValue;
}
diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx
index 43de55e3505c..d598de8bc12d 100644
--- a/connectivity/source/drivers/odbcbase/OTools.cxx
+++ b/connectivity/source/drivers/odbcbase/OTools.cxx
@@ -578,7 +578,7 @@ Sequence<sal_Int8> OTools::getBytesValue(OConnection* _pConnection,
// StarView zu lang ist oder der Treiber kann die Laenge der
// Daten nicht im voraus bestimmen - also als MemoryStream
// speichern.
- while ((pcbValue == SQL_NO_TOTAL ) || pcbValue > nMaxLen)
+ while ((pcbValue == SQL_NO_TOTAL ) || nLen > nMaxLen)
{
// Bei Strings wird der Puffer nie ganz ausgenutzt
// (das letzte Byte ist immer ein NULL-Byte, das
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 88b67b5ea5e3..6ee7a2b8ea4c 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -825,10 +825,12 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
for (;aAutoIter != aAutoEnd; ++aAutoIter)
{
// we will only fetch values which are keycolumns
- if ( m_pKeyColumnNames->find(*aAutoIter) != aEnd )
+ SelectColumnsMetaData::iterator aFind = m_pKeyColumnNames->find(*aAutoIter);
+ if ( aFind != aEnd )
{
sMaxStmt += sMax;
- sMaxStmt += ::dbtools::quoteName( sQuote,*aAutoIter);
+ sMaxStmt += ::dbtools::quoteName( sQuote,aFind->second.sRealName
+);
sMaxStmt += sMaxEnd;
}
}
@@ -842,7 +844,6 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
::rtl::OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(m_xConnection->getMetaData(),m_sUpdateTableName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
sStmt += ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable );
- //sStmt += m_aSelectComposedTableName;
try
{
// now fetch the autoincrement values
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 69520d043c52..2f9a58c975b7 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1266,13 +1266,13 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
// Feldnamen
sal_uInt16 i;
for (i=0;i< pLhs->count();i++)
- pCondition->getChild(i)->parseNodeToPredicateStr( aName, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) );
+ pLhs->getChild(i)->parseNodeToPredicateStr( aName, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) );
// Kriterium
aItem.Handle = pCondition->getChild(1)->getNodeType();
aValue = pCondition->getChild(1)->getTokenValue();
for(i=0;i< pRhs->count();i++)
- pCondition->getChild(i)->parseNodeToPredicateStr(aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) );
+ pRhs->getChild(i)->parseNodeToPredicateStr(aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) );
aItem.Name = aName;
aItem.Value <<= aValue;
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 1905193a4f04..9d659c26e707 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1347,7 +1347,9 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
InvalidateAll();
break;
case SID_DB_APP_DSRELDESIGN:
- if ( !m_pSubComponentManager->activateSubFrame( ::rtl::OUString(), SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN ) )
+ {
+ Reference< XComponent > xRelationDesigner;
+ if ( !m_pSubComponentManager->activateSubFrame( ::rtl::OUString(), SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN, xRelationDesigner ) )
{
SharedConnection xConnection( ensureConnection() );
if ( xConnection.is() )
@@ -1359,7 +1361,8 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
onDocumentOpened( ::rtl::OUString(), SID_DB_APP_DSRELDESIGN, E_OPEN_DESIGN, xComponent, NULL );
}
}
- break;
+ }
+ break;
case SID_DB_APP_DSUSERADMIN:
{
SharedConnection xConnection( ensureConnection() );
@@ -1844,7 +1847,7 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const
case E_REPORT:
case E_FORM:
{
- if ( !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode ) )
+ if ( !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode, xRet ) )
{
::std::auto_ptr< OLinkedDocumentsAccess > aHelper = getDocumentsAccess( _eType );
if ( !aHelper->isConnected() )
@@ -1861,7 +1864,7 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const
case E_QUERY:
case E_TABLE:
{
- if ( !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode ) )
+ if ( !m_pSubComponentManager->activateSubFrame( _sName, _eType, _eOpenMode, xRet ) )
{
SharedConnection xConnection( ensureConnection() );
if ( !xConnection.is() )
diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx
index 56fbc30f46e7..9b56120c3ea0 100644
--- a/dbaccess/source/ui/app/subcomponentmanager.cxx
+++ b/dbaccess/source/ui/app/subcomponentmanager.cxx
@@ -529,7 +529,8 @@ namespace dbaui
}
//------------------------------------------------------------------------------------------------------------------
- bool SubComponentManager::activateSubFrame( const ::rtl::OUString& _rName, const sal_Int32 _nComponentType, const ElementOpenMode _eOpenMode ) const
+ bool SubComponentManager::activateSubFrame( const ::rtl::OUString& _rName, const sal_Int32 _nComponentType,
+ const ElementOpenMode _eOpenMode, Reference< XComponent >& o_rComponent ) const
{
::osl::MutexGuard aGuard( m_pData->getMutex() );
@@ -546,6 +547,13 @@ namespace dbaui
const Reference< XTopWindow > xTopWindow( xFrame->getContainerWindow(), UNO_QUERY_THROW );
xTopWindow->toFront();
+ if ( pos->xModel.is() )
+ o_rComponent = pos->xModel.get();
+ else if ( pos->xController.is() )
+ o_rComponent = pos->xController.get();
+ else
+ o_rComponent = pos->xFrame.get();
+
return true;
}
diff --git a/dbaccess/source/ui/app/subcomponentmanager.hxx b/dbaccess/source/ui/app/subcomponentmanager.hxx
index f7f93ab6a53b..72b0a548e533 100644
--- a/dbaccess/source/ui/app/subcomponentmanager.hxx
+++ b/dbaccess/source/ui/app/subcomponentmanager.hxx
@@ -90,7 +90,8 @@ namespace dbaui
bool activateSubFrame(
const ::rtl::OUString& _rName,
const sal_Int32 _nComponentType,
- const ElementOpenMode _eOpenMode
+ const ElementOpenMode _eOpenMode,
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_rComponent
) const;
/** closes all frames of the given component
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index bc17a1f7163d..5a5efe825cfb 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -80,6 +80,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
::rtl::Reference<AbortChannel> const & abortChannel,
Reference<XCommandEnvironment> const & xCmdEnv );
+ bool extensionContainsCompiledHelp();
public:
PackageImpl(
::rtl::Reference<PackageRegistryBackend> const & myBackend,
@@ -100,7 +101,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
Reference<XCommandEnvironment> const & xCmdEnv );
void implProcessHelp( Reference< deployment::XPackage > xPackage, bool doRegisterPackage,
- Reference<ucb::XCommandEnvironment> const & xCmdEnv);
+ bool compiledHelp, Reference<ucb::XCommandEnvironment> const & xCmdEnv);
void implCollectXhpFiles( const rtl::OUString& aDir,
std::vector< rtl::OUString >& o_rXhpFileVector );
@@ -259,6 +260,57 @@ BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
return pBackend;
}
+
+bool BackendImpl::PackageImpl::extensionContainsCompiledHelp()
+{
+ bool bCompiled = true;
+ rtl::OUString aExpandedHelpURL = dp_misc::expandUnoRcUrl(getURL());
+
+ ::osl::Directory helpFolder(aExpandedHelpURL);
+ if ( helpFolder.open() == ::osl::File::E_None)
+ {
+ //iterate over the contents of the help folder
+ //We assume that all folders withing the help folder contain language specific
+ //help files. If just one of them does not contain compiled help then this
+ //function returns false.
+ ::osl::DirectoryItem item;
+ ::osl::File::RC errorNext = ::osl::File::E_None;
+ while ((errorNext = helpFolder.getNextItem(item)) == ::osl::File::E_None)
+ {
+ //No find the language folders
+ ::osl::FileStatus stat(FileStatusMask_Type | FileStatusMask_FileName |FileStatusMask_FileURL);
+ if (item.getFileStatus(stat) == ::osl::File::E_None)
+ {
+ if (stat.getFileType() != ::osl::FileStatus::Directory)
+ continue;
+
+ //look if there is the folder help.idxl in the language folder
+ OUString compUrl(stat.getFileURL() + OUSTR("/help.idxl"));
+ ::osl::Directory compiledFolder(compUrl);
+ if (compiledFolder.open() != ::osl::File::E_None)
+ {
+ bCompiled = false;
+ break;
+ }
+ }
+ else
+ {
+ //Error
+ OSL_ASSERT(0);
+ bCompiled = false;
+ break;
+ }
+ }
+ if (errorNext != ::osl::File::E_NOENT
+ && errorNext != ::osl::File::E_None)
+ {
+ //Error
+ OSL_ASSERT(0);
+ bCompiled = false;
+ }
+ }
+ return bCompiled;
+}
//______________________________________________________________________________
beans::Optional< beans::Ambiguous<sal_Bool> >
BackendImpl::PackageImpl::isRegistered_(
@@ -289,7 +341,8 @@ void BackendImpl::PackageImpl::processPackage_(
BackendImpl* that = getMyBackend();
Reference< deployment::XPackage > xThisPackage( this );
- that->implProcessHelp( xThisPackage, doRegisterPackage, xCmdEnv);
+ that->implProcessHelp( xThisPackage, doRegisterPackage,
+ extensionContainsCompiledHelp(), xCmdEnv);
}
beans::Optional< OUString > BackendImpl::PackageImpl::getRegistrationDataURL()
@@ -316,213 +369,220 @@ static rtl::OUString aHelpStr( rtl::OUString::createFromAscii( "help" ) );
void BackendImpl::implProcessHelp
-( Reference< deployment::XPackage > xPackage, bool doRegisterPackage,
+( Reference< deployment::XPackage > xPackage, bool doRegisterPackage, bool compiledHelp,
Reference<ucb::XCommandEnvironment> const & xCmdEnv)
{
OSL_ASSERT(xPackage.is());
if (doRegisterPackage)
{
HelpBackendDb::Data data;
- const OUString sHelpFolder = createFolder(OUString(), xCmdEnv);
- data.dataUrl = sHelpFolder;
-
- Reference< ucb::XSimpleFileAccess > xSFA = getFileAccess();
- rtl::OUString aHelpURL = xPackage->getURL();
- rtl::OUString aExpandedHelpURL = dp_misc::expandUnoRcUrl( aHelpURL );
- rtl::OUString aName = xPackage->getName();
- if( !xSFA->isFolder( aExpandedHelpURL ) )
+
+ if (compiledHelp)
{
- rtl::OUString aErrStr = getResourceString( RID_STR_HELPPROCESSING_GENERAL_ERROR );
- aErrStr += rtl::OUString::createFromAscii( "No help folder" );
- OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
- throw deployment::DeploymentException( rtl::OUString(), oWeakThis,
- makeAny( uno::Exception( aErrStr, oWeakThis ) ) );
+ data.dataUrl = xPackage->getURL();
}
-
- Reference<XComponentContext> const & xContext = getComponentContext();
- Reference< script::XInvocation > xInvocation;
- if( xContext.is() )
+ else
{
- try
+ const OUString sHelpFolder = createFolder(OUString(), xCmdEnv);
+ data.dataUrl = sHelpFolder;
+
+ Reference< ucb::XSimpleFileAccess > xSFA = getFileAccess();
+ rtl::OUString aHelpURL = xPackage->getURL();
+ rtl::OUString aExpandedHelpURL = dp_misc::expandUnoRcUrl( aHelpURL );
+ rtl::OUString aName = xPackage->getName();
+ if( !xSFA->isFolder( aExpandedHelpURL ) )
{
- xInvocation = Reference< script::XInvocation >(
- xContext->getServiceManager()->createInstanceWithContext( rtl::OUString::createFromAscii(
- "com.sun.star.help.HelpIndexer" ), xContext ) , UNO_QUERY );
+ rtl::OUString aErrStr = getResourceString( RID_STR_HELPPROCESSING_GENERAL_ERROR );
+ aErrStr += rtl::OUString::createFromAscii( "No help folder" );
+ OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
+ throw deployment::DeploymentException( rtl::OUString(), oWeakThis,
+ makeAny( uno::Exception( aErrStr, oWeakThis ) ) );
}
- catch (Exception &)
+
+ Reference<XComponentContext> const & xContext = getComponentContext();
+ Reference< script::XInvocation > xInvocation;
+ if( xContext.is() )
{
- // i98680: Survive missing lucene
+ try
+ {
+ xInvocation = Reference< script::XInvocation >(
+ xContext->getServiceManager()->createInstanceWithContext( rtl::OUString::createFromAscii(
+ "com.sun.star.help.HelpIndexer" ), xContext ) , UNO_QUERY );
+ }
+ catch (Exception &)
+ {
+ // i98680: Survive missing lucene
+ }
}
- }
- // Scan languages
- Sequence< rtl::OUString > aLanguageFolderSeq = xSFA->getFolderContents( aExpandedHelpURL, true );
- sal_Int32 nLangCount = aLanguageFolderSeq.getLength();
- const rtl::OUString* pSeq = aLanguageFolderSeq.getConstArray();
- for( sal_Int32 iLang = 0 ; iLang < nLangCount ; ++iLang )
- {
- rtl::OUString aLangURL = pSeq[iLang];
- if( xSFA->isFolder( aLangURL ) )
+ // Scan languages
+ Sequence< rtl::OUString > aLanguageFolderSeq = xSFA->getFolderContents( aExpandedHelpURL, true );
+ sal_Int32 nLangCount = aLanguageFolderSeq.getLength();
+ const rtl::OUString* pSeq = aLanguageFolderSeq.getConstArray();
+ for( sal_Int32 iLang = 0 ; iLang < nLangCount ; ++iLang )
{
- std::vector< rtl::OUString > aXhpFileVector;
-
- // calculate jar file URL
- sal_Int32 indexStartSegment = aLangURL.lastIndexOf('/');
- // for example "/en"
- OUString langFolderURLSegment(
- aLangURL.copy(
- indexStartSegment + 1, aLangURL.getLength() - indexStartSegment - 1));
-
- //create the folder in the "temporary folder"
- ::ucbhelper::Content langFolderContent;
- const OUString langFolderDest = makeURL(sHelpFolder, langFolderURLSegment);
- const OUString langFolderDestExpanded = ::dp_misc::expandUnoRcUrl(langFolderDest);
- ::dp_misc::create_folder(
- &langFolderContent,
- langFolderDest, xCmdEnv);
-
- rtl::OUString aJarFile(
- makeURL(sHelpFolder, langFolderURLSegment + aSlash + aHelpStr +
- OUSTR(".jar")));
- aJarFile = ::dp_misc::expandUnoRcUrl(aJarFile);
-
- rtl::OUString aEncodedJarFilePath = rtl::Uri::encode(
- aJarFile, rtl_UriCharClassPchar,
- rtl_UriEncodeIgnoreEscapes,
- RTL_TEXTENCODING_UTF8 );
- rtl::OUString aDestBasePath = rtl::OUString::createFromAscii( "vnd.sun.star.pkg://" );
- aDestBasePath += aEncodedJarFilePath;
- aDestBasePath += rtl::OUString::createFromAscii( "/" );
-
- sal_Int32 nLenLangFolderURL = aLangURL.getLength() + 1;
-
- Sequence< rtl::OUString > aSubLangSeq = xSFA->getFolderContents( aLangURL, true );
- sal_Int32 nSubLangCount = aSubLangSeq.getLength();
- const rtl::OUString* pSubLangSeq = aSubLangSeq.getConstArray();
- for( sal_Int32 iSubLang = 0 ; iSubLang < nSubLangCount ; ++iSubLang )
+ rtl::OUString aLangURL = pSeq[iLang];
+ if( xSFA->isFolder( aLangURL ) )
{
- rtl::OUString aSubFolderURL = pSubLangSeq[iSubLang];
- if( !xSFA->isFolder( aSubFolderURL ) )
- continue;
+ std::vector< rtl::OUString > aXhpFileVector;
+
+ // calculate jar file URL
+ sal_Int32 indexStartSegment = aLangURL.lastIndexOf('/');
+ // for example "/en"
+ OUString langFolderURLSegment(
+ aLangURL.copy(
+ indexStartSegment + 1, aLangURL.getLength() - indexStartSegment - 1));
+
+ //create the folder in the "temporary folder"
+ ::ucbhelper::Content langFolderContent;
+ const OUString langFolderDest = makeURL(sHelpFolder, langFolderURLSegment);
+ const OUString langFolderDestExpanded = ::dp_misc::expandUnoRcUrl(langFolderDest);
+ ::dp_misc::create_folder(
+ &langFolderContent,
+ langFolderDest, xCmdEnv);
+
+ rtl::OUString aJarFile(
+ makeURL(sHelpFolder, langFolderURLSegment + aSlash + aHelpStr +
+ OUSTR(".jar")));
+ aJarFile = ::dp_misc::expandUnoRcUrl(aJarFile);
+
+ rtl::OUString aEncodedJarFilePath = rtl::Uri::encode(
+ aJarFile, rtl_UriCharClassPchar,
+ rtl_UriEncodeIgnoreEscapes,
+ RTL_TEXTENCODING_UTF8 );
+ rtl::OUString aDestBasePath = rtl::OUString::createFromAscii( "vnd.sun.star.pkg://" );
+ aDestBasePath += aEncodedJarFilePath;
+ aDestBasePath += rtl::OUString::createFromAscii( "/" );
+
+ sal_Int32 nLenLangFolderURL = aLangURL.getLength() + 1;
+
+ Sequence< rtl::OUString > aSubLangSeq = xSFA->getFolderContents( aLangURL, true );
+ sal_Int32 nSubLangCount = aSubLangSeq.getLength();
+ const rtl::OUString* pSubLangSeq = aSubLangSeq.getConstArray();
+ for( sal_Int32 iSubLang = 0 ; iSubLang < nSubLangCount ; ++iSubLang )
+ {
+ rtl::OUString aSubFolderURL = pSubLangSeq[iSubLang];
+ if( !xSFA->isFolder( aSubFolderURL ) )
+ continue;
- implCollectXhpFiles( aSubFolderURL, aXhpFileVector );
+ implCollectXhpFiles( aSubFolderURL, aXhpFileVector );
- // Copy to package (later: move?)
- rtl::OUString aDestPath = aDestBasePath;
- rtl::OUString aPureFolderName = aSubFolderURL.copy( nLenLangFolderURL );
- aDestPath += aPureFolderName;
- xSFA->copy( aSubFolderURL, aDestPath );
- }
+ // Copy to package (later: move?)
+ rtl::OUString aDestPath = aDestBasePath;
+ rtl::OUString aPureFolderName = aSubFolderURL.copy( nLenLangFolderURL );
+ aDestPath += aPureFolderName;
+ xSFA->copy( aSubFolderURL, aDestPath );
+ }
- // Call compiler
- sal_Int32 nXhpFileCount = aXhpFileVector.size();
- rtl::OUString* pXhpFiles = new rtl::OUString[nXhpFileCount];
- for( sal_Int32 iXhp = 0 ; iXhp < nXhpFileCount ; ++iXhp )
- {
- rtl::OUString aXhpFile = aXhpFileVector[iXhp];
- rtl::OUString aXhpRelFile = aXhpFile.copy( nLenLangFolderURL );
- pXhpFiles[iXhp] = aXhpRelFile;
- }
+ // Call compiler
+ sal_Int32 nXhpFileCount = aXhpFileVector.size();
+ rtl::OUString* pXhpFiles = new rtl::OUString[nXhpFileCount];
+ for( sal_Int32 iXhp = 0 ; iXhp < nXhpFileCount ; ++iXhp )
+ {
+ rtl::OUString aXhpFile = aXhpFileVector[iXhp];
+ rtl::OUString aXhpRelFile = aXhpFile.copy( nLenLangFolderURL );
+ pXhpFiles[iXhp] = aXhpRelFile;
+ }
- rtl::OUString aOfficeHelpPath( SvtPathOptions().GetHelpPath() );
- rtl::OUString aOfficeHelpPathFileURL;
- ::osl::File::getFileURLFromSystemPath( aOfficeHelpPath, aOfficeHelpPathFileURL );
+ rtl::OUString aOfficeHelpPath( SvtPathOptions().GetHelpPath() );
+ rtl::OUString aOfficeHelpPathFileURL;
+ ::osl::File::getFileURLFromSystemPath( aOfficeHelpPath, aOfficeHelpPathFileURL );
- HelpProcessingErrorInfo aErrorInfo;
- bool bSuccess = compileExtensionHelp(
- aOfficeHelpPathFileURL, aHelpStr, aLangURL,
- nXhpFileCount, pXhpFiles,
- langFolderDestExpanded, aErrorInfo );
+ HelpProcessingErrorInfo aErrorInfo;
+ bool bSuccess = compileExtensionHelp(
+ aOfficeHelpPathFileURL, aHelpStr, aLangURL,
+ nXhpFileCount, pXhpFiles,
+ langFolderDestExpanded, aErrorInfo );
- if( bSuccess && xInvocation.is() )
- {
- Sequence<uno::Any> aParamsSeq( 6 );
-
- aParamsSeq[0] = uno::makeAny( rtl::OUString::createFromAscii( "-lang" ) );
-
- rtl::OUString aLang;
- sal_Int32 nLastSlash = aLangURL.lastIndexOf( '/' );
- if( nLastSlash != -1 )
- aLang = aLangURL.copy( nLastSlash + 1 );
- else
- aLang = rtl::OUString::createFromAscii( "en" );
- aParamsSeq[1] = uno::makeAny( aLang );
-
- aParamsSeq[2] = uno::makeAny( rtl::OUString::createFromAscii( "-mod" ) );
- aParamsSeq[3] = uno::makeAny( rtl::OUString::createFromAscii( "help" ) );
-
- aParamsSeq[4] = uno::makeAny( rtl::OUString::createFromAscii( "-zipdir" ) );
- rtl::OUString aSystemPath;
- osl::FileBase::getSystemPathFromFileURL(
- langFolderDestExpanded, aSystemPath );
- aParamsSeq[5] = uno::makeAny( aSystemPath );
-
- Sequence< sal_Int16 > aOutParamIndex;
- Sequence< uno::Any > aOutParam;
- uno::Any aRet = xInvocation->invoke( rtl::OUString::createFromAscii( "createIndex" ),
- aParamsSeq, aOutParamIndex, aOutParam );
- }
-
- if( !bSuccess )
- {
- USHORT nErrStrId = 0;
- switch( aErrorInfo.m_eErrorClass )
+ if( bSuccess && xInvocation.is() )
{
- case HELPPROCESSING_GENERAL_ERROR:
- case HELPPROCESSING_INTERNAL_ERROR: nErrStrId = RID_STR_HELPPROCESSING_GENERAL_ERROR; break;
- case HELPPROCESSING_XMLPARSING_ERROR: nErrStrId = RID_STR_HELPPROCESSING_XMLPARSING_ERROR; break;
- default: ;
- };
-
- rtl::OUString aErrStr;
- if( nErrStrId != 0 )
+ Sequence<uno::Any> aParamsSeq( 6 );
+
+ aParamsSeq[0] = uno::makeAny( rtl::OUString::createFromAscii( "-lang" ) );
+
+ rtl::OUString aLang;
+ sal_Int32 nLastSlash = aLangURL.lastIndexOf( '/' );
+ if( nLastSlash != -1 )
+ aLang = aLangURL.copy( nLastSlash + 1 );
+ else
+ aLang = rtl::OUString::createFromAscii( "en" );
+ aParamsSeq[1] = uno::makeAny( aLang );
+
+ aParamsSeq[2] = uno::makeAny( rtl::OUString::createFromAscii( "-mod" ) );
+ aParamsSeq[3] = uno::makeAny( rtl::OUString::createFromAscii( "help" ) );
+
+ aParamsSeq[4] = uno::makeAny( rtl::OUString::createFromAscii( "-zipdir" ) );
+ rtl::OUString aSystemPath;
+ osl::FileBase::getSystemPathFromFileURL(
+ langFolderDestExpanded, aSystemPath );
+ aParamsSeq[5] = uno::makeAny( aSystemPath );
+
+ Sequence< sal_Int16 > aOutParamIndex;
+ Sequence< uno::Any > aOutParam;
+ uno::Any aRet = xInvocation->invoke( rtl::OUString::createFromAscii( "createIndex" ),
+ aParamsSeq, aOutParamIndex, aOutParam );
+ }
+
+ if( !bSuccess )
{
- aErrStr = getResourceString( nErrStrId );
-
- // Remoce CR/LF
- rtl::OUString aErrMsg( aErrorInfo.m_aErrorMsg );
- sal_Unicode nCR = 13, nLF = 10;
- sal_Int32 nSearchCR = aErrMsg.indexOf( nCR );
- sal_Int32 nSearchLF = aErrMsg.indexOf( nLF );
- sal_Int32 nCopy;
- if( nSearchCR != -1 || nSearchLF != -1 )
+ USHORT nErrStrId = 0;
+ switch( aErrorInfo.m_eErrorClass )
{
- if( nSearchCR == -1 )
- nCopy = nSearchLF;
- else if( nSearchLF == -1 )
- nCopy = nSearchCR;
- else
- nCopy = ( nSearchCR < nSearchLF ) ? nSearchCR : nSearchLF;
-
- aErrMsg = aErrMsg.copy( 0, nCopy );
- }
- aErrStr += aErrMsg;
- if( nErrStrId == RID_STR_HELPPROCESSING_XMLPARSING_ERROR && aErrorInfo.m_aXMLParsingFile.getLength() )
+ case HELPPROCESSING_GENERAL_ERROR:
+ case HELPPROCESSING_INTERNAL_ERROR: nErrStrId = RID_STR_HELPPROCESSING_GENERAL_ERROR; break;
+ case HELPPROCESSING_XMLPARSING_ERROR: nErrStrId = RID_STR_HELPPROCESSING_XMLPARSING_ERROR; break;
+ default: ;
+ };
+
+ rtl::OUString aErrStr;
+ if( nErrStrId != 0 )
{
- aErrStr += rtl::OUString::createFromAscii( " in " );
-
- rtl::OUString aDecodedFile = rtl::Uri::decode( aErrorInfo.m_aXMLParsingFile,
- rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
- aErrStr += aDecodedFile;
- if( aErrorInfo.m_nXMLParsingLine != -1 )
+ aErrStr = getResourceString( nErrStrId );
+
+ // Remoce CR/LF
+ rtl::OUString aErrMsg( aErrorInfo.m_aErrorMsg );
+ sal_Unicode nCR = 13, nLF = 10;
+ sal_Int32 nSearchCR = aErrMsg.indexOf( nCR );
+ sal_Int32 nSearchLF = aErrMsg.indexOf( nLF );
+ sal_Int32 nCopy;
+ if( nSearchCR != -1 || nSearchLF != -1 )
{
- aErrStr += rtl::OUString::createFromAscii( ", line " );
- aErrStr += ::rtl::OUString::valueOf( aErrorInfo.m_nXMLParsingLine );
+ if( nSearchCR == -1 )
+ nCopy = nSearchLF;
+ else if( nSearchLF == -1 )
+ nCopy = nSearchCR;
+ else
+ nCopy = ( nSearchCR < nSearchLF ) ? nSearchCR : nSearchLF;
+
+ aErrMsg = aErrMsg.copy( 0, nCopy );
+ }
+ aErrStr += aErrMsg;
+ if( nErrStrId == RID_STR_HELPPROCESSING_XMLPARSING_ERROR && aErrorInfo.m_aXMLParsingFile.getLength() )
+ {
+ aErrStr += rtl::OUString::createFromAscii( " in " );
+
+ rtl::OUString aDecodedFile = rtl::Uri::decode( aErrorInfo.m_aXMLParsingFile,
+ rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
+ aErrStr += aDecodedFile;
+ if( aErrorInfo.m_nXMLParsingLine != -1 )
+ {
+ aErrStr += rtl::OUString::createFromAscii( ", line " );
+ aErrStr += ::rtl::OUString::valueOf( aErrorInfo.m_nXMLParsingLine );
+ }
}
}
- }
- OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
- throw deployment::DeploymentException( rtl::OUString(), oWeakThis,
- makeAny( uno::Exception( aErrStr, oWeakThis ) ) );
+ OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
+ throw deployment::DeploymentException( rtl::OUString(), oWeakThis,
+ makeAny( uno::Exception( aErrStr, oWeakThis ) ) );
+ }
}
}
}
-
//Writing the data entry replaces writing the flag file. If we got to this
//point the registration was successful.
addDataToDb(xPackage->getURL(), data);
- }
+ } //if (doRegisterPackage)
else
{
deleteDataFromDb(xPackage->getURL());
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index dc954de7bb2a..0d2be85f9872 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1206,7 +1206,12 @@ namespace drawinglayer
mpOutputDevice->SetLineColor(Color(aHairlineColor));
mpOutputDevice->SetFillColor();
aHairLinePolyPolygon.transform(maCurrentTransformation);
- LineInfo aLineInfo(LINE_SOLID, basegfx::fround(rLine.getWidth()));
+
+ // #i113922# LineWidth needs to be transformed, too
+ const basegfx::B2DVector aDiscreteUnit(maCurrentTransformation * basegfx::B2DVector(rLine.getWidth(), 0.0));
+ const double fDiscreteLineWidth(aDiscreteUnit.getLength());
+
+ LineInfo aLineInfo(LINE_SOLID, basegfx::fround(fDiscreteLineWidth));
aLineInfo.SetLineJoin(rLine.getLineJoin());
for(sal_uInt32 a(0); a < aHairLinePolyPolygon.count(); a++)
diff --git a/editeng/inc/editeng/unoipset.hxx b/editeng/inc/editeng/unoipset.hxx
index 3cd3053e4c3e..8a28df5cbe28 100644
--- a/editeng/inc/editeng/unoipset.hxx
+++ b/editeng/inc/editeng/unoipset.hxx
@@ -64,6 +64,7 @@ public:
sal_Bool AreThereOwnUsrAnys() const { return (pCombiList ? sal_True : sal_False); }
::com::sun::star::uno::Any* GetUsrAnyForID(sal_uInt16 nWID) const;
void AddUsrAnyForID(const ::com::sun::star::uno::Any& rAny, sal_uInt16 nWID);
+ void ClearAllUsrAny();
com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > getPropertySetInfo() const;
const SfxItemPropertyMapEntry* getPropertyMapEntries() const {return _pMap;}
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index 39ab3507c5d3..6ba232010390 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -71,15 +71,7 @@ SvxItemPropertySet::SvxItemPropertySet( const SfxItemPropertyMapEntry* pMap, Sfx
//----------------------------------------------------------------------
SvxItemPropertySet::~SvxItemPropertySet()
{
-/*
- if(pItemPool)
- delete pItemPool;
- pItemPool = NULL;
-*/
-
- if(pCombiList)
- delete pCombiList;
- pCombiList = NULL;
+ ClearAllUsrAny();
}
//----------------------------------------------------------------------
@@ -111,6 +103,17 @@ void SvxItemPropertySet::AddUsrAnyForID(const uno::Any& rAny, sal_uInt16 nWID)
pCombiList->Insert(pNew);
}
+//----------------------------------------------------------------------
+
+void SvxItemPropertySet::ClearAllUsrAny()
+{
+ if(pCombiList)
+ delete pCombiList;
+ pCombiList = NULL;
+}
+
+//----------------------------------------------------------------------
+
sal_Bool SvxUnoCheckForPositiveValue( const uno::Any& rVal )
{
sal_Bool bConvert = sal_True; // the default is that all metric items must be converted
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 148e4c9aa298..f9d3ffab9709 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -507,14 +507,12 @@ DBG_NAME(OControlModel)
//------------------------------------------------------------------
Sequence<sal_Int8> SAL_CALL OControlModel::getImplementationId() throw(RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getImplementationId" );
return OImplementationIds::getImplementationId(getTypes());
}
//------------------------------------------------------------------
Sequence<Type> SAL_CALL OControlModel::getTypes() throw(RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getTypes" );
TypeBag aTypes( _getTypes() );
Reference< XTypeProvider > xProv;
@@ -527,7 +525,6 @@ Sequence<Type> SAL_CALL OControlModel::getTypes() throw(RuntimeException)
//------------------------------------------------------------------------------
Sequence<Type> OControlModel::_getTypes()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::_getTypes" );
return TypeBag( OComponentHelper::getTypes(),
OPropertySetAggregationHelper::getTypes(),
OControlModel_BASE::getTypes()
@@ -537,7 +534,6 @@ Sequence<Type> OControlModel::_getTypes()
//------------------------------------------------------------------
Any SAL_CALL OControlModel::queryAggregation(const Type& _rType) throw (RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::queryAggregation" );
// base class 1
Any aReturn(OComponentHelper::queryAggregation(_rType));
@@ -561,7 +557,6 @@ Any SAL_CALL OControlModel::queryAggregation(const Type& _rType) throw (RuntimeE
//------------------------------------------------------------------------------
void OControlModel::readHelpTextCompatibly(const staruno::Reference< stario::XObjectInputStream >& _rxInStream)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::readHelpTextCompatibly" );
::rtl::OUString sHelpText;
::comphelper::operator>>( _rxInStream, sHelpText);
try
@@ -578,7 +573,6 @@ void OControlModel::readHelpTextCompatibly(const staruno::Reference< stario::XOb
//------------------------------------------------------------------------------
void OControlModel::writeHelpTextCompatibly(const staruno::Reference< stario::XObjectOutputStream >& _rxOutStream)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::writeHelpTextCompatibly" );
::rtl::OUString sHelpText;
try
{
@@ -609,7 +603,6 @@ OControlModel::OControlModel(
// the native look is ugly ....
// #i37342# / 2004-11-19 / frank.schoenheit@sun.com
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::OControlModel" );
DBG_CTOR(OControlModel, NULL);
if (_rUnoControlModelTypeName.getLength()) // the is a model we have to aggregate
{
@@ -651,7 +644,6 @@ OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference<
,m_nTabIndex( FRM_DEFAULT_TABINDEX )
,m_nClassId( FormComponentType::CONTROL )
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::OControlModel(copy)" );
DBG_CTOR( OControlModel, NULL );
DBG_ASSERT( _pOriginal, "OControlModel::OControlModel: invalid original!" );
@@ -696,14 +688,12 @@ OControlModel::~OControlModel()
//------------------------------------------------------------------
void OControlModel::clonedFrom( const OControlModel* /*_pOriginal*/ )
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::clonedFrom" );
// nothing to do in this base class
}
//------------------------------------------------------------------------------
void OControlModel::doResetDelegator()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::doResetDelegator" );
if (m_xAggregate.is())
m_xAggregate->setDelegator(NULL);
}
@@ -711,7 +701,6 @@ void OControlModel::doResetDelegator()
//------------------------------------------------------------------------------
void OControlModel::doSetDelegator()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::doSetDelegator" );
increment(m_refCount);
if (m_xAggregate.is())
{
@@ -724,14 +713,12 @@ void OControlModel::doSetDelegator()
//------------------------------------------------------------------------------
InterfaceRef SAL_CALL OControlModel::getParent() throw(RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getParent" );
return m_xParent;
}
//------------------------------------------------------------------------------
void SAL_CALL OControlModel::setParent(const InterfaceRef& _rxParent) throw(com::sun::star::lang::NoSupportException, RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setParent" );
osl::MutexGuard aGuard(m_aMutex);
Reference<XComponent> xComp(m_xParent, UNO_QUERY);
@@ -749,7 +736,6 @@ void SAL_CALL OControlModel::setParent(const InterfaceRef& _rxParent) throw(com:
//------------------------------------------------------------------------------
::rtl::OUString SAL_CALL OControlModel::getName() throw(RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getName" );
::rtl::OUString aReturn;
OPropertySetHelper::getFastPropertyValue(PROPERTY_ID_NAME) >>= aReturn;
return aReturn;
@@ -758,7 +744,6 @@ void SAL_CALL OControlModel::setParent(const InterfaceRef& _rxParent) throw(com:
//------------------------------------------------------------------------------
void SAL_CALL OControlModel::setName(const ::rtl::OUString& _rName) throw(RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setName" );
setFastPropertyValue(PROPERTY_ID_NAME, makeAny(_rName));
}
@@ -766,7 +751,6 @@ void SAL_CALL OControlModel::setName(const ::rtl::OUString& _rName) throw(Runtim
//------------------------------------------------------------------------------
sal_Bool SAL_CALL OControlModel::supportsService(const rtl::OUString& _rServiceName) throw ( RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::supportsService" );
Sequence<rtl::OUString> aSupported = getSupportedServiceNames();
const rtl::OUString* pSupported = aSupported.getConstArray();
for (sal_Int32 i=0; i<aSupported.getLength(); ++i, ++pSupported)
@@ -778,7 +762,6 @@ sal_Bool SAL_CALL OControlModel::supportsService(const rtl::OUString& _rServiceN
//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OControlModel::getAggregateServiceNames()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getAggregateServiceNames" );
Sequence< ::rtl::OUString > aAggServices;
Reference< XServiceInfo > xInfo;
if ( query_aggregation( m_xAggregate, xInfo ) )
@@ -789,7 +772,6 @@ Sequence< ::rtl::OUString > OControlModel::getAggregateServiceNames()
//------------------------------------------------------------------------------
Sequence<rtl::OUString> SAL_CALL OControlModel::getSupportedServiceNames() throw(RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getSupportedServiceNames" );
return ::comphelper::concatSequences(
getAggregateServiceNames(),
getSupportedServiceNames_Static()
@@ -799,7 +781,6 @@ Sequence<rtl::OUString> SAL_CALL OControlModel::getSupportedServiceNames() throw
//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL OControlModel::getSupportedServiceNames_Static() throw( RuntimeException )
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getSupportedServiceNames_Static" );
Sequence< ::rtl::OUString > aServiceNames( 2 );
aServiceNames[ 0 ] = FRM_SUN_FORMCOMPONENT;
aServiceNames[ 1 ] = ::rtl::OUString::createFromAscii( "com.sun.star.form.FormControlModel" );
@@ -810,7 +791,6 @@ Sequence< ::rtl::OUString > SAL_CALL OControlModel::getSupportedServiceNames_Sta
//------------------------------------------------------------------------------
void SAL_CALL OControlModel::disposing(const com::sun::star::lang::EventObject& _rSource) throw (RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::disposing" );
// release the parent
if (_rSource.Source == m_xParent)
{
@@ -832,7 +812,6 @@ void SAL_CALL OControlModel::disposing(const com::sun::star::lang::EventObject&
//-----------------------------------------------------------------------------
void OControlModel::disposing()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::disposing" );
OPropertySetAggregationHelper::disposing();
Reference<com::sun::star::lang::XComponent> xComp;
@@ -847,7 +826,6 @@ void OControlModel::disposing()
//------------------------------------------------------------------------------
void OControlModel::writeAggregate( const Reference< XObjectOutputStream >& _rxOutStream ) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::writeAggregate" );
Reference< XPersistObject > xPersist;
if ( query_aggregation( m_xAggregate, xPersist ) )
xPersist->write( _rxOutStream );
@@ -856,7 +834,6 @@ void OControlModel::writeAggregate( const Reference< XObjectOutputStream >& _rxO
//------------------------------------------------------------------------------
void OControlModel::readAggregate( const Reference< XObjectInputStream >& _rxInStream )
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::readAggregate" );
Reference< XPersistObject > xPersist;
if ( query_aggregation( m_xAggregate, xPersist ) )
xPersist->read( _rxInStream );
@@ -866,7 +843,6 @@ void OControlModel::readAggregate( const Reference< XObjectInputStream >& _rxInS
void SAL_CALL OControlModel::write(const Reference<stario::XObjectOutputStream>& _rxOutStream)
throw(stario::IOException, RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::write" );
osl::MutexGuard aGuard(m_aMutex);
// 1. Schreiben des UnoControls
@@ -912,7 +888,6 @@ void SAL_CALL OControlModel::write(const Reference<stario::XObjectOutputStream>&
//------------------------------------------------------------------------------
void OControlModel::read(const Reference<stario::XObjectInputStream>& InStream) throw (::com::sun::star::io::IOException, RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::read" );
osl::MutexGuard aGuard(m_aMutex);
Reference<stario::XMarkableStream> xMark(InStream, UNO_QUERY);
@@ -966,7 +941,6 @@ void OControlModel::read(const Reference<stario::XObjectInputStream>& InStream)
//------------------------------------------------------------------------------
PropertyState OControlModel::getPropertyStateByHandle( sal_Int32 _nHandle )
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertyStateByHandle" );
// simply compare the current and the default value
Any aCurrentValue = getPropertyDefaultByHandle( _nHandle );
Any aDefaultValue; getFastPropertyValue( aDefaultValue, _nHandle );
@@ -983,7 +957,6 @@ PropertyState OControlModel::getPropertyStateByHandle( sal_Int32 _nHandle )
//------------------------------------------------------------------------------
void OControlModel::setPropertyToDefaultByHandle( sal_Int32 _nHandle)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setPropertyToDefaultByHandle" );
Any aDefault = getPropertyDefaultByHandle( _nHandle );
Any aConvertedValue, aOldValue;
@@ -997,7 +970,6 @@ void OControlModel::setPropertyToDefaultByHandle( sal_Int32 _nHandle)
//------------------------------------------------------------------------------
Any OControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertyDefaultByHandle" );
Any aReturn;
switch ( _nHandle )
{
@@ -1030,7 +1002,6 @@ Any OControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
//------------------------------------------------------------------------------
void OControlModel::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getFastPropertyValue" );
switch ( _nHandle )
{
case PROPERTY_ID_NAME:
@@ -1062,7 +1033,6 @@ sal_Bool OControlModel::convertFastPropertyValue(
Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue)
throw (com::sun::star::lang::IllegalArgumentException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::convertFastPropertyValue" );
sal_Bool bModified(sal_False);
switch (_nHandle)
{
@@ -1092,7 +1062,6 @@ sal_Bool OControlModel::convertFastPropertyValue(
void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue)
throw (Exception)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setFastPropertyValue_NoBroadcast" );
switch (_nHandle)
{
case PROPERTY_ID_NAME:
@@ -1125,7 +1094,6 @@ void OControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const A
//------------------------------------------------------------------------------
void OControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::describeFixedProperties" );
BEGIN_DESCRIBE_BASE_PROPERTIES( 4 )
DECL_PROP2 (CLASSID, sal_Int16, READONLY, TRANSIENT);
DECL_PROP1 (NAME, ::rtl::OUString, BOUND);
@@ -1137,7 +1105,6 @@ void OControlModel::describeFixedProperties( Sequence< Property >& _rProps ) con
//------------------------------------------------------------------------------
void OControlModel::describeAggregateProperties( Sequence< Property >& /* [out] */ _rAggregateProps ) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::describeAggregateProperties" );
if ( m_xAggregateSet.is() )
{
Reference< XPropertySetInfo > xPSI( m_xAggregateSet->getPropertySetInfo() );
@@ -1149,14 +1116,12 @@ void OControlModel::describeAggregateProperties( Sequence< Property >& /* [out]
//------------------------------------------------------------------------------
::osl::Mutex& OControlModel::getMutex()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getMutex" );
return m_aMutex;
}
//------------------------------------------------------------------------------
void OControlModel::describeFixedAndAggregateProperties( Sequence< Property >& _out_rFixedProperties, Sequence< Property >& _out_rAggregateProperties ) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::describeFixedAndAggregateProperties" );
describeFixedProperties( _out_rFixedProperties );
describeAggregateProperties( _out_rAggregateProperties );
}
@@ -1164,49 +1129,42 @@ void OControlModel::describeFixedAndAggregateProperties( Sequence< Property >& _
//------------------------------------------------------------------------------
Reference< XMultiPropertySet > OControlModel::getPropertiesInterface()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertiesInterface" );
return Reference< XMultiPropertySet >( *this, UNO_QUERY );
}
//------------------------------------------------------------------------------
Reference< XPropertySetInfo> SAL_CALL OControlModel::getPropertySetInfo() throw( RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertySetInfo" );
return createPropertySetInfo( getInfoHelper() );
}
//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OControlModel::getInfoHelper()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getInfoHelper" );
return m_aPropertyBagHelper.getInfoHelper();
}
//--------------------------------------------------------------------
void SAL_CALL OControlModel::addProperty( const ::rtl::OUString& _rName, ::sal_Int16 _nAttributes, const Any& _rInitialValue ) throw (PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::addProperty" );
m_aPropertyBagHelper.addProperty( _rName, _nAttributes, _rInitialValue );
}
//--------------------------------------------------------------------
void SAL_CALL OControlModel::removeProperty( const ::rtl::OUString& _rName ) throw (UnknownPropertyException, NotRemoveableException, RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::removeProperty" );
m_aPropertyBagHelper.removeProperty( _rName );
}
//--------------------------------------------------------------------
Sequence< PropertyValue > SAL_CALL OControlModel::getPropertyValues() throw (RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getPropertyValues" );
return m_aPropertyBagHelper.getPropertyValues();
}
//--------------------------------------------------------------------
void SAL_CALL OControlModel::setPropertyValues( const Sequence< PropertyValue >& _rProps ) throw (UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setPropertyValues" );
m_aPropertyBagHelper.setPropertyValues( _rProps );
}
@@ -1249,7 +1207,6 @@ Any SAL_CALL OBoundControlModel::queryAggregation( const Type& _rType ) throw (R
Any aReturn( OControlModel::queryAggregation(_rType) );
if (!aReturn.hasValue())
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::queryAggregation" );
aReturn = OBoundControlModel_BASE1::queryInterface(_rType);
if ( !aReturn.hasValue() && m_bCommitable )
@@ -1427,10 +1384,19 @@ void OBoundControlModel::implInitValuePropertyListening( ) const
}
//-----------------------------------------------------------------------------
+void OBoundControlModel::initOwnValueProperty( const ::rtl::OUString& i_rValuePropertyName )
+{
+ OSL_PRECOND( !m_sValuePropertyName.getLength() && -1 == m_nValuePropertyAggregateHandle,
+ "OBoundControlModel::initOwnValueProperty: value property is already initialized!" );
+ OSL_ENSURE( i_rValuePropertyName.getLength(), "OBoundControlModel::initOwnValueProperty: invalid property name!" );
+ m_sValuePropertyName = i_rValuePropertyName;
+}
+
+//-----------------------------------------------------------------------------
void OBoundControlModel::initValueProperty( const ::rtl::OUString& _rValuePropertyName, sal_Int32 _nValuePropertyExternalHandle )
{
OSL_PRECOND( !m_sValuePropertyName.getLength() && -1 == m_nValuePropertyAggregateHandle,
- "OBoundControlModel::initValueProperty: already called before!" );
+ "OBoundControlModel::initValueProperty: value property is already initialized!" );
OSL_ENSURE( _rValuePropertyName.getLength(), "OBoundControlModel::initValueProperty: invalid property name!" );
OSL_ENSURE( _nValuePropertyExternalHandle != -1, "OBoundControlModel::initValueProperty: invalid property handle!" );
@@ -1495,7 +1461,6 @@ Sequence< Type > OBoundControlModel::_getTypes()
//-----------------------------------------------------------------------------
void OBoundControlModel::disposing()
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::_getTypes" );
OControlModel::disposing();
::osl::ClearableMutexGuard aGuard(m_aMutex);
@@ -1533,6 +1498,29 @@ void OBoundControlModel::disposing()
}
//------------------------------------------------------------------------------
+void OBoundControlModel::onValuePropertyChange( ControlModelLock& i_rControLock )
+{
+ if ( hasExternalValueBinding() )
+ { // the control value changed, while we have an external value binding
+ // -> forward the value to it
+ if ( m_eControlValueChangeInstigator != eExternalBinding )
+ transferControlValueToExternal( i_rControLock );
+ }
+ else if ( !m_bCommitable && m_xColumnUpdate.is() )
+ { // the control value changed, while we are bound to a database column,
+ // but not committable (which means changes in the control have to be reflected to
+ // the underlying database column immediately)
+ // -> forward the value to the database column
+ if ( m_eControlValueChangeInstigator != eDbColumnBinding )
+ commitControlValueToDbColumn( false );
+ }
+
+ // validate the new value
+ if ( m_bSupportsValidation )
+ recheckValidity( true );
+}
+
+//------------------------------------------------------------------------------
void OBoundControlModel::_propertyChanged( const PropertyChangeEvent& _rEvt ) throw ( RuntimeException )
{
ControlModelLock aLock( *this );
@@ -1543,26 +1531,8 @@ void OBoundControlModel::_propertyChanged( const PropertyChangeEvent& _rEvt ) th
"OBoundControlModel::_propertyChanged: where did this come from (2)?" );
if ( _rEvt.PropertyName == m_sValuePropertyName )
- { // our control value changed
-
- if ( hasExternalValueBinding() )
- { // the control value changed, while we have an external value binding
- // -> forward the value to it
- if ( m_eControlValueChangeInstigator != eExternalBinding )
- transferControlValueToExternal( aLock );
- }
- else if ( !m_bCommitable && m_xColumnUpdate.is() )
- { // the control value changed, while we are bound to a database column,
- // but not committable (which means changes in the control have to be reflected to
- // the underlying database column immediately)
- // -> forward the value to the database column
- if ( m_eControlValueChangeInstigator != eDbColumnBinding )
- commitControlValueToDbColumn( false );
- }
-
- // validate the new value
- if ( m_bSupportsValidation )
- recheckValidity( true );
+ {
+ onValuePropertyChange( aLock );
}
}
@@ -1673,7 +1643,6 @@ void SAL_CALL OBoundControlModel::disposing(const com::sun::star::lang::EventObj
//------------------------------------------------------------------------------
StringSequence SAL_CALL OBoundControlModel::getSupportedServiceNames() throw(RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::disposing" );
return ::comphelper::concatSequences(
getAggregateServiceNames(),
getSupportedServiceNames_Static()
@@ -1696,7 +1665,6 @@ Sequence< ::rtl::OUString > SAL_CALL OBoundControlModel::getSupportedServiceName
//------------------------------------------------------------------------------
void SAL_CALL OBoundControlModel::write( const Reference<stario::XObjectOutputStream>& _rxOutStream ) throw(stario::IOException, RuntimeException)
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::getSupportedServiceNames_Static" );
OControlModel::write(_rxOutStream);
osl::MutexGuard aGuard(m_aMutex);
@@ -1797,7 +1765,6 @@ void SAL_CALL OBoundControlModel::read( const Reference< stario::XObjectInputStr
//------------------------------------------------------------------------------
void OBoundControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OBoundControlModel::getFastPropertyValue" );
switch (nHandle)
{
case PROPERTY_ID_INPUT_REQUIRED:
@@ -1866,7 +1833,6 @@ sal_Bool OBoundControlModel::convertFastPropertyValue(
//------------------------------------------------------------------------------
Any OBoundControlModel::getPropertyDefaultByHandle( sal_Int32 _nHandle ) const
{
- // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::convertFastPropertyValue" );
Any aDefault;
switch ( _nHandle )
{
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index f74e82135708..3a7e05404d75 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -151,11 +151,14 @@ OImageControlModel::OImageControlModel(const Reference<XMultiServiceFactory>& _r
:OBoundControlModel( _rxFactory, VCL_CONTROLMODEL_IMAGECONTROL, FRM_SUN_CONTROL_IMAGECONTROL, sal_False, sal_False, sal_False )
// use the old control name for compytibility reasons
,m_pImageProducer( NULL )
+ ,m_bExternalGraphic( true )
,m_bReadOnly( sal_False )
+ ,m_sImageURL()
+ ,m_xGraphicObject()
{
DBG_CTOR( OImageControlModel, NULL );
m_nClassId = FormComponentType::IMAGECONTROL;
- initValueProperty( PROPERTY_IMAGE_URL, PROPERTY_ID_IMAGE_URL);
+ initOwnValueProperty( PROPERTY_IMAGE_URL );
implConstruct();
}
@@ -165,22 +168,20 @@ OImageControlModel::OImageControlModel( const OImageControlModel* _pOriginal, co
:OBoundControlModel( _pOriginal, _rxFactory )
// use the old control name for compytibility reasons
,m_pImageProducer( NULL )
+ ,m_bExternalGraphic( true )
+ ,m_bReadOnly( _pOriginal->m_bReadOnly )
+ ,m_sImageURL( _pOriginal->m_sImageURL )
+ ,m_xGraphicObject( _pOriginal->m_xGraphicObject )
{
DBG_CTOR( OImageControlModel, NULL );
implConstruct();
- m_bReadOnly = _pOriginal->m_bReadOnly;
osl_incrementInterlockedCount( &m_refCount );
{
// simulate a propertyChanged event for the ImageURL
// 2003-05-15 - #109591# - fs@openoffice.org
- Any aImageURL;
- getFastPropertyValue( aImageURL, PROPERTY_ID_IMAGE_URL );
- ::rtl::OUString sImageURL;
- aImageURL >>= sImageURL;
-
::osl::MutexGuard aGuard( m_aMutex );
- impl_handleNewImageURL_lck( sImageURL, eOther );
+ impl_handleNewImageURL_lck( eOther );
}
osl_decrementInterlockedCount( &m_refCount );
}
@@ -244,32 +245,20 @@ sal_Bool OImageControlModel::approveDbColumnType( sal_Int32 _nColumnType )
return ImageStoreInvalid != lcl_getImageStoreType( _nColumnType );
}
-
-//------------------------------------------------------------------------------
-void OImageControlModel::_propertyChanged( const PropertyChangeEvent& _rEvent )
- throw( RuntimeException )
-{
- if ( m_xColumnUpdate.is() )
- {
- OBoundControlModel::_propertyChanged( _rEvent );
- }
- else
- { // we're not bound. In this case, we have to manually care for updating the
- // image producer, since the base class will not do this
- ::rtl::OUString sImageURL;
- _rEvent.NewValue >>= sImageURL;
-
- ::osl::MutexGuard aGuard( m_aMutex );
- impl_handleNewImageURL_lck( sImageURL, eOther );
- }
-}
-
//------------------------------------------------------------------------------
void OImageControlModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle) const
{
switch (nHandle)
{
- case PROPERTY_ID_READONLY : rValue <<= (sal_Bool)m_bReadOnly; break;
+ case PROPERTY_ID_READONLY:
+ rValue <<= (sal_Bool)m_bReadOnly;
+ break;
+ case PROPERTY_ID_IMAGE_URL:
+ rValue <<= m_sImageURL;
+ break;
+ case PROPERTY_ID_GRAPHIC:
+ rValue <<= m_xGraphicObject.is() ? m_xGraphicObject->getGraphic() : Reference< XGraphic >();
+ break;
default:
OBoundControlModel::getFastPropertyValue(rValue, nHandle);
}
@@ -285,8 +274,51 @@ void OImageControlModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, con
m_bReadOnly = getBOOL(rValue);
break;
+ case PROPERTY_ID_IMAGE_URL:
+ OSL_VERIFY( rValue >>= m_sImageURL );
+ impl_handleNewImageURL_lck( eOther );
+ {
+ ControlModelLock aLock( *this );
+ // that's a fake ... onValuePropertyChange expects to receive the only lock to our instance,
+ // but we're already called with our mutex locked ...
+ onValuePropertyChange( aLock );
+ }
+ break;
+
+ case PROPERTY_ID_GRAPHIC:
+ {
+ Reference< XGraphic > xGraphic;
+ OSL_VERIFY( rValue >>= xGraphic );
+ if ( !xGraphic.is() )
+ m_xGraphicObject.clear();
+ else
+ {
+ m_xGraphicObject = GraphicObject::create( m_aContext.getUNOContext() );
+ m_xGraphicObject->setGraphic( xGraphic );
+ }
+
+ if ( m_bExternalGraphic )
+ {
+ // if that's an external graphic, i.e. one which has not been loaded by ourselves in response to a
+ // new image URL, then also adjust our ImageURL.
+ ::rtl::OUString sNewImageURL;
+ if ( m_xGraphicObject.is() )
+ {
+ sNewImageURL = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.GraphicObject:" ) );
+ sNewImageURL = sNewImageURL + m_xGraphicObject->getUniqueID();
+ }
+ m_sImageURL = sNewImageURL;
+ // TODO: speaking strictly, this would need to be notified, since ImageURL is a bound property. However,
+ // this method here is called with a locked mutex, so we cannot simply call listeners ...
+ // I think the missing notification (and thus clients which potentially cannot observe the change)
+ // is less severe than the potential deadlock ...
+ }
+ }
+ break;
+
default:
OBoundControlModel::setFastPropertyValue_NoBroadcast(nHandle, rValue);
+ break;
}
}
@@ -299,6 +331,15 @@ sal_Bool OImageControlModel::convertFastPropertyValue(Any& rConvertedValue, Any&
case PROPERTY_ID_READONLY :
return tryPropertyValue(rConvertedValue, rOldValue, rValue, m_bReadOnly);
+ case PROPERTY_ID_IMAGE_URL:
+ return tryPropertyValue( rConvertedValue, rOldValue, rValue, m_sImageURL );
+
+ case PROPERTY_ID_GRAPHIC:
+ {
+ const Reference< XGraphic > xGraphic( getFastPropertyValue( PROPERTY_ID_GRAPHIC ), UNO_QUERY );
+ return tryPropertyValue( rConvertedValue, rOldValue, rValue, xGraphic );
+ }
+
default:
return OBoundControlModel::convertFastPropertyValue(rConvertedValue, rOldValue, nHandle, rValue);
}
@@ -307,13 +348,25 @@ sal_Bool OImageControlModel::convertFastPropertyValue(Any& rConvertedValue, Any&
//------------------------------------------------------------------------------
void OImageControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
- BEGIN_DESCRIBE_PROPERTIES( 2, OBoundControlModel )
- DECL_BOOL_PROP1 ( READONLY, BOUND );
- DECL_PROP1 ( TABINDEX, sal_Int16, BOUND );
+ BEGIN_DESCRIBE_PROPERTIES( 4, OBoundControlModel )
+ DECL_IFACE_PROP2( GRAPHIC, XGraphic, BOUND, TRANSIENT );
+ DECL_PROP1 ( IMAGE_URL, ::rtl::OUString, BOUND );
+ DECL_BOOL_PROP1 ( READONLY, BOUND );
+ DECL_PROP1 ( TABINDEX, sal_Int16, BOUND );
END_DESCRIBE_PROPERTIES();
}
//------------------------------------------------------------------------------
+void OImageControlModel::describeAggregateProperties( Sequence< Property >& /* [out] */ o_rAggregateProperties ) const
+{
+ OBoundControlModel::describeAggregateProperties( o_rAggregateProperties );
+ // remove ImageULR and Graphic properties, we "overload" them. This is because our aggregate synchronizes those
+ // two, but we have an own sychronization mechanism.
+ RemoveProperty( o_rAggregateProperties, PROPERTY_IMAGE_URL );
+ RemoveProperty( o_rAggregateProperties, PROPERTY_GRAPHIC );
+}
+
+//------------------------------------------------------------------------------
::rtl::OUString OImageControlModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
return FRM_COMPONENT_IMAGECONTROL; // old (non-sun) name for compatibility !
@@ -411,18 +464,18 @@ sal_Bool OImageControlModel::impl_updateStreamForURL_lck( const ::rtl::OUString&
}
//------------------------------------------------------------------------------
-sal_Bool OImageControlModel::impl_handleNewImageURL_lck( const ::rtl::OUString& _rURL, ValueChangeInstigator _eInstigator )
+sal_Bool OImageControlModel::impl_handleNewImageURL_lck( ValueChangeInstigator _eInstigator )
{
switch ( lcl_getImageStoreType( getFieldType() ) )
{
case ImageStoreBinary:
- if ( impl_updateStreamForURL_lck( _rURL, _eInstigator ) )
+ if ( impl_updateStreamForURL_lck( m_sImageURL, _eInstigator ) )
return sal_True;
break;
case ImageStoreLink:
{
- ::rtl::OUString sCommitURL( _rURL );
+ ::rtl::OUString sCommitURL( m_sImageURL );
if ( m_sDocumentURL.getLength() )
sCommitURL = URIHelper::simpleNormalizedMakeRelative( m_sDocumentURL, sCommitURL );
OSL_ENSURE( m_xColumnUpdate.is(), "OImageControlModel::impl_handleNewImageURL_lck: no bound field, but ImageStoreLink?!" );
@@ -435,7 +488,7 @@ sal_Bool OImageControlModel::impl_handleNewImageURL_lck( const ::rtl::OUString&
break;
case ImageStoreInvalid:
- OSL_ENSURE( false, "OImageControlModel::impl_handleNewImageURL_lck: invalid current field type!" );
+ OSL_ENSURE( false, "OImageControlModel::impl_handleNewImageURL_lck: image storage type type!" );
break;
}
@@ -462,10 +515,7 @@ sal_Bool OImageControlModel::commitControlValueToDbColumn( bool _bPostReset )
else
{
::osl::MutexGuard aGuard(m_aMutex);
-
- ::rtl::OUString sImageURL;
- m_xAggregateSet->getPropertyValue( PROPERTY_IMAGE_URL ) >>= sImageURL;
- return impl_handleNewImageURL_lck( sImageURL, eDbColumnBinding );
+ return impl_handleNewImageURL_lck( eDbColumnBinding );
}
return sal_True;
@@ -523,7 +573,13 @@ Any OImageControlModel::translateDbColumnToControlValue()
{
switch ( lcl_getImageStoreType( getFieldType() ) )
{
- case ImageStoreBinary: return makeAny( m_xColumn->getBinaryStream() );
+ case ImageStoreBinary:
+ {
+ Reference< XInputStream > xImageStream( m_xColumn->getBinaryStream() );
+ if ( m_xColumn->wasNull() )
+ xImageStream.clear();
+ return makeAny( xImageStream );
+ }
case ImageStoreLink:
{
::rtl::OUString sImageLink( m_xColumn->getString() );
@@ -539,6 +595,12 @@ Any OImageControlModel::translateDbColumnToControlValue()
}
//------------------------------------------------------------------------------
+Any OImageControlModel::getControlValue( ) const
+{
+ return makeAny( m_sImageURL );
+}
+
+//------------------------------------------------------------------------------
void OImageControlModel::doSetControlValue( const Any& _rValue )
{
DBG_ASSERT( GetImageProducer() && m_xImageProducer.is(), "OImageControlModel::doSetControlValue: no image producer!" );
@@ -593,11 +655,6 @@ void OImageControlModel::doSetControlValue( const Any& _rValue )
void SAL_CALL OImageControlModel::disposing()
{
OBoundControlModel::disposing();
-
- {
- ::osl::MutexGuard aGuard( m_aMutex ); // setControlValue expects this
- setControlValue( Any(), eOther );
- }
}
//------------------------------------------------------------------------------
@@ -634,11 +691,17 @@ void SAL_CALL OImageControlModel::startProduction( ) throw (RuntimeException)
//------------------------------------------------------------------------------
IMPL_LINK( OImageControlModel, OnImageImportDone, ::Graphic*, i_pGraphic )
{
- ENSURE_OR_RETURN( i_pGraphic, "OImageControlModel::OnImageImportDone: illegal graphic!", 0L );
- setPropertyValue(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Graphic" ) ),
- makeAny( Image( i_pGraphic->GetBitmapEx() ).GetXGraphic() )
- );
+ const Reference< XGraphic > xGraphic( i_pGraphic != NULL ? Image( i_pGraphic->GetBitmapEx() ).GetXGraphic() : NULL );
+ m_bExternalGraphic = false;
+ try
+ {
+ setPropertyValue( PROPERTY_GRAPHIC, makeAny( xGraphic ) );
+ }
+ catch ( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ m_bExternalGraphic = true;
return 1L;
}
@@ -794,16 +857,16 @@ bool OImageControlControl::implInsertGraphics()
implClearGraphics( sal_False );
sal_Bool bIsLink = sal_False;
xController->getValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bIsLink;
+ // Force bIsLink to be TRUE if we're bound to a field. Though we initialized the file picker with IsLink=TRUE
+ // in this case, and disabled the respective control, there might be picker implementations which do not
+ // respect this, and return IsLink=FALSE here. In this case, "normalize" the flag.
+ // #i112659# / 2010-08-26 / frank.schoenheit@oracle.com
+ bIsLink |= bHasField;
if ( !bIsLink )
{
Graphic aGraphic;
aDialog.GetGraphic( aGraphic );
-
- Reference< graphic::XGraphicObject > xGrfObj = graphic::GraphicObject::create( m_aContext.getUNOContext() );
- xGrfObj->setGraphic( aGraphic.GetXGraphic() );
- rtl::OUString sObjectID( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.GraphicObject:" ) );
- sObjectID = sObjectID + xGrfObj->getUniqueID();
- xSet->setPropertyValue( PROPERTY_IMAGE_URL, makeAny( ::rtl::OUString( sObjectID ) ) );
+ xSet->setPropertyValue( PROPERTY_GRAPHIC, makeAny( aGraphic.GetXGraphic() ) );
}
else
xSet->setPropertyValue( PROPERTY_IMAGE_URL, makeAny( ::rtl::OUString( aDialog.GetPath() ) ) );
diff --git a/forms/source/component/ImageControl.hxx b/forms/source/component/ImageControl.hxx
index c31216fc8aca..853c4aadffbf 100644
--- a/forms/source/component/ImageControl.hxx
+++ b/forms/source/component/ImageControl.hxx
@@ -33,6 +33,7 @@
#include <com/sun/star/form/XImageProducerSupplier.hpp>
#include <com/sun/star/awt/XMouseListener.hpp>
#include <com/sun/star/util/XModifyBroadcaster.hpp>
+#include <com/sun/star/graphic/XGraphicObject.hpp>
#include <comphelper/propmultiplex.hxx>
#include <comphelper/implementationreference.hxx>
#include <cppuhelper/implbase2.hxx>
@@ -57,7 +58,11 @@ class OImageControlModel
{
::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer> m_xImageProducer;
ImageProducer* m_pImageProducer;
+ bool m_bExternalGraphic;
sal_Bool m_bReadOnly;
+ ::rtl::OUString m_sImageURL;
+ ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject >
+ m_xGraphicObject;
::rtl::OUString m_sDocumentURL;
protected:
@@ -86,9 +91,6 @@ public:
// OComponentHelper
virtual void SAL_CALL disposing();
- // OPropertyChangeListener
- virtual void _propertyChanged( const ::com::sun::star::beans::PropertyChangeEvent& ) throw(::com::sun::star::uno::RuntimeException);
-
// XPersistObject
virtual ::rtl::OUString SAL_CALL getServiceName() throw ( ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
@@ -103,6 +105,9 @@ public:
virtual void SAL_CALL startProduction( ) throw (::com::sun::star::uno::RuntimeException);
// OControlModel's property handling
+ virtual void describeAggregateProperties(
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
+ ) const;
virtual void describeFixedProperties(
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps
) const;
@@ -119,6 +124,8 @@ protected:
translateDbColumnToControlValue( );
virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset );
+ virtual ::com::sun::star::uno::Any
+ getControlValue( ) const;
virtual void doSetControlValue( const ::com::sun::star::uno::Any& _rValue );
virtual sal_Bool approveDbColumnType(sal_Int32 _nColumnType);
@@ -134,7 +141,7 @@ protected:
@precond
our own mutex is locked
*/
- sal_Bool impl_handleNewImageURL_lck( const ::rtl::OUString& _rURL, ValueChangeInstigator _eInstigator );
+ sal_Bool impl_handleNewImageURL_lck( ValueChangeInstigator _eInstigator );
/** updates the binary stream, created from loading the file which the given URL points to, into our
bound field, or the control itself if there is no bound field
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index 7e0293be334e..07abd703281d 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -351,6 +351,9 @@ void ImageProducer::startProduction() throw(::com::sun::star::uno::RuntimeExcept
// delete interfaces in temporary list
for( pCons = aTmp.First(); pCons; pCons = aTmp.Next() )
delete (::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageConsumer > *) pCons;
+
+ if ( maDoneHdl.IsSet() )
+ maDoneHdl.Call( NULL );
}
}
}
diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx
index de72e2b392e8..0c8b421008a3 100644
--- a/forms/source/inc/FormComponent.hxx
+++ b/forms/source/inc/FormComponent.hxx
@@ -759,6 +759,18 @@ protected:
sal_Int32 _nValuePropertyExternalHandle
);
+ /** initializes the part of the class which is related to the control value.
+
+ <p>In opposite to ->initValueProperty, this method is to be used for value properties which are <em>not</em>
+ implemented by our aggregate, but by ourselves.</p>
+
+ <p>Certain functionality is not available when using own value properties. This includes binding to an external
+ value and external validation. (This is not a conceptual limit, but simply missing implementation.)</p>
+ */
+ void initOwnValueProperty(
+ const ::rtl::OUString& i_rValuePropertyName
+ );
+
/** suspends listening at the value property
<p>As long as this listening is suspended, changes in the value property will not be
@@ -782,6 +794,16 @@ protected:
*/
void resumeValueListening( );
+ /** (to be) called when the value property changed
+
+ Normally, this is done automatically, since the value property is a property of our aggregate, and we're
+ a listener at this property.
+ However, in some cases the value property might not be an aggregate property, but a property of the
+ delegator instance. In this case, you'll need to call <code>onValuePropertyChange</code> whenever this
+ property changes.
+ */
+ void onValuePropertyChange( ControlModelLock& i_rControLock );
+
/** starts listening at the aggregate, for changes in the given property
<p>The OBoundControlModel automatically registers a multiplexer which listens for
diff --git a/forms/source/inc/frm_strings.hxx b/forms/source/inc/frm_strings.hxx
index 8a8105d2e1a7..1e3b1b1bd312 100644
--- a/forms/source/inc/frm_strings.hxx
+++ b/forms/source/inc/frm_strings.hxx
@@ -141,6 +141,7 @@ namespace frm
FORMS_CONSTASCII_STRING( PROPERTY_SUBMIT_METHOD, "SubmitMethod" );
FORMS_CONSTASCII_STRING( PROPERTY_SUBMIT_ENCODING, "SubmitEncoding" );
FORMS_CONSTASCII_STRING( PROPERTY_IMAGE_URL, "ImageURL" );
+ FORMS_CONSTASCII_STRING( PROPERTY_GRAPHIC, "Graphic" );
FORMS_CONSTASCII_STRING( PROPERTY_IMAGE_POSITION, "ImagePosition" );
FORMS_CONSTASCII_STRING( PROPERTY_EMPTY_IS_NULL, "ConvertEmptyToNull" );
FORMS_CONSTASCII_STRING( PROPERTY_LISTSOURCETYPE, "ListSourceType" );
diff --git a/forms/source/inc/property.hrc b/forms/source/inc/property.hrc
index c1064e6d56b9..0582ce36c6ee 100644
--- a/forms/source/inc/property.hrc
+++ b/forms/source/inc/property.hrc
@@ -61,7 +61,7 @@ namespace frm
#define PROPERTY_ID_WRITING_MODE (PROPERTY_ID_START + 20)
#define PROPERTY_ID_CONTEXT_WRITING_MODE (PROPERTY_ID_START + 21)
#define PROPERTY_ID_VERTICAL_ALIGN (PROPERTY_ID_START + 22)
- // free
+#define PROPERTY_ID_GRAPHIC (PROPERTY_ID_START + 23)
// free
// free
// free
diff --git a/forms/source/misc/property.cxx b/forms/source/misc/property.cxx
index 04bc9c8c8911..fffb7557ad5e 100644
--- a/forms/source/misc/property.cxx
+++ b/forms/source/misc/property.cxx
@@ -134,6 +134,7 @@ void PropertyInfoService::initialize()
ADD_PROP_ASSIGNMENT(SUBMIT_METHOD);
ADD_PROP_ASSIGNMENT(SUBMIT_ENCODING);
ADD_PROP_ASSIGNMENT(IMAGE_URL);
+ ADD_PROP_ASSIGNMENT(GRAPHIC);
ADD_PROP_ASSIGNMENT(EMPTY_IS_NULL);
ADD_PROP_ASSIGNMENT(LISTSOURCETYPE);
ADD_PROP_ASSIGNMENT(LISTSOURCE);
diff --git a/l10ntools/java/jpropex/java/JPropEx.java b/l10ntools/java/jpropex/java/JPropEx.java
index ceeeb5083982..f068f93ad18b 100644
--- a/l10ntools/java/jpropex/java/JPropEx.java
+++ b/l10ntools/java/jpropex/java/JPropEx.java
@@ -126,8 +126,8 @@ public class JPropEx
{
key = (String) e.nextElement();
currentStr = (SdfEntity) dolly.clone();
- // Set the new LID and the string text
- currentStr.setLid( key );
+ // Set the new GID and the string text
+ currentStr.setGid( key );
value = prop.getProperty( key , "" );
//if( value.equals("") ) System.err.println("Warning: in file "+inputFileArg+" the string with the key "+key+" has a empty string!");
str = (prop.getProperty( key )).replaceAll("\t" , " " ); // remove tab
@@ -211,7 +211,7 @@ public class JPropEx
key = (String) e.nextElement();
sourceString = sourceProp.getProperty( key );
curStr = (SdfEntity) dolly.clone();
- curStr.setLid( key );
+ curStr.setGid( key );
for( Enumeration lang = langs.elements(); lang.hasMoreElements(); ) // merge in every language
{
curEntity = (SdfEntity) curStr.clone();
@@ -221,12 +221,12 @@ public class JPropEx
if( mergedEntity == null )
{
// in case there is no translation then fallback to the en-US source string
- ( (java.util.Properties) props.get( curLang )).setProperty( curEntity.getLid() , sourceString );
+ ( (java.util.Properties) props.get( curLang )).setProperty( curEntity.getGid() , sourceString );
}
else
{
// Set the merged text from the sdf file
- ( (java.util.Properties) props.get( curLang )).setProperty( mergedEntity.getLid() , mergedEntity.getText() ); // TODO: Quoting ???
+ ( (java.util.Properties) props.get( curLang )).setProperty( mergedEntity.getGid() , mergedEntity.getText() ); // TODO: Quoting ???
}
}
diff --git a/l10ntools/prj/build.lst b/l10ntools/prj/build.lst
index 8387154897b3..d8a2e8c00649 100644
--- a/l10ntools/prj/build.lst
+++ b/l10ntools/prj/build.lst
@@ -1,6 +1,7 @@
-tr l10ntools : tools LIBXSLT:libxslt BERKELEYDB:berkeleydb LUCENE:lucene NULL
+tr l10ntools : tools LIBXSLT:libxslt BERKELEYDB:berkeleydb LUCENE:lucene PYTHON:python NULL
tr l10ntools usr1 - all tr_mkout NULL
tr l10ntools\inc nmake - all tr_inc NULL
+tr l10ntools\scripts nmake - all tr_scripts NULL
tr l10ntools\source nmake - all tr_src tr_inc NULL
tr l10ntools\layout nmake - all rt_layout tr_src tr_inc NULL
tr l10ntools\java\jpropex nmake - all tr_blah NULL
diff --git a/l10ntools/prj/d.lst b/l10ntools/prj/d.lst
index 53c846832fca..9d493e1e9673 100644
--- a/l10ntools/prj/d.lst
+++ b/l10ntools/prj/d.lst
@@ -47,14 +47,18 @@ mkdir: %_DEST%\bin%_EXT%\help\com\sun\star\help
..\scripts\localize %_DEST%\bin%_EXT%\localize
..\scripts\fast_merge.pl %_DEST%\bin%_EXT%\fast_merge.pl
..\scripts\keyidGen.pl %_DEST%\bin%_EXT%\keyidGen.pl
-..\scripts\tool\const.py %_DEST%\bin%_EXT%\const.py
-..\scripts\tool\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py
-..\scripts\tool\xtxex.py %_DEST%\bin%_EXT%\xtxex.py
-..\scripts\tool\sdf.py %_DEST%\bin%_EXT%\sdf.py
-..\scripts\tool\xhtex.py %_DEST%\bin%_EXT%\xhtex.py
-..\scripts\tool\pseudo.py %_DEST%\bin%_EXT%\pseudo.py
..\scripts\xtxex %_DEST%\bin%_EXT%\xtxex
..\scripts\xhtex %_DEST%\bin%_EXT%\xhtex
+..\%__SRC%\bin\const.py %_DEST%\bin%_EXT%\const.py
+..\%__SRC%\bin\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py
+..\%__SRC%\bin\pseudo.py %_DEST%\bin%_EXT%\pseudo.py
+..\%__SRC%\bin\sdf.py %_DEST%\bin%_EXT%\sdf.py
+..\%__SRC%\bin\const.pyc %_DEST%\bin%_EXT%\const.pyc
+..\%__SRC%\bin\l10ntool.pyc %_DEST%\bin%_EXT%\l10ntool.pyc
+..\%__SRC%\bin\pseudo.pyc %_DEST%\bin%_EXT%\pseudo.pyc
+..\%__SRC%\bin\sdf.pyc %_DEST%\bin%_EXT%\sdf.pyc
+..\%__SRC%\bin\xhtex.py %_DEST%\bin%_EXT%\xhtex.py
+..\%__SRC%\bin\xtxex.py %_DEST%\bin%_EXT%\xtxex.py
..\inc\export.hxx %_DEST%\inc%_EXT%\l10ntools\export.hxx
..\inc\l10ntools\directory.hxx %_DEST%\inc%_EXT%\l10ntools\directory.hxx
diff --git a/l10ntools/scripts/makefile.mk b/l10ntools/scripts/makefile.mk
new file mode 100644
index 000000000000..8bfa64e3fbad
--- /dev/null
+++ b/l10ntools/scripts/makefile.mk
@@ -0,0 +1,59 @@
+#*************************************************************************
+#
+# 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
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+# Copy *.py files into output tree and call a script once to
+# force python to create the *.pyc files.
+
+PRJ=..
+TARGET = l10ntools_dummy_pyc
+
+.INCLUDE: settings.mk
+
+.IF "$(SYSTEM_PYTHON)"!="YES"
+PYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(SOLARBINDIR)/python
+.ELSE # "$(SYSTEM_PYTHON)"!="YES"
+PYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) python
+.ENDIF # "$(SYSTEM_PYTHON)"!="YES"
+
+PYFILES = $(BIN)$/const.py \
+ $(BIN)$/l10ntool.py \
+ $(BIN)$/pseudo.py \
+ $(BIN)$/sdf.py \
+ $(BIN)$/xhtex.py \
+ $(BIN)$/xtxex.py
+
+.INCLUDE: target.mk
+
+.IGNORE : create_pyc
+ALLTAR : create_pyc
+create_pyc : $(PYFILES)
+ @$(PYTHON) $(BIN)/xtxex.py >& /dev/null
+
+$(BIN)$/%.py : tool/%.py
+ @$(COPY) $< $@
+
+
diff --git a/l10ntools/scripts/tool/xhtex.py b/l10ntools/scripts/tool/xhtex.py
index c427a7feccdd..ae973aacc555 100644
--- a/l10ntools/scripts/tool/xhtex.py
+++ b/l10ntools/scripts/tool/xhtex.py
@@ -108,7 +108,7 @@ class Xhtex(AbstractL10nTool):
def parse_file(self, filename):
document = ""
try:
- f = open(filename,"r+")
+ f = open(filename,"r")
document = f.read()
except IOError:
print "ERROR: Can not read file " + filename
diff --git a/l10ntools/scripts/xhtex b/l10ntools/scripts/xhtex
index ca307cf2d4a4..d337694c589b 100755
--- a/l10ntools/scripts/xhtex
+++ b/l10ntools/scripts/xhtex
@@ -31,16 +31,8 @@ if [ x${SOLARENV}x = xx ]; then
exit 1
fi
-if [ ${GUI} = "WNT" ]; then
if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
exec python $SOLARVERSION/$INPATH/bin/xhtex.py "$@"
else
exec python $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xhtex.py "$@"
fi
-else
-if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
- exec python -B $SOLARVERSION/$INPATH/bin/xhtex.py "$@"
-else
- exec python -B $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xhtex.py "$@"
-fi
-fi
diff --git a/l10ntools/scripts/xtxex b/l10ntools/scripts/xtxex
index fb54c1aee36c..01a70ae57d80 100755
--- a/l10ntools/scripts/xtxex
+++ b/l10ntools/scripts/xtxex
@@ -31,17 +31,9 @@ if [ x${SOLARENV}x = xx ]; then
exit 1
fi
-if [ ${GUI} = "WNT" ]; then
if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
exec python $SOLARVERSION/$INPATH/bin/xtxex.py "$@"
else
exec python $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xtxex.py "$@"
fi
-else
-if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
- exec python -B $SOLARVERSION/$INPATH/bin/xtxex.py "$@"
-else
- exec python -B $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xtxex.py "$@"
-fi
-fi
diff --git a/l10ntools/source/help/HelpIndexerTool.java b/l10ntools/source/help/HelpIndexerTool.java
index 2a49f964d48f..a39b5399e38d 100644
--- a/l10ntools/source/help/HelpIndexerTool.java
+++ b/l10ntools/source/help/HelpIndexerTool.java
@@ -72,6 +72,9 @@ public class HelpIndexerTool
String aSegmentName = "";
// Scan arguments
+ //If this tool is invoked in the build process for extensions help,
+ //then -extension must be set.
+ boolean bExtension = false;
boolean bLang = false;
boolean bMod = false;
boolean bZipDir = false;
@@ -83,7 +86,11 @@ public class HelpIndexerTool
int nArgCount = args.length;
for( int i = 0 ; i < nArgCount ; i++ )
{
- if( "-lang".equals(args[i]) )
+ if( "-extension".equals(args[i]) )
+ {
+ bExtension = true;
+ }
+ else if( "-lang".equals(args[i]) )
{
if( i + 1 < nArgCount )
{
@@ -142,20 +149,21 @@ public class HelpIndexerTool
bSegmentName = true;
}
i++;
- if (!(bCfsName && bSegmentName))
- {
- System.out.println("Usage: HelpIndexer -checkcfsandsegname _0 _3 (2 arguments needed)");
- System.exit( -1 );
- }
+ if (!(bCfsName && bSegmentName))
+ {
+ System.out.println("Usage: HelpIndexer -checkcfsandsegname _0 _3 (2 arguments needed)");
+ System.exit( -1 );
+ }
}
}
- if( !bLang || !bMod || !bZipDir || (!bOutput && !bExtensionMode) )
+ if( !bLang || !bMod || !bZipDir || (!bOutput && !bExtensionMode && !bExtension) )
{
if( bExtensionMode )
return;
System.out.println("Usage: HelpIndexer -lang ISOLangCode -mod HelpModule -zipdir TempZipDir -o OutputZipFile");
+ System.out.println("Usage: HelpIndexer -extension -lang ISOLangCode -mod HelpModule -zipdir PathToLangDir");
System.exit( -1 );
}
@@ -199,7 +207,7 @@ public class HelpIndexerTool
System.out.println( "Checking segment file " + aSegmentName+ ": " + (bSegmentFileOk ? "Found" : "Not found") );
}
- if( bExtensionMode )
+ if( bExtensionMode || bExtension)
{
if( !bSrcDir )
{
diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx
index 94139f89de1e..411859bfe994 100644
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@ -269,6 +269,8 @@ private:
fs::path idxContentStylesheet;
fs::path zipdir;
fs::path outputFile;
+ std::string extsource;
+ std::string extdestination;
std::string module;
std::string lang;
std::string hid;
@@ -762,18 +764,9 @@ void HelpLinker::main( std::vector<std::string> &args,
const rtl::OUString* pOfficeHelpPath )
throw( HelpProcessingException )
{
- rtl::OUString aOfficeHelpPath;
-
bExtensionMode = false;
- if( pExtensionPath && pExtensionPath->length() > 0 && pOfficeHelpPath )
- {
- helpFiles.clear();
- bExtensionMode = true;
- extensionPath = *pExtensionPath;
- sourceRoot = fs::path(extensionPath);
- extensionDestination = *pDestination;
- aOfficeHelpPath = *pOfficeHelpPath;
- }
+ helpFiles.clear();
+
if (args.size() > 0 && args[0][0] == '@')
{
std::vector<std::string> stringList;
@@ -793,10 +786,34 @@ void HelpLinker::main( std::vector<std::string> &args,
}
size_t i = 0;
-
+ bool bSrcOption = false;
while (i < args.size())
{
- if (args[i].compare("-src") == 0)
+ if (args[i].compare("-extlangsrc") == 0)
+ {
+ ++i;
+ if (i >= args.size())
+ {
+ std::stringstream aStrStream;
+ aStrStream << "extension source missing" << std::endl;
+ throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+ }
+ extsource = args[i];
+ }
+ else if (args[i].compare("-extlangdest") == 0)
+ {
+ //If this argument is not provided then the location provided in -extsource will
+ //also be the destination
+ ++i;
+ if (i >= args.size())
+ {
+ std::stringstream aStrStream;
+ aStrStream << "extension destination missing" << std::endl;
+ throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+ }
+ extdestination = args[i];
+ }
+ else if (args[i].compare("-src") == 0)
{
++i;
if (i >= args.size())
@@ -805,9 +822,8 @@ void HelpLinker::main( std::vector<std::string> &args,
aStrStream << "sourceroot missing" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
-
- if( !bExtensionMode )
- sourceRoot = fs::path(args[i], fs::native);
+ bSrcOption = true;
+ sourceRoot = fs::path(args[i], fs::native);
}
else if (args[i].compare("-sty") == 0)
{
@@ -933,21 +949,70 @@ void HelpLinker::main( std::vector<std::string> &args,
++i;
}
+ //We can be called from the helplinker executable or the extension manager
+ //In the latter case extsource is not used.
+ if( (pExtensionPath && pExtensionPath->length() > 0 && pOfficeHelpPath)
+ || !extsource.empty())
+ {
+ bExtensionMode = true;
+ if (!extsource.empty())
+ {
+ //called from helplinker.exe, pExtensionPath and pOfficeHelpPath
+ //should be NULL
+ sourceRoot = fs::path(extsource, fs::native);
+ extensionPath = sourceRoot.toUTF8();
+
+ if (extdestination.empty())
+ {
+ std::stringstream aStrStream;
+ aStrStream << "-extlangdest is missing" << std::endl;
+ throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+ }
+ else
+ {
+ //Convert from system path to file URL!!!
+ fs::path p(extdestination, fs::native);
+ extensionDestination = p.toUTF8();
+ }
+ }
+ else
+ { //called from extension manager
+ extensionPath = *pExtensionPath;
+ sourceRoot = fs::path(extensionPath);
+ extensionDestination = *pDestination;
+ }
+ //check if -src option was used. This option must not be used
+ //when extension help is compiled.
+ if (bSrcOption)
+ {
+ std::stringstream aStrStream;
+ aStrStream << "-src must not be used together with -extsource missing" << std::endl;
+ throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+ }
+ }
+
if (!bExtensionMode && zipdir.empty())
{
std::stringstream aStrStream;
aStrStream << "no index dir given" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
- if (!bExtensionMode && idxCaptionStylesheet.empty())
+
+ if (!bExtensionMode && idxCaptionStylesheet.empty()
+ || !extsource.empty() && idxCaptionStylesheet.empty())
{
+ //No extension mode and extension mode using commandline
+ //!extsource.empty indicates extension mode using commandline
+ // -idxcaption paramter is required
std::stringstream aStrStream;
aStrStream << "no index caption stylesheet given" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
- else if ( bExtensionMode )
+ else if ( bExtensionMode && extsource.empty())
{
- rtl::OUString aIdxCaptionPathFileURL( aOfficeHelpPath );
+ //This part is used when compileExtensionHelp is called from the extensions manager.
+ //If extension help is compiled using helplinker in the build process
+ rtl::OUString aIdxCaptionPathFileURL( *pOfficeHelpPath );
aIdxCaptionPathFileURL += rtl::OUString::createFromAscii( "/idxcaption.xsl" );
rtl::OString aOStr_IdxCaptionPathFileURL( rtl::OUStringToOString
@@ -956,15 +1021,23 @@ void HelpLinker::main( std::vector<std::string> &args,
idxCaptionStylesheet = fs::path( aStdStr_IdxCaptionPathFileURL );
}
- if (!bExtensionMode && idxContentStylesheet.empty())
+
+ if (!bExtensionMode && idxContentStylesheet.empty()
+ || !extsource.empty() && idxContentStylesheet.empty())
{
+ //No extension mode and extension mode using commandline
+ //!extsource.empty indicates extension mode using commandline
+ // -idxcontent paramter is required
std::stringstream aStrStream;
aStrStream << "no index content stylesheet given" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
- else if ( bExtensionMode )
+ else if ( bExtensionMode && extsource.empty())
{
- rtl::OUString aIdxContentPathFileURL( aOfficeHelpPath );
+ //If extension help is compiled using helplinker in the build process
+ //then -idxcontent must be supplied
+ //This part is used when compileExtensionHelp is called from the extensions manager.
+ rtl::OUString aIdxContentPathFileURL( *pOfficeHelpPath );
aIdxContentPathFileURL += rtl::OUString::createFromAscii( "/idxcontent.xsl" );
rtl::OString aOStr_IdxContentPathFileURL( rtl::OUStringToOString
diff --git a/more_fonts/fonts/ttf_dejavu/makefile.mk b/more_fonts/fonts/ttf_dejavu/makefile.mk
index f9fa78a7664b..090661bbde02 100644
--- a/more_fonts/fonts/ttf_dejavu/makefile.mk
+++ b/more_fonts/fonts/ttf_dejavu/makefile.mk
@@ -36,9 +36,9 @@ TARGET=ttf_dejavu
# --- Files --------------------------------------------------------
-TARFILE_NAME=dejavu-fonts-ttf-2.30
-TARFILE_MD5=fe5b3e2b7c4577f30dc001054365653e
-TARFILE_ROOTDIR=dejavu-fonts-ttf-2.30
+TARFILE_NAME=dejavu-fonts-ttf-2.32
+TARFILE_MD5=37282537d0ed1a087b1c8f050dc812d9
+TARFILE_ROOTDIR=dejavu-fonts-ttf-2.32
PATCH_FILES=
diff --git a/more_fonts/prj/d.lst b/more_fonts/prj/d.lst
index 261aae0b2d28..6dba097941ac 100644
--- a/more_fonts/prj/d.lst
+++ b/more_fonts/prj/d.lst
@@ -1,8 +1,8 @@
mkdir: %COMMON_DEST%\pck%_EXT%
..\fonts\fc_local.conf %COMMON_DEST%\pck%_EXT%\fc_local.conf
# TODO: replace explicit versions by wildcard when the build system learns to handle them
-..\%__SRC%\misc\build\dejavu-fonts-ttf-2.30\ttf\*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf
-..\%__SRC%\misc\build\dejavu-fonts-ttf-2.30\LICENSE %COMMON_DEST%\pck%_EXT%\LICENSE_dejavu
+..\%__SRC%\misc\build\dejavu-fonts-ttf-2.32\ttf\*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf
+..\%__SRC%\misc\build\dejavu-fonts-ttf-2.32\LICENSE %COMMON_DEST%\pck%_EXT%\LICENSE_dejavu
..\%__SRC%\misc\build\liberation-fonts-ttf-1.06.0.20100721/Liberation*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf
..\%__SRC%\misc\build\liberation-fonts-ttf-1.06.0.20100721/License.txt %COMMON_DEST%\pck%_EXT%\LICENSE_liberation
..\%__SRC%\misc\build\gentiumbasic-fonts-1.10\*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf
diff --git a/odk/setsdkenv_unix b/odk/setsdkenv_unix
index 31e0200eb1b7..31e0200eb1b7 100644..100755
--- a/odk/setsdkenv_unix
+++ b/odk/setsdkenv_unix
diff --git a/offapi/com/sun/star/sheet/DataPilotSourceDimension.idl b/offapi/com/sun/star/sheet/DataPilotSourceDimension.idl
index bb652252c33e..9f5961731a05 100644
--- a/offapi/com/sun/star/sheet/DataPilotSourceDimension.idl
+++ b/offapi/com/sun/star/sheet/DataPilotSourceDimension.idl
@@ -156,6 +156,14 @@ published service DataPilotSourceDimension
*/
[property] sequence< com::sun::star::sheet::TableFilterField > Filter;
+ //-------------------------------------------------------------------------
+
+ /** contains flags that control the usage of the dimension.
+
+ @see com::sun::star::sheet::DimensionFlags
+ */
+ [readonly, property, optional] long Flags;
+
};
//=============================================================================
diff --git a/offapi/com/sun/star/sheet/DimensionFlags.idl b/offapi/com/sun/star/sheet/DimensionFlags.idl
new file mode 100644
index 000000000000..2edb2368e863
--- /dev/null
+++ b/offapi/com/sun/star/sheet/DimensionFlags.idl
@@ -0,0 +1,74 @@
+/*************************************************************************
+ *
+ * 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
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_sheet_DimensionFlags_idl__
+#define __com_sun_star_sheet_DimensionFlags_idl__
+
+//=============================================================================
+
+module com { module sun { module star { module sheet {
+
+//=============================================================================
+
+/** used to specify flags for a dimension in a data pilot source.
+
+ @see com::sun::star::sheet::DataPilotSourceDimension
+ */
+published constants DimensionFlags
+{
+ //-------------------------------------------------------------------------
+
+ /** The dimension cannot be used in column orientation.
+ */
+ const long NO_COLUMN_ORIENTATION = 1;
+
+ //-------------------------------------------------------------------------
+
+ /** The dimension cannot be used in row orientation.
+ */
+ const long NO_ROW_ORIENTATION = 2;
+
+ //-------------------------------------------------------------------------
+
+ /** The dimension cannot be used in page orientation.
+ */
+ const long NO_PAGE_ORIENTATION = 4;
+
+ //-------------------------------------------------------------------------
+
+ /** The dimension cannot be used in data orientation.
+ */
+ const long NO_DATA_ORIENTATION = 8;
+
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/sheet/makefile.mk b/offapi/com/sun/star/sheet/makefile.mk
index 016378178f29..65e8d5c40491 100644
--- a/offapi/com/sun/star/sheet/makefile.mk
+++ b/offapi/com/sun/star/sheet/makefile.mk
@@ -122,6 +122,7 @@ IDLFILES=\
DatabaseRange.idl\
DatabaseRanges.idl\
DatabaseRangesEnumeration.idl\
+ DimensionFlags.idl\
DocumentSettings.idl\
ExternalDocLink.idl\
ExternalDocLinks.idl\
diff --git a/ooo.lst b/ooo.lst
index 9f51cf668a73..f49780f8e708 100755
--- a/ooo.lst
+++ b/ooo.lst
@@ -69,7 +69,7 @@ fb7ba5c2182be4e73748859967455455-README_stax-api-1.0-2-sources.txt
fca8706f2c4619e2fa3f8f42f8fc1e9d-rasqal-0.9.16.tar.gz
fcc6df1160753d0b8c835d17fdeeb0a7-boost_1_39_0.tar.gz
fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz
-fe5b3e2b7c4577f30dc001054365653e-dejavu-fonts-ttf-2.30.zip
+37282537d0ed1a087b1c8f050dc812d9-dejavu-fonts-ttf-2.32.zip
831126a1ee5af269923cfab6050769fe-mysql-connector-cpp.zip
067201ea8b126597670b5eff72e1f66c-mythes-1.2.0.tar.gz
cf8a6967f7de535ae257fa411c98eb88-mdds_0.3.0.tar.bz2
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java
index 74fe1728fc5f..f3c5ef383057 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java
@@ -81,7 +81,15 @@ public class TableCellLayoutController extends SectionLayoutController
}
else if ( "float".equals(valueType))
{
- attributeMap.setAttribute(OfficeNamespaces.OFFICE_NS, FormatValueUtility.VALUE, "1.#NAN");
+ attributeMap.setAttribute(OfficeNamespaces.OFFICE_NS,
+ FormatValueUtility.VALUE, "NaN");
+ }
+ // #i114108#: except on form elements, the only value-type that can
+ // occur without an accomanying value attribute is "string"
+ else if (!"string".equals(valueType))
+ {
+ attributeMap.setAttribute(OfficeNamespaces.OFFICE_NS,
+ FormatValueUtility.VALUE_TYPE, "string");
}
}
catch (Exception e)
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java b/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java
index d4046424e07d..b41252a17089 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java
@@ -138,6 +138,10 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
public static final String VERTICAL_POS = "vertical-pos";
private static final String ZERO_CM = "0cm";
+ /** the verison of the ODF specification to which generated documents
+ * shall conform. */
+ public static final String ODF_VERSION = "1.2";
+
protected static class BufferState
{
@@ -376,7 +380,8 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
rootAttributes.addNamespaceDeclaration("xsd", OfficeNamespaces.XSD_NS);
rootAttributes.addNamespaceDeclaration("xsi", OfficeNamespaces.XSI_NS);
rootAttributes.addNamespaceDeclaration("grddl", OfficeNamespaces.GRDDL_NS);
- rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.2");
+ rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version",
+ ODF_VERSION);
this.rootXmlWriter.writeXmlDeclaration("UTF-8");
this.rootXmlWriter.writeTag(OfficeNamespaces.OFFICE_NS, "document-content", rootAttributes, XmlWriterSupport.OPEN);
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java b/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java
index 9b2e6b33b5f7..54b7d0d0159c 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java
@@ -117,11 +117,11 @@ public class StylesWriter
{
globals
});
- writeAutomaticStylesSection(new OfficeStylesCollection[]
+ writeCommonStylesSection(new OfficeStylesCollection[]
{
globals
});
- writeCommonStylesSection(new OfficeStylesCollection[]
+ writeAutomaticStylesSection(new OfficeStylesCollection[]
{
globals
});
@@ -374,11 +374,12 @@ public class StylesWriter
rootAttributes.addNamespaceDeclaration("xsd", OfficeNamespaces.XSD_NS);
rootAttributes.addNamespaceDeclaration("xsi", OfficeNamespaces.XSI_NS);
rootAttributes.addNamespaceDeclaration("grddl", OfficeNamespaces.GRDDL_NS);
- rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.2");
+ rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version",
+ OfficeDocumentReportTarget.ODF_VERSION);
this.xmlWriter.writeXmlDeclaration("UTF-8");
this.xmlWriter.writeTag(OfficeNamespaces.OFFICE_NS,
- "document-content", rootAttributes, XmlWriterSupport.OPEN);
+ "document-styles", rootAttributes, XmlWriterSupport.OPEN);
}
public void close()
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java b/reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java
index 11351b656ea1..d2c4ebd96e3c 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java
@@ -624,7 +624,9 @@ public class SpreadsheetRawReportTarget extends OfficeDocumentReportTarget
final Section tableColumnProperties = new Section();
tableColumnProperties.setType("table-column-properties");
tableColumnProperties.setNamespace(style.getNamespace());
- tableColumnProperties.setAttribute(style.getNamespace(), "column-width", columnWidth + getUnitsOfMeasure(null));
+ final String width = String.format("%f", columnWidth);
+ tableColumnProperties.setAttribute(style.getNamespace(),
+ "column-width", width + getUnitsOfMeasure(null));
style.addNode(tableColumnProperties);
final AttributeList myAttrList = new AttributeList();
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java b/reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java
index 7c90bf1fd0ec..9f3746086b87 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java
@@ -1269,7 +1269,8 @@ public class TextRawReportTarget extends OfficeDocumentReportTarget
rootAttributes.addNamespaceDeclaration("office", OfficeNamespaces.OFFICE_NS);
rootAttributes.addNamespaceDeclaration("config", OfficeNamespaces.CONFIG);
rootAttributes.addNamespaceDeclaration("ooo", OfficeNamespaces.OO2004_NS);
- rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.0");
+ rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version",
+ OfficeDocumentReportTarget.ODF_VERSION);
final OutputStream outputStream = getOutputRepository().createOutputStream("settings.xml", "text/xml");
final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), createTagDescription());
xmlWriter.setAlwaysAddNamespace(true);
diff --git a/reportbuilder/util/description.xml b/reportbuilder/util/description.xml
index c274526edc06..9461172d55f1 100755
--- a/reportbuilder/util/description.xml
+++ b/reportbuilder/util/description.xml
@@ -3,7 +3,7 @@
xmlns:d="http://openoffice.org/extensions/description/2006"
xmlns:xlink="http://www.w3.org/1999/xlink">
<display-name>
- <name lang="en-US">Oracle Report Builder</name>
+ <name lang="en-US">Report Builder</name>
<!-- <name lang="en-US">Oracle(TM) Report Builder</name> -->
</display-name>
<registration>
diff --git a/sal/inc/rtl/math.h b/sal/inc/rtl/math.h
index 872d526b8835..985ce700b049 100644
--- a/sal/inc/rtl/math.h
+++ b/sal/inc/rtl/math.h
@@ -140,9 +140,8 @@ enum rtl_math_DecimalPlaces
/** Conversions analogous to sprintf() using internal rounding.
- +/-HUGE_VAL are converted to "1.#INF" and "-1.#INF", NAN values are
- converted to "1.#NAN" and "-1.#NAN", of course using cDecSeparator instead
- of '.'.
+ +/-HUGE_VAL are converted to "INF" and "-INF", NAN values are
+ converted to "NaN".
@param pResult
Returns the resulting byte string. Must itself not be null, and must point
@@ -216,9 +215,8 @@ void SAL_CALL rtl_math_doubleToString(rtl_String ** pResult,
/** Conversions analogous to sprintf() using internal rounding.
- +/-HUGE_VAL are converted to "1.#INF" and "-1.#INF", NAN values are
- converted to "1.#NAN" and "-1.#NAN", of course using cDecSeparator instead
- of '.'.
+ +/-HUGE_VAL are converted to "INF" and "-INF", NAN values are
+ converted to "NaN".
@param pResult
Returns the resulting Unicode string. Must itself not be null, and must
@@ -296,8 +294,9 @@ void SAL_CALL rtl_math_doubleToUString(rtl_uString ** pResult,
Leading tabs (0x09) and spaces (0x20) are eaten. Overflow returns
+/-HUGE_VAL, underflow 0. In both cases pStatus is set to
rtl_math_ConversionStatus_OutOfRange, otherwise to
- rtl_math_ConversionStatus_Ok. "+/-1.#INF" is recognized as +/-HUGE_VAL,
- pStatus is set to rtl_math_ConversionStatus_OutOfRange. "+/-1.#NAN" is
+ rtl_math_ConversionStatus_Ok. "INF", "-INF" and "+/-1.#INF" are
+ recognized as +/-HUGE_VAL, pStatus is set to
+ rtl_math_ConversionStatus_OutOfRange. "NaN" and "+/-1.#NAN" are
recognized and the value is set to +/-NAN, pStatus is set to
rtl_math_ConversionStatus_Ok.
@@ -333,8 +332,9 @@ double SAL_CALL rtl_math_stringToDouble(
Leading tabs (U+0009) and spaces (U+0020) are eaten. Overflow returns
+/-HUGE_VAL, underflow 0. In both cases pStatus is set to
rtl_math_ConversionStatus_OutOfRange, otherwise to
- rtl_math_ConversionStatus_Ok. "+/-1.#INF" is recognized as +/-HUGE_VAL,
- pStatus is set to rtl_math_ConversionStatus_OutOfRange. "+/-1.#NAN" is
+ rtl_math_ConversionStatus_Ok. "INF", "-INF" and "+/-1.#INF" are
+ recognized as +/-HUGE_VAL, pStatus is set to
+ rtl_math_ConversionStatus_OutOfRange. "NaN" and "+/-1.#NAN" are
recognized and the value is set to +/-NAN, pStatus is set to
rtl_math_ConversionStatus_Ok.
diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index f893f7520d40..a74baaefc057 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl/w32/signal.cxx
@@ -188,7 +188,7 @@ static BOOL ReportCrash( LPEXCEPTION_POINTERS lpEP )
sntprintf( szBuffer, elementsof(szBuffer),
_T("%s -p %u -excp 0x%p -t %u%s"),
- aPath,
+ static_cast<sal_Char*>( aPath ),
GetCurrentProcessId(),
lpEP,
GetCurrentThreadId(),
diff --git a/sal/rtl/source/math.cxx b/sal/rtl/source/math.cxx
index 7d0e3cea0c0d..d983c5726230 100644
--- a/sal/rtl/source/math.cxx
+++ b/sal/rtl/source/math.cxx
@@ -318,44 +318,37 @@ inline void doubleToString(StringT ** pResult,
if ( rtl::math::isNan( fValue ) )
{
- sal_Int32 nCapacity = RTL_CONSTASCII_LENGTH("-1.#NAN");
+ // #i112652# XMLSchema-2
+ sal_Int32 nCapacity = RTL_CONSTASCII_LENGTH("NaN");
if (pResultCapacity == 0)
{
pResultCapacity = &nCapacity;
T::createBuffer(pResult, pResultCapacity);
nResultOffset = 0;
}
-
- if ( bSign )
- T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("-"));
- T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("1"));
- T::appendChar(pResult, pResultCapacity, &nResultOffset, cDecSeparator);
T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("#NAN"));
+ RTL_CONSTASCII_STRINGPARAM("NaN"));
+
return;
}
bool bHuge = fValue == HUGE_VAL; // g++ 3.0.1 requires it this way...
if ( bHuge || rtl::math::isInf( fValue ) )
{
- sal_Int32 nCapacity = RTL_CONSTASCII_LENGTH("-1.#INF");
+ // #i112652# XMLSchema-2
+ sal_Int32 nCapacity = RTL_CONSTASCII_LENGTH("-INF");
if (pResultCapacity == 0)
{
pResultCapacity = &nCapacity;
T::createBuffer(pResult, pResultCapacity);
nResultOffset = 0;
}
-
if ( bSign )
T::appendAscii(pResult, pResultCapacity, &nResultOffset,
RTL_CONSTASCII_STRINGPARAM("-"));
T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("1"));
- T::appendChar(pResult, pResultCapacity, &nResultOffset, cDecSeparator);
- T::appendAscii(pResult, pResultCapacity, &nResultOffset,
- RTL_CONSTASCII_STRINGPARAM("#INF"));
+ RTL_CONSTASCII_STRINGPARAM("INF"));
+
return;
}
@@ -736,158 +729,185 @@ inline double stringToDouble(CharT const * pBegin, CharT const * pEnd,
++p0;
}
CharT const * p = p0;
+ bool bDone = false;
- // leading zeros and group separators may be safely ignored
- while (p != pEnd && (*p == CharT('0') || *p == cGroupSeparator))
- ++p;
-
- long nValExp = 0; // carry along exponent of mantissa
-
- // integer part of mantissa
- for (; p != pEnd; ++p)
+ // #i112652# XMLSchema-2
+ if (3 >= (pEnd - p))
{
- CharT c = *p;
- if (isDigit(c))
+ if ((CharT('N') == p[0]) && (CharT('a') == p[1])
+ && (CharT('N') == p[2]))
{
- fVal = fVal * 10.0 + static_cast< double >( c - CharT('0') );
- ++nValExp;
+ p += 3;
+ rtl::math::setNan( &fVal );
+ bDone = true;
+ }
+ else if ((CharT('I') == p[0]) && (CharT('N') == p[1])
+ && (CharT('F') == p[2]))
+ {
+ p += 3;
+ fVal = HUGE_VAL;
+ eStatus = rtl_math_ConversionStatus_OutOfRange;
+ bDone = true;
}
- else if (c != cGroupSeparator)
- break;
}
- // fraction part of mantissa
- if (p != pEnd && *p == cDecSeparator)
+ if (!bDone) // do not recognize e.g. NaN1.23
{
- ++p;
- double fFrac = 0.0;
- long nFracExp = 0;
- while (p != pEnd && *p == CharT('0'))
- {
- --nFracExp;
+ // leading zeros and group separators may be safely ignored
+ while (p != pEnd && (*p == CharT('0') || *p == cGroupSeparator))
++p;
- }
- if ( nValExp == 0 )
- nValExp = nFracExp - 1; // no integer part => fraction exponent
- // one decimal digit needs ld(10) ~= 3.32 bits
- static const int nSigs = (DBL_MANT_DIG / 3) + 1;
- int nDigs = 0;
+
+ long nValExp = 0; // carry along exponent of mantissa
+
+ // integer part of mantissa
for (; p != pEnd; ++p)
{
CharT c = *p;
- if (!isDigit(c))
- break;
- if ( nDigs < nSigs )
- { // further digits (more than nSigs) don't have any significance
- fFrac = fFrac * 10.0 + static_cast< double >( c - CharT('0') );
- --nFracExp;
- ++nDigs;
+ if (isDigit(c))
+ {
+ fVal = fVal * 10.0 + static_cast< double >( c - CharT('0') );
+ ++nValExp;
}
+ else if (c != cGroupSeparator)
+ break;
}
- if ( fFrac != 0.0 )
- fVal += rtl::math::pow10Exp( fFrac, nFracExp );
- else if ( nValExp < 0 )
- nValExp = 0; // no digit other than 0 after decimal point
- }
-
- if ( nValExp > 0 )
- --nValExp; // started with offset +1 at the first mantissa digit
- // Exponent
- if (p != p0 && p != pEnd && (*p == CharT('E') || *p == CharT('e')))
- {
- ++p;
- bool bExpSign;
- if (p != pEnd && *p == CharT('-'))
+ // fraction part of mantissa
+ if (p != pEnd && *p == cDecSeparator)
{
- bExpSign = true;
++p;
- }
- else
- {
- bExpSign = false;
- if (p != pEnd && *p == CharT('+'))
- ++p;
- }
- if ( fVal == 0.0 )
- { // no matter what follows, zero stays zero, but carry on the offset
- while (p != pEnd && isDigit(*p))
+ double fFrac = 0.0;
+ long nFracExp = 0;
+ while (p != pEnd && *p == CharT('0'))
+ {
+ --nFracExp;
++p;
- }
- else
- {
- bool bOverFlow = false;
- long nExp = 0;
+ }
+ if ( nValExp == 0 )
+ nValExp = nFracExp - 1; // no integer part => fraction exponent
+ // one decimal digit needs ld(10) ~= 3.32 bits
+ static const int nSigs = (DBL_MANT_DIG / 3) + 1;
+ int nDigs = 0;
for (; p != pEnd; ++p)
{
CharT c = *p;
if (!isDigit(c))
break;
- int i = c - CharT('0');
- if ( long10Overflow( nExp, i ) )
- bOverFlow = true;
- else
- nExp = nExp * 10 + i;
- }
- if ( nExp )
- {
- if ( bExpSign )
- nExp = -nExp;
- long nAllExp = ( bOverFlow ? 0 : nExp + nValExp );
- if ( nAllExp > DBL_MAX_10_EXP || (bOverFlow && !bExpSign) )
- { // overflow
- fVal = HUGE_VAL;
- eStatus = rtl_math_ConversionStatus_OutOfRange;
- }
- else if ( nAllExp < DBL_MIN_10_EXP || (bOverFlow && bExpSign) )
- { // underflow
- fVal = 0.0;
- eStatus = rtl_math_ConversionStatus_OutOfRange;
- }
- else if ( nExp > DBL_MAX_10_EXP || nExp < DBL_MIN_10_EXP )
- { // compensate exponents
- fVal = rtl::math::pow10Exp( fVal, -nValExp );
- fVal = rtl::math::pow10Exp( fVal, nAllExp );
+ if ( nDigs < nSigs )
+ { // further digits (more than nSigs) don't have any
+ // significance
+ fFrac = fFrac * 10.0 + static_cast<double>(c - CharT('0'));
+ --nFracExp;
+ ++nDigs;
}
- else
- fVal = rtl::math::pow10Exp( fVal, nExp ); // normal
}
+ if ( fFrac != 0.0 )
+ fVal += rtl::math::pow10Exp( fFrac, nFracExp );
+ else if ( nValExp < 0 )
+ nValExp = 0; // no digit other than 0 after decimal point
}
- }
- else if (p - p0 == 2 && p != pEnd && p[0] == CharT('#')
- && p[-1] == cDecSeparator && p[-2] == CharT('1'))
- {
- if (pEnd - p >= 4 && p[1] == CharT('I') && p[2] == CharT('N')
- && p[3] == CharT('F'))
+
+ if ( nValExp > 0 )
+ --nValExp; // started with offset +1 at the first mantissa digit
+
+ // Exponent
+ if (p != p0 && p != pEnd && (*p == CharT('E') || *p == CharT('e')))
{
- // "1.#INF", "+1.#INF", "-1.#INF"
- p += 4;
- fVal = HUGE_VAL;
- eStatus = rtl_math_ConversionStatus_OutOfRange;
- // Eat any further digits:
- while (p != pEnd && isDigit(*p))
+ ++p;
+ bool bExpSign;
+ if (p != pEnd && *p == CharT('-'))
+ {
+ bExpSign = true;
++p;
+ }
+ else
+ {
+ bExpSign = false;
+ if (p != pEnd && *p == CharT('+'))
+ ++p;
+ }
+ if ( fVal == 0.0 )
+ { // no matter what follows, zero stays zero, but carry on the
+ // offset
+ while (p != pEnd && isDigit(*p))
+ ++p;
+ }
+ else
+ {
+ bool bOverFlow = false;
+ long nExp = 0;
+ for (; p != pEnd; ++p)
+ {
+ CharT c = *p;
+ if (!isDigit(c))
+ break;
+ int i = c - CharT('0');
+ if ( long10Overflow( nExp, i ) )
+ bOverFlow = true;
+ else
+ nExp = nExp * 10 + i;
+ }
+ if ( nExp )
+ {
+ if ( bExpSign )
+ nExp = -nExp;
+ long nAllExp = ( bOverFlow ? 0 : nExp + nValExp );
+ if ( nAllExp > DBL_MAX_10_EXP || (bOverFlow && !bExpSign) )
+ { // overflow
+ fVal = HUGE_VAL;
+ eStatus = rtl_math_ConversionStatus_OutOfRange;
+ }
+ else if ((nAllExp < DBL_MIN_10_EXP) ||
+ (bOverFlow && bExpSign) )
+ { // underflow
+ fVal = 0.0;
+ eStatus = rtl_math_ConversionStatus_OutOfRange;
+ }
+ else if ( nExp > DBL_MAX_10_EXP || nExp < DBL_MIN_10_EXP )
+ { // compensate exponents
+ fVal = rtl::math::pow10Exp( fVal, -nValExp );
+ fVal = rtl::math::pow10Exp( fVal, nAllExp );
+ }
+ else
+ fVal = rtl::math::pow10Exp( fVal, nExp ); // normal
+ }
+ }
}
- else if (pEnd - p >= 4 && p[1] == CharT('N') && p[2] == CharT('A')
- && p[3] == CharT('N'))
+ else if (p - p0 == 2 && p != pEnd && p[0] == CharT('#')
+ && p[-1] == cDecSeparator && p[-2] == CharT('1'))
{
- // "1.#NAN", "+1.#NAN", "-1.#NAN"
- p += 4;
- rtl::math::setNan( &fVal );
- if (bSign)
+ if (pEnd - p >= 4 && p[1] == CharT('I') && p[2] == CharT('N')
+ && p[3] == CharT('F'))
{
- union {
- double sd;
- sal_math_Double md;
- } m;
- m.sd = fVal;
- m.md.w32_parts.msw |= 0x80000000; // create negative NaN
- fVal = m.sd;
- bSign = false; // don't negate again
+ // "1.#INF", "+1.#INF", "-1.#INF"
+ p += 4;
+ fVal = HUGE_VAL;
+ eStatus = rtl_math_ConversionStatus_OutOfRange;
+ // Eat any further digits:
+ while (p != pEnd && isDigit(*p))
+ ++p;
+ }
+ else if (pEnd - p >= 4 && p[1] == CharT('N') && p[2] == CharT('A')
+ && p[3] == CharT('N'))
+ {
+ // "1.#NAN", "+1.#NAN", "-1.#NAN"
+ p += 4;
+ rtl::math::setNan( &fVal );
+ if (bSign)
+ {
+ union {
+ double sd;
+ sal_math_Double md;
+ } m;
+ m.sd = fVal;
+ m.md.w32_parts.msw |= 0x80000000; // create negative NaN
+ fVal = m.sd;
+ bSign = false; // don't negate again
+ }
+ // Eat any further digits:
+ while (p != pEnd && isDigit(*p))
+ ++p;
}
- // Eat any further digits:
- while (p != pEnd && isDigit(*p))
- ++p;
}
}
diff --git a/sc/inc/ViewSettingsSequenceDefines.hxx b/sc/inc/ViewSettingsSequenceDefines.hxx
index f23229d31a43..07c3d2b375e0 100644
--- a/sc/inc/ViewSettingsSequenceDefines.hxx
+++ b/sc/inc/ViewSettingsSequenceDefines.hxx
@@ -103,6 +103,6 @@
#define SC_PAGEVIEWZOOMVALUE "PageViewZoomValue"
#define SC_SHOWPAGEBREAKPREVIEW "ShowPageBreakPreview"
#define SC_VIEWID "ViewId"
-#define SC_VIEW "View"
+#define SC_VIEW "view"
#endif
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 44aa1daa9a92..e1b88919dad6 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -186,7 +186,7 @@ public:
bool IsDataDescriptionCell(const ScAddress& rPos);
bool IsDimNameInUse(const ::rtl::OUString& rName) const;
- String GetDimName( long nDim, BOOL& rIsDataLayout );
+ String GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags = NULL );
BOOL IsDuplicated( long nDim );
long GetDimCount();
void GetHeaderPositionData(const ScAddress& rPos, ::com::sun::star::sheet::DataPilotTableHeaderData& rData);
@@ -259,6 +259,8 @@ public:
PivotField* pRefColFields = NULL, SCSIZE nRefColCount = 0,
PivotField* pRefRowFields = NULL, SCSIZE nRefRowCount = 0,
PivotField* pRefPageFields = NULL, SCSIZE nRefPageCount = 0 );
+
+ static bool IsOrientationAllowed( USHORT nOrient, sal_Int32 nDimFlags );
};
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index bfff0b97a168..8272b850b27e 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -140,6 +140,7 @@ public:
void SetSubTotals(long nCount, const USHORT* pFuncs);
long GetSubTotalsCount() const { return nSubTotalCount; }
USHORT GetSubTotalFunc(long nIndex) const { return pSubTotalFuncs[nIndex]; }
+ bool HasShowEmpty() const;
void SetShowEmpty(BOOL bSet);
BOOL GetShowEmpty() const { return BOOL(nShowEmptyMode); }
void SetFunction(USHORT nNew); // enum GeneralFunction
diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx
index 915a311411c4..489f272bc8ba 100644
--- a/sc/inc/pivot.hxx
+++ b/sc/inc/pivot.hxx
@@ -141,6 +141,7 @@ struct ScDPLabelData
SCsCOL mnCol;
USHORT mnFuncMask; /// Page/Column/Row subtotal function.
sal_Int32 mnUsedHier; /// Used hierarchy.
+ sal_Int32 mnFlags; /// Flags from the DataPilotSource dimension
bool mbShowAll; /// true = Show all (also empty) results.
bool mbIsValue; /// true = Sum or count in data field.
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 2d011f425398..1e56743d8129 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -565,6 +565,7 @@
#define SC_UNO_FIELD_SUBTOTALNAME "FieldSubtotalName"
#define SC_UNO_GRANDTOTAL_NAME "GrandTotalName"
#define SC_UNO_HAS_HIDDEN_MEMBER "HasHiddenMember"
+#define SC_UNO_FLAGS "Flags"
// (preliminary:)
#define SC_UNO_REFVALUE "ReferenceValue"
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index e994339f4a9a..29ba9f15dc92 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -65,6 +65,7 @@
#include <com/sun/star/sheet/DataPilotTableHeaderData.hpp>
#include <com/sun/star/sheet/DataPilotTablePositionData.hpp>
#include <com/sun/star/sheet/DataPilotTablePositionType.hpp>
+#include <com/sun/star/sheet/DimensionFlags.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
@@ -845,7 +846,7 @@ bool ScDPObject::IsDimNameInUse(const OUString& rName) const
return false;
}
-String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout )
+String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags )
{
rIsDataLayout = FALSE;
String aRet;
@@ -879,6 +880,10 @@ String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout )
rIsDataLayout = TRUE;
else
aRet = String( aName );
+
+ if (pFlags)
+ *pFlags = ScUnoHelpFunctions::GetLongProperty( xDimProp,
+ rtl::OUString::createFromAscii(SC_UNO_FLAGS), 0 );
}
}
}
@@ -2003,6 +2008,8 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
GetHierarchies(nDim, pNewLabel->maHiers);
GetMembers(nDim, GetUsedHierarchy(nDim), pNewLabel->maMembers);
lcl_FillLabelData(*pNewLabel, xDimProp);
+ pNewLabel->mnFlags = ScUnoHelpFunctions::GetLongProperty( xDimProp,
+ rtl::OUString::createFromAscii(SC_UNO_FLAGS), 0 );
rParam.maLabelArray.push_back(pNewLabel);
}
}
@@ -2231,6 +2238,32 @@ void ScDPObject::ConvertOrientation( ScDPSaveData& rSaveData,
}
}
+// static
+bool ScDPObject::IsOrientationAllowed( USHORT nOrient, sal_Int32 nDimFlags )
+{
+ bool bAllowed = true;
+ switch (nOrient)
+ {
+ case sheet::DataPilotFieldOrientation_PAGE:
+ bAllowed = ( nDimFlags & sheet::DimensionFlags::NO_PAGE_ORIENTATION ) == 0;
+ break;
+ case sheet::DataPilotFieldOrientation_COLUMN:
+ bAllowed = ( nDimFlags & sheet::DimensionFlags::NO_COLUMN_ORIENTATION ) == 0;
+ break;
+ case sheet::DataPilotFieldOrientation_ROW:
+ bAllowed = ( nDimFlags & sheet::DimensionFlags::NO_ROW_ORIENTATION ) == 0;
+ break;
+ case sheet::DataPilotFieldOrientation_DATA:
+ bAllowed = ( nDimFlags & sheet::DimensionFlags::NO_DATA_ORIENTATION ) == 0;
+ break;
+ default:
+ {
+ // allowed to remove from previous orientation
+ }
+ }
+ return bAllowed;
+}
+
// -----------------------------------------------------------------------
// static
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index dd493bb0df6c..bad05968bf72 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -410,6 +410,11 @@ void ScDPSaveDimension::SetSubTotals(long nCount, const USHORT* pFuncs)
bSubTotalDefault = FALSE;
}
+bool ScDPSaveDimension::HasShowEmpty() const
+{
+ return nShowEmptyMode != SC_DPSAVEMODE_DONTKNOW;
+}
+
void ScDPSaveDimension::SetShowEmpty(BOOL bSet)
{
nShowEmptyMode = bSet;
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index da40e6e230c4..b4ca5dbc7330 100755..100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -1576,6 +1576,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPDimension::getPropertySetIn
static SfxItemPropertyMapEntry aDPDimensionMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_FILTER), 0, &getCppuType((uno::Sequence<sheet::TableFilterField>*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNO_FLAGS), 0, &getCppuType((sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNO_FUNCTION), 0, &getCppuType((sheet::GeneralFunction*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_ISDATALA), 0, &getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNO_NUMBERFO), 0, &getCppuType((sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
@@ -1753,6 +1754,11 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const rtl::OUString& aPropert
aRet <<= mpSubtotalName.get() ? *mpSubtotalName : OUString::createFromAscii("");
else if (aNameStr.EqualsAscii(SC_UNO_HAS_HIDDEN_MEMBER))
aRet <<= mbHasHiddenMember;
+ else if (aNameStr.EqualsAscii(SC_UNO_FLAGS))
+ {
+ sal_Int32 nFlags = 0; // tabular data: all orientations are possible
+ aRet <<= nFlags;
+ }
else
{
DBG_ERROR("unknown property");
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index 5a6174bc0129..ddac72f0230b 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -82,6 +82,7 @@ ScDPLabelData::ScDPLabelData( const String& rName, short nCol, bool bIsValue ) :
mnCol( nCol ),
mnFuncMask( PIVOT_FUNC_NONE ),
mnUsedHier( 0 ),
+ mnFlags( 0 ),
mbShowAll( false ),
mbIsValue( bIsValue )
{
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index d54e16b8cbd7..4223c05c4f83 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -3100,10 +3100,13 @@ void ScTable::SetDrawPageSize(bool bResetStreamValid, bool bUpdateNoteCaptionPos
ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
if( pDrawLayer )
{
- long x = GetColOffset( MAXCOL + 1 );
- long y = GetRowOffset( MAXROW + 1 );
- x = (long) ((double) x * HMM_PER_TWIPS);
- y = (long) ((double) y * HMM_PER_TWIPS);
+ double fValX = GetColOffset( MAXCOL + 1 ) * HMM_PER_TWIPS;
+ double fValY = GetRowOffset( MAXROW + 1 ) * HMM_PER_TWIPS;
+ const long nMax = ::std::numeric_limits<long>::max();
+ // #i113884# Avoid int32 overflow with possible negative results than can cause bad effects.
+ // If the draw page size is smaller than all rows, only the bottom of the sheet is affected.
+ long x = ( fValX > (double)nMax ) ? nMax : (long) fValX;
+ long y = ( fValY > (double)nMax ) ? nMax : (long) fValY;
if ( IsLayoutRTL() ) // IsNegativePage
x = -x;
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index e43ff21a114d..f8cba5ecf6c3 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -503,9 +503,13 @@ void ScXMLExportDataPilot::WriteMembers(ScDPSaveDimension* pDim)
void ScXMLExportDataPilot::WriteLevels(ScDPSaveDimension* pDim)
{
- rtl::OUStringBuffer sBuffer;
- SvXMLUnitConverter::convertBool(sBuffer, pDim->GetShowEmpty());
- rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SHOW_EMPTY, sBuffer.makeStringAndClear());
+ // #i114202# GetShowEmpty is only valid if HasShowEmpty is true.
+ if (pDim->HasShowEmpty())
+ {
+ rtl::OUStringBuffer sBuffer;
+ SvXMLUnitConverter::convertBool(sBuffer, pDim->GetShowEmpty());
+ rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SHOW_EMPTY, sBuffer.makeStringAndClear());
+ }
SvXMLElementExport aElemDPL(rExport, XML_NAMESPACE_TABLE, XML_DATA_PILOT_LEVEL, sal_True, sal_True);
WriteSubTotals(pDim);
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 6b04993ba0bc..b5a19ef0ec9b 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -735,8 +735,9 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHOR
for (long nDim=0; nDim<nDimCount; nDim++)
{
BOOL bIsDataLayout;
- String aName = rDPObj.GetDimName( nDim, bIsDataLayout );
- if ( !bIsDataLayout && !rDPObj.IsDuplicated( nDim ) )
+ sal_Int32 nDimFlags = 0;
+ String aName = rDPObj.GetDimName( nDim, bIsDataLayout, &nDimFlags );
+ if ( !bIsDataLayout && !rDPObj.IsDuplicated( nDim ) && ScDPObject::IsOrientationAllowed( nOrient, nDimFlags ) )
{
const ScDPSaveDimension* pDimension = pSaveData ? pSaveData->GetExistingDimensionByName(aName) : 0;
if ( !pDimension || (pDimension->GetOrientation() != nOrient) )
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index 1eca44a787ed..56d7e3550cda 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -567,7 +567,9 @@ void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Po
}
}
- if ( (toArr->back().get() == NULL)
+ bool bAllowed = IsOrientationAllowed( fData.mnCol, eToType );
+ if ( bAllowed
+ && (toArr->back().get() == NULL)
&& (!Contains( toArr, fData.mnCol, nAt )) )
{
// ggF. in anderem Fenster entfernen
@@ -714,7 +716,8 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF
{
ScDPFuncData fData( *((*fromArr)[nFromIndex]) );
- if ( Contains( fromArr, fData.mnCol, nAt ) )
+ bool bAllowed = IsOrientationAllowed( fData.mnCol, eToType );
+ if ( bAllowed && Contains( fromArr, fData.mnCol, nAt ) )
{
fromWnd->DelField( nAt );
Remove( fromArr, nAt );
@@ -935,21 +938,41 @@ PointerStyle ScDPLayoutDlg::NotifyMouseMove( const Point& rAt )
if ( bIsDrag )
{
Point aPos = ScreenToOutputPixel( rAt );
+ ScDPFieldType eCheckTarget = TYPE_SELECT;
if ( aRectPage.IsInside( aPos ) )
- ePtr = lclGetPointerForField( TYPE_PAGE );
+ eCheckTarget = TYPE_PAGE;
else if ( aRectCol.IsInside( aPos ) )
- ePtr = lclGetPointerForField( TYPE_COL );
+ eCheckTarget = TYPE_COL;
else if ( aRectRow.IsInside( aPos ) )
- ePtr = lclGetPointerForField( TYPE_ROW );
+ eCheckTarget = TYPE_ROW;
else if ( aRectData.IsInside( aPos ) )
- ePtr = lclGetPointerForField( TYPE_DATA );
+ eCheckTarget = TYPE_DATA;
else if ( eDnDFromType != TYPE_SELECT )
ePtr = POINTER_PIVOT_DELETE;
else if ( aRectSelect.IsInside( aPos ) )
ePtr = lclGetPointerForField( TYPE_SELECT );
else
ePtr = POINTER_NOTALLOWED;
+
+ if ( eCheckTarget != TYPE_SELECT )
+ {
+ // check if the target orientation is allowed for this field
+ ScDPFuncDataVec* fromArr = NULL;
+ switch ( eDnDFromType )
+ {
+ case TYPE_PAGE: fromArr = &aPageArr; break;
+ case TYPE_COL: fromArr = &aColArr; break;
+ case TYPE_ROW: fromArr = &aRowArr; break;
+ case TYPE_DATA: fromArr = &aDataArr; break;
+ case TYPE_SELECT: fromArr = &aSelectArr; break;
+ }
+ ScDPFuncData fData( *((*fromArr)[nDnDFromIndex]) );
+ if (IsOrientationAllowed( fData.mnCol, eCheckTarget ))
+ ePtr = lclGetPointerForField( eCheckTarget );
+ else
+ ePtr = POINTER_NOTALLOWED;
+ }
}
return ePtr;
@@ -1218,6 +1241,28 @@ String ScDPLayoutDlg::GetLabelString( SCsCOL nCol )
return String();
}
+//----------------------------------------------------------------------------
+
+bool ScDPLayoutDlg::IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType )
+{
+ bool bAllowed = true;
+ ScDPLabelData* pData = GetLabelData( nCol );
+ DBG_ASSERT( pData, "LabelData not found" );
+ if (pData)
+ {
+ sheet::DataPilotFieldOrientation eOrient = sheet::DataPilotFieldOrientation_HIDDEN;
+ switch (eType)
+ {
+ case TYPE_PAGE: eOrient = sheet::DataPilotFieldOrientation_PAGE; break;
+ case TYPE_COL: eOrient = sheet::DataPilotFieldOrientation_COLUMN; break;
+ case TYPE_ROW: eOrient = sheet::DataPilotFieldOrientation_ROW; break;
+ case TYPE_DATA: eOrient = sheet::DataPilotFieldOrientation_DATA; break;
+ case TYPE_SELECT: eOrient = sheet::DataPilotFieldOrientation_HIDDEN; break;
+ }
+ bAllowed = ScDPObject::IsOrientationAllowed( (USHORT)eOrient, pData->mnFlags );
+ }
+ return bAllowed;
+}
//----------------------------------------------------------------------------
diff --git a/sc/source/ui/inc/pvlaydlg.hxx b/sc/source/ui/inc/pvlaydlg.hxx
index c74b9e028d2f..e16c3266510e 100644
--- a/sc/source/ui/inc/pvlaydlg.hxx
+++ b/sc/source/ui/inc/pvlaydlg.hxx
@@ -198,6 +198,7 @@ private:
Point DlgPos2WndPos ( const Point& rPt, Window& rWnd );
ScDPLabelData* GetLabelData ( SCsCOL nCol, size_t* pPos = NULL );
String GetLabelString ( SCsCOL nCol );
+ bool IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType );
String GetFuncString ( USHORT& rFuncMask, BOOL bIsValue = TRUE );
BOOL Contains ( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt );
void Remove ( ScDPFuncDataVec* pArr, size_t nAt );
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index b4313c1d7a32..28cc2a823928 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -144,7 +144,6 @@ private:
ScNavigatorSettings* pNavSettings;
// used in first Activate
- ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > aPendingUserData;
BOOL bFirstActivate;
BOOL bActiveDrawSh;
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index a64814d952ef..ec584213898c 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -309,10 +309,17 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
aPosRect, nOrient, nDimPos );
UpdateDragRect( bHasRange && bMove, aPosRect );
+ BOOL bIsDataLayout;
+ sal_Int32 nDimFlags = 0;
+ String aDimName = pDragDPObj->GetDimName( nDPField, bIsDataLayout, &nDimFlags );
+ bool bAllowed = !bHasRange || ScDPObject::IsOrientationAllowed( nOrient, nDimFlags );
+
if (bMove) // set mouse pointer
{
PointerStyle ePointer = POINTER_PIVOT_DELETE;
- if ( bHasRange )
+ if ( !bAllowed )
+ ePointer = POINTER_NOTALLOWED;
+ else if ( bHasRange )
switch (nOrient)
{
case sheet::DataPilotFieldOrientation_COLUMN: ePointer = POINTER_PIVOT_COL; break;
@@ -327,15 +334,13 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
if (!bHasRange)
nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
- BOOL bIsDataLayout;
- String aDimName = pDragDPObj->GetDimName( nDPField, bIsDataLayout );
if ( bIsDataLayout && ( nOrient != sheet::DataPilotFieldOrientation_COLUMN &&
nOrient != sheet::DataPilotFieldOrientation_ROW ) )
{
// removing data layout is not allowed
pViewData->GetView()->ErrorMessage(STR_PIVOT_MOVENOTALLOWED);
}
- else
+ else if ( bAllowed )
{
ScDPSaveData aSaveData( *pDragDPObj->GetSaveData() );
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 38d5144274c5..48ffd4fd39a4 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -108,7 +108,7 @@ SFX_IMPL_INTERFACE( ScPreviewShell, SfxViewShell, ScResId(SCSTR_PREVIEWSHELL) )
SFX_POPUPMENU_REGISTRATION(ScResId(RID_POPUP_PREVIEW));
}
-SFX_IMPL_VIEWFACTORY( ScPreviewShell, ScResId(STR_NONAME) )
+SFX_IMPL_NAMED_VIEWFACTORY( ScPreviewShell, "PrintPreview" )
{
SFX_VIEW_REGISTRATION(ScDocShell);
}
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index 1733cf2e19b5..2fc2bba072d9 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -102,7 +102,7 @@ SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId(SCSTR_TABVIEWSHELL))
//-->Added by PengYunQuan for Validity Cell Range Picker
}
-SFX_IMPL_VIEWFACTORY( ScTabViewShell, ScResId(STR_NONAME) )
+SFX_IMPL_NAMED_VIEWFACTORY( ScTabViewShell, "Default" )
{
SFX_VIEW_REGISTRATION(ScDocShell);
}
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index ed09ec85ee8c..0835d08de9fd 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -173,13 +173,6 @@ void __EXPORT ScTabViewShell::Activate(BOOL bMDI)
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_NAVIGATOR_UPDATEALL ) );
bFirstActivate = FALSE;
- if ( aPendingUserData.hasElements() )
- {
- // #89897# read user data from print preview now, after ctor
- DoReadUserDataSequence( aPendingUserData );
- aPendingUserData.realloc( 0 );
- }
-
// #116278# ReadExtOptions (view settings from Excel import) must also be done
// after the ctor, because of the potential calls to Window::Show.
// Even after the fix for #104887# (Window::Show no longer notifies the access
@@ -1924,7 +1917,6 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
if ( pOldSh && pOldSh->ISA( ScPreviewShell ) )
{
ScPreviewShell* pPreviewShell = ((ScPreviewShell*)pOldSh);
- aPendingUserData = pPreviewShell->GetSourceData(); // used in Activate
nForceDesignMode = pPreviewShell->GetSourceDesignMode();
}
diff --git a/sd/inc/FactoryIds.hxx b/sd/inc/FactoryIds.hxx
index 66477a1faf67..4f2346942fc9 100644..100755
--- a/sd/inc/FactoryIds.hxx
+++ b/sd/inc/FactoryIds.hxx
@@ -42,8 +42,7 @@ enum ViewShellFactoryIds
DRAW_FACTORY_ID = 1,
SLIDE_SORTER_FACTORY_ID = 2,
OUTLINE_FACTORY_ID = 3,
- PRESENTATION_FACTORY_ID = 4,
- PREVIEW_FACTORY_ID = 5
+ PRESENTATION_FACTORY_ID = 4
};
} // end of namespace sd
diff --git a/sd/source/ui/app/strings.src b/sd/source/ui/app/strings.src
index e992e7016f04..bb1199fdd352 100755
--- a/sd/source/ui/app/strings.src
+++ b/sd/source/ui/app/strings.src
@@ -86,10 +86,6 @@ String RID_APPTITLE
{
Text = "StarImpress 4.0" ;
};
-String STR_DEFAULTVIEW
-{
- Text [ en-US ] = "Default" ;
-};
String STR_NULL
{
Text [ en-US ] = "None" ;
diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx
index 181fc8433c22..f9f181b0e44d 100755
--- a/sd/source/ui/dlg/PaneChildWindows.cxx
+++ b/sd/source/ui/dlg/PaneChildWindows.cxx
@@ -37,6 +37,9 @@
#include "strings.hrc"
#include "sdresid.hxx"
+#include <com/sun/star/drawing/framework/XConfigurationController.hpp>
+#include <com/sun/star/drawing/framework/ResourceActivationMode.hpp>
+
#include <sfx2/app.hxx>
#include <sfx2/dockwin.hxx>
#include <sfx2/bindings.hxx>
@@ -47,6 +50,9 @@ namespace sd {
using ::com::sun::star::uno::Reference;
using ::com::sun::star::drawing::framework::XResourceId;
+using ::com::sun::star::drawing::framework::XConfigurationController;
+using ::com::sun::star::drawing::framework::ResourceActivationMode_ADD;
+using ::com::sun::star::drawing::framework::ResourceActivationMode_REPLACE;
SFX_IMPL_DOCKINGWINDOW(LeftPaneImpressChildWindow, SID_LEFT_PANE_IMPRESS)
SFX_IMPL_DOCKINGWINDOW(LeftPaneDrawChildWindow, SID_LEFT_PANE_DRAW)
@@ -151,6 +157,26 @@ ToolPanelChildWindow::ToolPanelChildWindow( ::Window* i_pParentWindow, USHORT i_
:PaneChildWindow( i_pParentWindow, i_nId, i_pBindings, i_pChildWindowInfo,
FLT_TOOL_PANEL_DOCKING_WINDOW, STR_RIGHT_PANE_TITLE, SFX_ALIGN_RIGHT )
{
+ // just in case this window has been created by SFX, instead our resource framework: Ensure that the resource framework
+ // activates the task pane, so it is really filled with content (in opposite to the other SFX applications, the
+ // child window registered for SID_TASKPANE is not responsible for its content, but here in SD, it's the ToolPanelViewShell
+ // which has this responsibility. And this view shell is created implicitly via the resource framework.)
+ // #i113788# / 2010-09-03 / frank.schoenheit@oracle.com
+ SfxDockingWindow* pDockingWindow = dynamic_cast< SfxDockingWindow* >( GetWindow() );
+ ViewShellBase* pViewShellBase = ViewShellBase::GetViewShellBase( pDockingWindow->GetBindings().GetDispatcher()->GetFrame() );
+ ENSURE_OR_RETURN_VOID( pViewShellBase != NULL, "ToolPanelChildWindow::ToolPanelChildWindow: no view shell access!" );
+
+ const ::boost::shared_ptr< framework::FrameworkHelper > pFrameworkHelper( framework::FrameworkHelper::Instance( *pViewShellBase ) );
+ ENSURE_OR_RETURN_VOID( pFrameworkHelper.get(), "ToolPanelChildWindow::ToolPanelChildWindow: no framework helper for the view shell!" );
+ Reference<XConfigurationController> xConfigController( pFrameworkHelper->GetConfigurationController() );
+ ENSURE_OR_RETURN_VOID( xConfigController.is(), "ToolPanelChildWindow::ToolPanelChildWindow: no config controller!" );
+ xConfigController->requestResourceActivation(
+ framework::FrameworkHelper::CreateResourceId( framework::FrameworkHelper::msRightPaneURL ),
+ ResourceActivationMode_ADD );
+ xConfigController->requestResourceActivation(
+ framework::FrameworkHelper::CreateResourceId( framework::FrameworkHelper::msTaskPaneURL, framework::FrameworkHelper::msRightPaneURL ),
+ ResourceActivationMode_REPLACE
+ );
}
//----------------------------------------------------------------------------------------------------------------------
diff --git a/sd/source/ui/inc/strings.hrc b/sd/source/ui/inc/strings.hrc
index d9dc93a1ef20..7f5086057e5c 100755
--- a/sd/source/ui/inc/strings.hrc
+++ b/sd/source/ui/inc/strings.hrc
@@ -28,7 +28,6 @@
#ifndef _SD_CFGID_HXX
#include "cfgids.hxx"
#endif
-#define STR_DEFAULTVIEW (RID_APP_START)
#define STR_NULL (RID_APP_START+3)
#define STR_INSERTPAGE (RID_APP_START+35)
#define STR_INSERTLAYER (RID_APP_START+37)
diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
index b9040e72283f..c5919b7aa7ee 100755
--- a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
+++ b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
@@ -503,45 +503,78 @@ SdPage* DocumentHelper::ProvideMasterPage (
SdPage* pMasterPage,
const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList)
{
- SdPage* pMasterPageInDocument = NULL;
-
- // Get notes master page.
+ // Make sure that both the master page and its notes master exist
+ // in the source document. If one is missing then return without
+ // making any changes.
+ if (pMasterPage == NULL)
+ {
+ // The caller should make sure that the master page is valid.
+ OSL_ASSERT(pMasterPage != NULL);
+ return NULL;
+ }
SdDrawDocument* pSourceDocument = static_cast<SdDrawDocument*>(pMasterPage->GetModel());
+ if (pSourceDocument == NULL)
+ return NULL;
SdPage* pNotesMasterPage = static_cast<SdPage*>(
- pSourceDocument->GetMasterPage (pMasterPage->GetPageNum()+1));
- if (pNotesMasterPage != NULL)
+ pSourceDocument->GetMasterPage(pMasterPage->GetPageNum()+1));
+ if (pNotesMasterPage == NULL)
{
- // When the given master page or its associated notes master page do
- // not already belong to the document we have to create copies of
- // them and insert them into the document.
-
- // Determine the position where the new master pages are inserted.
- // By default they are inserted at the end. When we assign to a
- // master page then insert after the last of the (selected) pages.
- USHORT nInsertionIndex = rTargetDocument.GetMasterPageCount();
- if (rpPageList->front()->IsMasterPage())
+ // The model is not in a valid state. Maybe a new master page
+ // is being (not finished yet) created? Return without making
+ // any changes.
+ return NULL;
+ }
+
+ SdPage* pMasterPageInDocument = NULL;
+ // Search for a master page with the same name as the given one in
+ // the target document.
+ const XubString sMasterPageLayoutName (pMasterPage->GetLayoutName());
+ for (USHORT nIndex=0,nCount=rTargetDocument.GetMasterPageCount(); nIndex<nCount; ++nIndex)
+ {
+ SdPage* pCandidate = static_cast<SdPage*>(rTargetDocument.GetMasterPage(nIndex));
+ if (pCandidate!=NULL
+ && sMasterPageLayoutName==pCandidate->GetLayoutName())
{
- nInsertionIndex = rpPageList->back()->GetPageNum();
+ // The requested master page does already exist in the
+ // target document, return it.
+ return pCandidate;
}
+ }
- if (pMasterPage->GetModel() != &rTargetDocument)
- {
- pMasterPageInDocument = AddMasterPage (rTargetDocument, pMasterPage, nInsertionIndex);
- if( rTargetDocument.IsUndoEnabled() )
+ // The given master page does not already belong to the target
+ // document so we have to create copies and insert them into the
+ // targer document.
+
+ // Determine the position where the new master pages are inserted.
+ // By default they are inserted at the end. When we assign to a
+ // master page then insert after the last of the (selected) pages.
+ USHORT nInsertionIndex = rTargetDocument.GetMasterPageCount();
+ if (rpPageList->front()->IsMasterPage())
+ {
+ nInsertionIndex = rpPageList->back()->GetPageNum();
+ }
+
+ // Clone the master page.
+ if (pMasterPage->GetModel() != &rTargetDocument)
+ {
+ pMasterPageInDocument = AddMasterPage (rTargetDocument, pMasterPage, nInsertionIndex);
+ if( rTargetDocument.IsUndoEnabled() )
rTargetDocument.AddUndo(
rTargetDocument.GetSdrUndoFactory().CreateUndoNewPage(*pMasterPageInDocument));
- }
- else
- pMasterPageInDocument = pMasterPage;
- if (pNotesMasterPage->GetModel() != &rTargetDocument)
- {
- SdPage* pClonedNotesMasterPage
- = AddMasterPage (rTargetDocument, pNotesMasterPage, nInsertionIndex+1);
- if( rTargetDocument.IsUndoEnabled() )
- rTargetDocument.AddUndo(
- rTargetDocument.GetSdrUndoFactory().CreateUndoNewPage(*pClonedNotesMasterPage));
- }
}
+ else
+ pMasterPageInDocument = pMasterPage;
+
+ // Clone the notes master.
+ if (pNotesMasterPage->GetModel() != &rTargetDocument)
+ {
+ SdPage* pClonedNotesMasterPage
+ = AddMasterPage (rTargetDocument, pNotesMasterPage, nInsertionIndex+1);
+ if( rTargetDocument.IsUndoEnabled() )
+ rTargetDocument.AddUndo(
+ rTargetDocument.GetSdrUndoFactory().CreateUndoNewPage(*pClonedNotesMasterPage));
+ }
+
return pMasterPageInDocument;
}
diff --git a/sd/source/ui/view/GraphicViewShellBase.cxx b/sd/source/ui/view/GraphicViewShellBase.cxx
index 759103760bfe..99e45a0d05d6 100755
--- a/sd/source/ui/view/GraphicViewShellBase.cxx
+++ b/sd/source/ui/view/GraphicViewShellBase.cxx
@@ -62,7 +62,7 @@ SfxViewShell* __EXPORT GraphicViewShellBase::CreateInstance (
void GraphicViewShellBase::RegisterFactory( USHORT nPrio )
{
pFactory = new SfxViewFactory(
- &CreateInstance,&InitFactory,nPrio,SdResId(STR_DEFAULTVIEW));
+ &CreateInstance,&InitFactory,nPrio,"Default");
InitFactory();
}
void GraphicViewShellBase::InitFactory()
diff --git a/sd/source/ui/view/ImpressViewShellBase.cxx b/sd/source/ui/view/ImpressViewShellBase.cxx
index 0cd5971eb51e..69906fbfd5d8 100644..100755
--- a/sd/source/ui/view/ImpressViewShellBase.cxx
+++ b/sd/source/ui/view/ImpressViewShellBase.cxx
@@ -62,7 +62,7 @@ SfxViewShell* __EXPORT ImpressViewShellBase::CreateInstance (
void ImpressViewShellBase::RegisterFactory( USHORT nPrio )
{
pFactory = new SfxViewFactory(
- &CreateInstance,&InitFactory,nPrio,SdResId(STR_DEFAULTVIEW));
+ &CreateInstance,&InitFactory,nPrio,"Default");
InitFactory();
}
void ImpressViewShellBase::InitFactory()
diff --git a/sd/source/ui/view/OutlineViewShellBase.cxx b/sd/source/ui/view/OutlineViewShellBase.cxx
index 762219c88016..3c31155a9fb5 100644..100755
--- a/sd/source/ui/view/OutlineViewShellBase.cxx
+++ b/sd/source/ui/view/OutlineViewShellBase.cxx
@@ -60,7 +60,7 @@ SfxViewShell* __EXPORT OutlineViewShellBase::CreateInstance (
void OutlineViewShellBase::RegisterFactory( USHORT nPrio )
{
pFactory = new SfxViewFactory(
- &CreateInstance,&InitFactory,nPrio,SdResId(STR_DEFAULTVIEW));
+ &CreateInstance,&InitFactory,nPrio,"Outline");
InitFactory();
}
void OutlineViewShellBase::InitFactory()
diff --git a/sd/source/ui/view/PresentationViewShellBase.cxx b/sd/source/ui/view/PresentationViewShellBase.cxx
index a16b12d3cb63..0fcb421a9888 100644..100755
--- a/sd/source/ui/view/PresentationViewShellBase.cxx
+++ b/sd/source/ui/view/PresentationViewShellBase.cxx
@@ -70,7 +70,7 @@ SfxViewShell* __EXPORT PresentationViewShellBase::CreateInstance (
void PresentationViewShellBase::RegisterFactory( USHORT nPrio )
{
pFactory = new SfxViewFactory(
- &CreateInstance,&InitFactory,nPrio,SdResId(STR_DEFAULTVIEW));
+ &CreateInstance,&InitFactory,nPrio,"FullScreenPresentation");
InitFactory();
}
void PresentationViewShellBase::InitFactory()
diff --git a/sd/source/ui/view/SlideSorterViewShellBase.cxx b/sd/source/ui/view/SlideSorterViewShellBase.cxx
index 466f699b1bb0..7944d2cf4b2e 100644..100755
--- a/sd/source/ui/view/SlideSorterViewShellBase.cxx
+++ b/sd/source/ui/view/SlideSorterViewShellBase.cxx
@@ -64,7 +64,7 @@ SfxViewShell* __EXPORT SlideSorterViewShellBase::CreateInstance (
void SlideSorterViewShellBase::RegisterFactory( USHORT nPrio )
{
pFactory = new SfxViewFactory(
- &CreateInstance,&InitFactory,nPrio,SdResId(STR_DEFAULTVIEW));
+ &CreateInstance,&InitFactory,nPrio,"SlideSorter");
InitFactory();
}
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 1e18ad5c5ee9..c748ffbc05e0 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -258,7 +258,7 @@ SfxViewShell* __EXPORT ViewShellBase::CreateInstance (
void ViewShellBase::RegisterFactory( USHORT nPrio )
{
pFactory = new SfxViewFactory(
- &CreateInstance,&InitFactory,nPrio,SdResId(STR_DEFAULTVIEW));
+ &CreateInstance,&InitFactory,nPrio,"Default");
InitFactory();
}
void ViewShellBase::InitFactory()
diff --git a/sdext/prj/build.lst b/sdext/prj/build.lst
index c593a265f26e..3603afbae866 100644
--- a/sdext/prj/build.lst
+++ b/sdext/prj/build.lst
@@ -1,4 +1,4 @@
-dx sdext : l10n offuh comphelper unotools readlicense_oo cppu tools cppuhelper sal javaunohelper officecfg XPDF:xpdf LIBXSLT:libxslt NULL
+dx sdext : l10n offuh comphelper unotools readlicense_oo cppu tools cppuhelper sal javaunohelper officecfg XPDF:xpdf LIBXSLT:libxslt xmlhelp NULL
dx sdext usr1 - all sdext_mkout NULL
dx sdext\prj get - all sdext_prj NULL
dx sdext\source\minimizer nmake - all sdext_minimizer sdext_minimizer_rdoooe sdext_minimizer_rdooo sdext_inc NULL
diff --git a/sdext/prj/d.lst b/sdext/prj/d.lst
index 71a91653c3d2..bcaa4308bcb9 100644
--- a/sdext/prj/d.lst
+++ b/sdext/prj/d.lst
@@ -5,4 +5,6 @@ mkdir: %_DEST%\bin%_EXT%\pdfimport
..\%__SRC%\bin\pdfunzip.* %_DEST%\bin%_EXT%\pdfunzip.*
..\%__SRC%\bin\pdfimport.oxt %_DEST%\bin%_EXT%\pdfimport\pdfimport.oxt
..\%__SRC%\bin\presentation-minimizer.oxt %_DEST%\bin%_EXT%\minimizer\presentation-minimizer.oxt
+..\%__SRC%\bin\presentation_minimizer_develop.zip %_DEST%\bin%_EXT%\minimizer\presentation_minimizer_develop.zip
..\%__SRC%\bin\presenter-screen.oxt %_DEST%\bin%_EXT%\presenter\presenter-screen.oxt
+..\%__SRC%\bin\presenter-screen_develop.zip %_DEST%\bin%_EXT%\presenter\presenter-screen_develop.zip
diff --git a/sdext/source/minimizer/aboutdialog.cxx b/sdext/source/minimizer/aboutdialog.cxx
deleted file mode 100644
index f495da9994ea..000000000000
--- a/sdext/source/minimizer/aboutdialog.cxx
+++ /dev/null
@@ -1,276 +0,0 @@
- /*************************************************************************
- *
- * 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
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sdext.hxx"
-
-#include "aboutdialog.hxx"
-#include "optimizationstats.hxx"
-#include "fileopendialog.hxx"
-#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
-
-// ---------------
-// - ABOUTDIALOG -
-// ---------------
-
-using namespace ::rtl;
-using namespace ::com::sun::star::ui;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::util;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::frame;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::script;
-using namespace ::com::sun::star::container;
-
-#define ABOUT_DIALOG_WIDTH 200
-#define ABOUT_DIALOG_HEIGHT 155
-
-// -----------------------------------------------------------------------------
-
-
-rtl::OUString InsertFixedText( AboutDialog& rAboutDialog, const rtl::OUString& rControlName, const OUString& rLabel,
- sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Bool bMultiLine, sal_Int16 nTabIndex )
-{
- OUString pNames[] = {
- TKGet( TK_Height ),
- TKGet( TK_Label ),
- TKGet( TK_MultiLine ),
- TKGet( TK_PositionX ),
- TKGet( TK_PositionY ),
- TKGet( TK_Step ),
- TKGet( TK_TabIndex ),
- TKGet( TK_Width ) };
-
- Any pValues[] = {
- Any( nHeight ),
- Any( rLabel ),
- Any( bMultiLine ),
- Any( nXPos ),
- Any( nYPos ),
- Any( (sal_Int16)0 ),
- Any( nTabIndex ),
- Any( nWidth ) };
-
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
-
- Sequence< rtl::OUString > aNames( pNames, nCount );
- Sequence< Any > aValues( pValues, nCount );
-
- rAboutDialog.insertFixedText( rControlName, aNames, aValues );
- return rControlName;
-}
-
-#if 0
-rtl::OUString InsertSeparator( AboutDialog& rAboutDialog, const OUString& rControlName, sal_Int32 nOrientation,
- sal_Int32 nPosX, sal_Int32 nPosY, sal_Int32 nWidth, sal_Int32 nHeight )
-{
- OUString pNames[] = {
- TKGet( TK_Height ),
- TKGet( TK_Orientation ),
- TKGet( TK_PositionX ),
- TKGet( TK_PositionY ),
- TKGet( TK_Step ),
- TKGet( TK_Width ) };
-
- Any pValues[] = {
- Any( nHeight ),
- Any( nOrientation ),
- Any( nPosX ),
- Any( nPosY ),
- Any( sal_Int16( 0 ) ),
- Any( nWidth ) };
-
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
-
- Sequence< rtl::OUString > aNames( pNames, nCount );
- Sequence< Any > aValues( pValues, nCount );
-
- rAboutDialog.insertControlModel( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlFixedLineModel" ) ),
- rControlName, aNames, aValues );
- return rControlName;
-}
-
-#endif
-
-rtl::OUString InsertImage( AboutDialog& rAboutDialog, const OUString& rControlName, const OUString& rURL,
- sal_Int32 nPosX, sal_Int32 nPosY, sal_Int32 nWidth, sal_Int32 nHeight )
-{
- OUString pNames[] = {
- TKGet( TK_Border ),
- TKGet( TK_Height ),
- TKGet( TK_ImageURL ),
- TKGet( TK_PositionX ),
- TKGet( TK_PositionY ),
- TKGet( TK_ScaleImage ),
- TKGet( TK_Width ) };
-
- Any pValues[] = {
- Any( sal_Int16( 1 ) ),
- Any( nHeight ),
- Any( rURL ),
- Any( nPosX ),
- Any( nPosY ),
- Any( sal_False ),
- Any( nWidth ) };
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
-
- Sequence< rtl::OUString > aNames( pNames, nCount );
- Sequence< Any > aValues( pValues, nCount );
-
- rAboutDialog.insertImage( rControlName, aNames, aValues );
- return rControlName;
-}
-
-rtl::OUString InsertButton( AboutDialog& rAboutDialog, const OUString& rControlName, Reference< XActionListener >& xActionListener,
- sal_Int32 nXPos, sal_Int32 nYPos, sal_Int32 nWidth, sal_Int32 nHeight, sal_Int16 nTabIndex, PPPOptimizerTokenEnum nResID )
-{
- OUString pNames[] = {
- TKGet( TK_Enabled ),
- TKGet( TK_Height ),
- TKGet( TK_Label ),
- TKGet( TK_PositionX ),
- TKGet( TK_PositionY ),
- TKGet( TK_PushButtonType ),
- TKGet( TK_Step ),
- TKGet( TK_TabIndex ),
- TKGet( TK_Width ) };
-
- Any pValues[] = {
- Any( sal_True ),
- Any( nHeight ),
- Any( rAboutDialog.getString( nResID ) ),
- Any( nXPos ),
- Any( nYPos ),
- Any( static_cast< sal_Int16 >( PushButtonType_OK ) ),
- Any( (sal_Int16)0 ),
- Any( nTabIndex ),
- Any( nWidth ) };
-
-
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
-
- Sequence< rtl::OUString > aNames( pNames, nCount );
- Sequence< Any > aValues( pValues, nCount );
-
- rAboutDialog.insertButton( rControlName, xActionListener, aNames, aValues );
- return rControlName;
-}
-
-void AboutDialog::InitDialog()
-{
- // setting the dialog properties
- OUString pNames[] = {
- rtl::OUString::createFromAscii( "BackgroundColor" ) ,
- TKGet( TK_Closeable ),
- TKGet( TK_Height ),
- TKGet( TK_Moveable ),
- TKGet( TK_PositionX ),
- TKGet( TK_PositionY ),
- TKGet( TK_Title ),
- TKGet( TK_Width ) };
-
- Any pValues[] = {
- Any( sal_Int32( 0xffffff ) ),
- Any( sal_True ),
- Any( sal_Int32( ABOUT_DIALOG_HEIGHT ) ),
- Any( sal_True ),
- Any( sal_Int32( 113 ) ),
- Any( sal_Int32( 42 ) ),
- Any( getString( STR_ABOUT_VERSION2 ) ),
- Any( sal_Int32( ABOUT_DIALOG_WIDTH ) ) };
-
- sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
-
- Sequence< rtl::OUString > aNames( pNames, nCount );
- Sequence< Any > aValues( pValues, nCount );
-
- rtl::OUString sBitmapPath( getPath( TK_BitmapPath ) );
- rtl::OUString sBitmap( rtl::OUString::createFromAscii( "/aboutlogo.png" ) );
- rtl::OUString sURL( sBitmapPath += sBitmap );
-
- mxDialogModelMultiPropertySet->setPropertyValues( aNames, aValues );
- sal_Int32 nWidth = getMapsFromPixels( 387 );
- if ( nWidth )
- mxDialogModelPropertySet->setPropertyValue( TKGet( TK_Width ), Any( nWidth ) );
- else
- nWidth = ABOUT_DIALOG_WIDTH;
-
-// int nHeight = (int) getMapsFromPixels( 95 );
-
- InsertImage( *this, rtl::OUString( rtl::OUString::createFromAscii( "aboutimage" ) ), sURL, 0, 0, nWidth, 60 );
- InsertFixedText( *this, rtl::OUString( rtl::OUString::createFromAscii( "fixedtext" ) ), getString( STR_ABOUT_PRN ), 9, 66, nWidth - 18, 50, sal_True, 0 );
-// InsertSeparator( *this, rtl::OUString( rtl::OUString::createFromAscii( "separator" ) ), 0, 0, ABOUT_DIALOG_HEIGHT - 25, nWidth, 8 );
- InsertButton( *this, rtl::OUString( rtl::OUString::createFromAscii( "button" ) ), mxActionListener, ( nWidth / 2 ) - 25, 120, 50, 14, 1, STR_OK );
-}
-
-// -----------------------------------------------------------------------------
-
-AboutDialog::AboutDialog( const Reference< XComponentContext > &rxMSF, Reference< XFrame >& rxFrame ) :
- UnoDialog( rxMSF, rxFrame ),
- ConfigurationAccess( rxMSF, NULL ),
- mxMSF( rxMSF ),
- mxFrame( rxFrame ),
- mxActionListener( new AboutActionListener( *this ) )
-{
- Reference< XFrame > xFrame( mxController->getFrame() );
- Reference< XWindow > xContainerWindow( xFrame->getContainerWindow() );
- Reference< XWindowPeer > xWindowPeer( xContainerWindow, UNO_QUERY_THROW );
- createWindowPeer( xWindowPeer );
-
- InitDialog();
-}
-
-// -----------------------------------------------------------------------------
-
-AboutDialog::~AboutDialog()
-{
-}
-
-// -----------------------------------------------------------------------------
-
-sal_Bool AboutDialog::execute()
-{
- UnoDialog::execute();
- return mbStatus;
-}
-
-// -----------------------------------------------------------------------------
-
-void AboutActionListener::actionPerformed( const ActionEvent& rEvent )
- throw ( com::sun::star::uno::RuntimeException )
-{
- if ( rEvent.ActionCommand == rtl::OUString( rtl::OUString::createFromAscii( "button" ) ) )
- {
- mrAboutDialog.endExecute( sal_True );
- }
-}
-void AboutActionListener::disposing( const ::com::sun::star::lang::EventObject& /* Source */ )
- throw ( com::sun::star::uno::RuntimeException )
-{
-}
diff --git a/sdext/source/minimizer/aboutdialog.hxx b/sdext/source/minimizer/aboutdialog.hxx
deleted file mode 100644
index 3bc402fb2543..000000000000
--- a/sdext/source/minimizer/aboutdialog.hxx
+++ /dev/null
@@ -1,91 +0,0 @@
-/*************************************************************************
- *
- * 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
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef ABOUTDIALOG_HXX
-#define ABOUTDIALOG_HXX
-#include <vector>
-#include "unodialog.hxx"
-#include "configurationaccess.hxx"
-#include "pppoptimizertoken.hxx"
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/awt/XItemListener.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/uno/Sequence.h>
-#include <com/sun/star/text/XTextRange.hpp>
-#include <com/sun/star/drawing/XShapes.hpp>
-#include <com/sun/star/container/XIndexAccess.hpp>
-#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/view/XSelectionSupplier.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <com/sun/star/awt/XItemEventBroadcaster.hpp>
-#include <com/sun/star/frame/XStorable.hpp>
-#include <com/sun/star/frame/XDispatch.hpp>
-#include <com/sun/star/awt/PushButtonType.hpp>
-
-#define DIALOG_WIDTH 310
-#define DIALOG_HEIGHT 210
-#define BUTTON_WIDTH 50
-#define BUTTON_HEIGHT 14
-
-// -------------------
-// - OPTIMIZERDIALOG -
-// -------------------
-class AboutDialog : public UnoDialog, public ConfigurationAccess
-{
-public :
-
- AboutDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF, com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rxFrame );
- ~AboutDialog();
-
- sal_Bool execute();
-
-private :
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >mxMSF;
- com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
- com::sun::star::uno::Reference< com::sun::star::awt::XActionListener > mxActionListener;
-
- void InitDialog();
-
-public :
-
- com::sun::star::uno::Reference< com::sun::star::frame::XFrame>& GetFrame() { return mxFrame; };
- const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& GetComponentContext() { return mxMSF; };
-};
-
-class AboutActionListener : public ::cppu::WeakImplHelper1< com::sun::star::awt::XActionListener >
-{
-public:
- AboutActionListener( AboutDialog& rAboutDialog ) : mrAboutDialog( rAboutDialog ){};
-
- virtual void SAL_CALL actionPerformed( const ::com::sun::star::awt::ActionEvent& Event ) throw ( com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw ( com::sun::star::uno::RuntimeException);
-private:
-
- AboutDialog& mrAboutDialog;
-};
-
-#endif // ABOUTDIALOG_HXX
diff --git a/sdext/source/minimizer/informationdialog.cxx b/sdext/source/minimizer/informationdialog.cxx
index 3c4dbf69895d..089c81f55a6a 100644
--- a/sdext/source/minimizer/informationdialog.cxx
+++ b/sdext/source/minimizer/informationdialog.cxx
@@ -265,7 +265,7 @@ void InformationDialog::InitDialog()
Any( sal_True ),
Any( sal_Int32( 245 ) ),
Any( sal_Int32( 115 ) ),
- Any( getString( STR_ABOUT2 ) ),
+ Any( getString( STR_SUN_OPTIMIZATION_WIZARD2 ) ),
Any( sal_Int32( DIALOG_WIDTH ) ) };
sal_Int32 nCount = sizeof( pNames ) / sizeof( OUString );
@@ -321,7 +321,6 @@ void InformationDialog::InitDialog()
const OUString aOldSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%OLDFILESIZE" ) );
const OUString aNewSizePlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%NEWFILESIZE" ) );
const OUString aTitlePlaceholder( aTitle.getLength() ? OUString::createFromAscii( "%TITLE" ) : OUString::createFromAscii( "'%TITLE'" ) );
- const OUString aExtensionPlaceholder( RTL_CONSTASCII_USTRINGPARAM( "%EXTENSIONNAME" ) );
sal_Int32 i = aInfoString.indexOf( aOldSizePlaceholder, 0 );
if ( i >= 0 )
@@ -335,10 +334,6 @@ void InformationDialog::InitDialog()
if ( k >= 0 )
aInfoString = aInfoString.replaceAt( k, aTitlePlaceholder.getLength(), aTitle );
- sal_Int32 l = aInfoString.indexOf( aExtensionPlaceholder, 0 );
- if ( l >= 0 )
- aInfoString = aInfoString.replaceAt( l, aExtensionPlaceholder.getLength(), getString( STR_SUN_OPTIMIZATION_WIZARD2 ) );
-
com::sun::star::uno::Reference< com::sun::star::awt::XItemListener > xItemListener;
InsertImage( *this, rtl::OUString( rtl::OUString::createFromAscii( "aboutimage" ) ), ImpGetStandardImage( rtl::OUString::createFromAscii( "private:standardimage/query" ) ), 5, 5, 25, 25 );
InsertFixedText( *this, rtl::OUString( rtl::OUString::createFromAscii( "fixedtext" ) ), aInfoString, PAGE_POS_X, 6, PAGE_WIDTH, 24, sal_True, 0 );
diff --git a/sdext/source/minimizer/makefile.mk b/sdext/source/minimizer/makefile.mk
index 8a3a385fc8f2..969a0cb1f248 100755
--- a/sdext/source/minimizer/makefile.mk
+++ b/sdext/source/minimizer/makefile.mk
@@ -61,7 +61,6 @@ SLOFILES= $(SLO)$/unodialog.obj \
$(SLO)$/pppoptimizerdialog.obj \
$(SLO)$/fileopendialog.obj \
$(SLO)$/optimizationstats.obj \
- $(SLO)$/aboutdialog.obj \
$(SLO)$/graphiccollector.obj \
$(SLO)$/pagecollector.obj \
$(SLO)$/informationdialog.obj
@@ -81,6 +80,8 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1RPATH= OXT
DEF1NAME= $(SHL1TARGET)
+COMPONENT_XCU_REPLACEMENT=s/@MINIMIZEREXTENSIONPRODUCTNAME@/Presentation Minimizer/g
+
COMPONENT_MERGED_XCU= \
$(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/Addons.xcu \
$(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/ProtocolHandler.xcu \
@@ -115,6 +116,18 @@ COMPONENT_HELP= \
# make sure to add your custom files here
EXTENSION_PACKDEPS=$(COMPONENT_BITMAPS) $(COMPONENT_IMAGES) $(COMPONENT_HELP)
+ZIP2TARGET= presentation_minimizer_develop
+.IF "$(WITH_LANG)"!=""
+ZIP2DIR= $(MISC)/$(EXTENSIONNAME)_in/merge
+.ELSE # "$(WITH_LANG)"!=""
+ZIP2DIR= registry/data
+.ENDIF # "$(WITH_LANG)"!=""
+ZIP2EXT= .zip
+ZIP2FLAGS=-r
+ZIP2LIST= \
+ org/openoffice/Office/Addons.xcu \
+ org/openoffice/Office/extension/*.xcu
+
# --- Targets ----------------------------------
.INCLUDE : extension_pre.mk
diff --git a/sdext/source/minimizer/pppoptimizerdialog.cxx b/sdext/source/minimizer/pppoptimizerdialog.cxx
index 854d4d9cebcd..b56f82b10543 100644
--- a/sdext/source/minimizer/pppoptimizerdialog.cxx
+++ b/sdext/source/minimizer/pppoptimizerdialog.cxx
@@ -30,7 +30,6 @@
#include "pppoptimizerdialog.hxx"
#include "optimizerdialog.hxx"
-#include "aboutdialog.hxx"
using namespace ::rtl;
using namespace ::com::sun::star::uno;
@@ -175,11 +174,6 @@ void SAL_CALL PPPOptimizerDialog::dispatch( const URL& rURL,
if ( mpOptimizerDialog )
mpOptimizerDialog->UpdateStatus( rArguments );
}
- else if ( rURL.Path.compareToAscii( "about" ) == 0 )
- {
- AboutDialog aAboutDialog( mxMSF, mxFrame );
- aAboutDialog.execute();
- }
}
}
diff --git a/sdext/source/minimizer/pppoptimizertoken.cxx b/sdext/source/minimizer/pppoptimizertoken.cxx
index b36078ea2af4..e44116c02bf8 100644
--- a/sdext/source/minimizer/pppoptimizertoken.cxx
+++ b/sdext/source/minimizer/pppoptimizertoken.cxx
@@ -286,9 +286,6 @@ static const TokenTable pTokenTableArray[] =
{ "STR_DEFAULT_SESSION", STR_DEFAULT_SESSION },
{ "STR_MODIFY_WARNING", STR_MODIFY_WARNING },
{ "STR_YES", STR_YES },
- { "STR_ABOUT2", STR_ABOUT2 },
- { "STR_ABOUT_VERSION2", STR_ABOUT_VERSION2 },
- { "STR_ABOUT_PRN", STR_ABOUT_PRN },
{ "STR_OK", STR_OK },
{ "STR_INFO_1", STR_INFO_1 },
{ "STR_INFO_2", STR_INFO_2 },
diff --git a/sdext/source/minimizer/pppoptimizertoken.hxx b/sdext/source/minimizer/pppoptimizertoken.hxx
index 9f544dd1a5bf..553a771c05f3 100644
--- a/sdext/source/minimizer/pppoptimizertoken.hxx
+++ b/sdext/source/minimizer/pppoptimizertoken.hxx
@@ -262,9 +262,6 @@ enum PPPOptimizerTokenEnum
STR_DEFAULT_SESSION,
STR_MODIFY_WARNING,
STR_YES,
- STR_ABOUT2,
- STR_ABOUT_VERSION2,
- STR_ABOUT_PRN,
STR_OK,
STR_INFO_1,
STR_INFO_2,
diff --git a/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu b/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu
index 251818079fe5..08324953d32c 100644
--- a/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu
+++ b/sdext/source/minimizer/registry/data/org/openoffice/Office/extension/SunPresentationMinimizer.xcu
@@ -11,7 +11,7 @@
<node oor:name="Strings">
<prop oor:name="STR_SUN_OPTIMIZATION_WIZARD2">
- <value xml:lang="en-US">Oracle Presentation Minimizer</value>
+ <value xml:lang="en-US">@MINIMIZEREXTENSIONPRODUCTNAME@</value>
</prop>
<prop oor:name="STR_STEPS">
<value xml:lang="en-US">Steps</value>
@@ -35,12 +35,12 @@
<value xml:lang="en-US">Introduction</value>
</prop>
<prop oor:name="STR_INTRODUCTION_T">
- <value xml:lang="en-US">The Oracle Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed.
+ <value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed.
At the last step of the wizard you can choose to apply the changes to the current presentation or to create an optimized new version of the presentation.</value>
</prop>
<prop oor:name="STR_CHOSE_SETTINGS">
- <value xml:lang="en-US">~Choose settings for Oracle Presentation Minimizer</value>
+ <value xml:lang="en-US">~Choose settings for @MINIMIZEREXTENSIONPRODUCTNAME@</value>
</prop>
<prop oor:name="STR_REMOVE">
<value xml:lang="en-US">~Delete</value>
@@ -181,32 +181,20 @@ The current presentation contains no OLE objects.</value>
<prop oor:name="STR_YES">
<value xml:lang="en-US">~Yes</value>
</prop>
- <prop oor:name="STR_ABOUT2">
- <value xml:lang="en-US">Oracle Presentation Minimizer</value>
- </prop>
- <prop oor:name="STR_ABOUT_VERSION2">
- <value xml:lang="en-US">About Oracle Presentation Minimizer 1.0.2</value>
- </prop>
- <prop oor:name="STR_ABOUT_PRN">
- <value xml:lang="en-US">Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved.
-
-This product has been created with contributions from the OpenOffice.org community, of which Oracle is a principal member. OpenOffice.org acknowledges all community members, especially those mentioned at http://www.openoffice.org/welcome/credits.html
- </value>
- </prop>
<prop oor:name="STR_OK">
<value xml:lang="en-US">OK</value>
</prop>
<prop oor:name="STR_INFO_1">
- <value xml:lang="en-US">The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to %NEWFILESIZE MB.</value>
+ <value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_INFO_2">
- <value xml:lang="en-US">The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to approximated %NEWFILESIZE MB.</value>
+ <value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to approximated %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_INFO_3">
- <value xml:lang="en-US">The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed to %NEWFILESIZE MB.</value>
+ <value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ has successfully updated the presentation '%TITLE'. The file size has changed to %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_INFO_4">
- <value xml:lang="en-US">The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed to approximated %NEWFILESIZE MB.</value>
+ <value xml:lang="en-US">The @MINIMIZEREXTENSIONPRODUCTNAME@ has successfully updated the presentation '%TITLE'. The file size has changed to approximated %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_DUPLICATING_PRESENTATION">
<value xml:lang="en-US">Duplicating presentation...</value>
diff --git a/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs b/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs
index 59c947750064..f121768e0e72 100644
--- a/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs
+++ b/sdext/source/minimizer/registry/schema/org/openoffice/Office/extension/SunPresentationMinimizer.xcs
@@ -106,7 +106,7 @@
<prop oor:name="HelpFile" oor:type="xs:string"/>
<group oor:name="Strings">
<prop oor:name="STR_SUN_OPTIMIZATION_WIZARD2" oor:type="xs:string" oor:localized="true">
- <value>Oracle Presentation Minimizer</value>
+ <value>Presentation Minimizer</value>
</prop>
<prop oor:name="STR_STEPS" oor:type="xs:string" oor:localized="true">
<value>Steps</value>
@@ -130,7 +130,7 @@
<value>Introduction</value>
</prop>
<prop oor:name="STR_INTRODUCTION_T" oor:type="xs:string" oor:localized="true">
- <value>The Oracle Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed.
+ <value>The Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed and data, that is no longer needed, will be removed.
At the last step of the wizard you can choose to apply the changes to the current presentation or to create an optimized new version of the presentation.</value>
</prop>
@@ -279,32 +279,20 @@ The current presentation contains no OLE objects.</value>
<prop oor:name="STR_YES" oor:type="xs:string" oor:localized="true">
<value>~Yes</value>
</prop>
- <prop oor:name="STR_ABOUT2" oor:type="xs:string" oor:localized="true">
- <value>Oracle Presentation Minimizer</value>
- </prop>
- <prop oor:name="STR_ABOUT_VERSION2" oor:type="xs:string" oor:localized="true">
- <value>About Oracle Presentation Minimizer 1.0.2</value>
- </prop>
- <prop oor:name="STR_ABOUT_PRN" oor:type="xs:string" oor:localized="true">
- <value>Copyright © 2000, 2010 Oracle and/or its affiliates. All rights reserved.
-
-This product has been created with contributions from the OpenOffice.org community, of which Oracle is a principal member. OpenOffice.org acknowledges all community members, especially those mentioned at http://www.openoffice.org/welcome/credits.html/value>
- </value>
- </prop>
<prop oor:name="STR_OK" oor:type="xs:string" oor:localized="true">
<value>OK</value>
</prop>
<prop oor:name="STR_INFO_1" oor:type="xs:string" oor:localized="true">
- <value>The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to %NEWFILESIZE MB.</value>
+ <value>The Presentation Minimizer has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_INFO_2" oor:type="xs:string" oor:localized="true">
- <value>The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to approximated %NEWFILESIZE MB.</value>
+ <value>The Presentation Minimizer has successfully updated the presentation '%TITLE'. The file size has changed from %OLDFILESIZE MB to approximated %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_INFO_3" oor:type="xs:string" oor:localized="true">
- <value>The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed to %NEWFILESIZE MB.</value>
+ <value>The Presentation Minimizer has successfully updated the presentation '%TITLE'. The file size has changed to %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_INFO_4" oor:type="xs:string" oor:localized="true">
- <value>The %EXTENSIONNAME has successfully updated the presentation '%TITLE'. The file size has changed to approximated %NEWFILESIZE MB.</value>
+ <value>The Presentation Minimizer has successfully updated the presentation '%TITLE'. The file size has changed to approximated %NEWFILESIZE MB.</value>
</prop>
<prop oor:name="STR_DUPLICATING_PRESENTATION" oor:type="xs:string" oor:localized="true">
<value>Duplicating presentation...</value>
diff --git a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp
index a1172d540d7e..ba8f29bb497f 100644
--- a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp
+++ b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp
@@ -33,16 +33,16 @@
<meta>
<topic id="textpresenterxml" indexer="include" status="PUBLISH">
- <title xml-lang="en-US" id="tit" l10n="NEW">Oracle Presenter Console Keyboard Shortcuts</title>
+ <title xml-lang="en-US" id="tit" l10n="NEW">@PRESENTEREXTENSIONPRODUCTNAME@ Keyboard Shortcuts</title>
<filename>/com.sun.PresenterScreen-PLATFORMID/presenter.xhp</filename>
</topic>
</meta>
<body>
<bookmark xml-lang="en-US" branch="hid/com.sun.PresenterScreen" id="bm_id3138439" localize="false"/>
-<bookmark xml-lang="en-US" branch="index" id="bm_id0921200912285678"><bookmark_value>Presenter Console shortcuts</bookmark_value>
+<bookmark xml-lang="en-US" branch="index" id="bm_id0921200912285678"><bookmark_value>@PRESENTEREXTENSIONPRODUCTNAME@ shortcuts</bookmark_value>
</bookmark>
-<paragraph xml-lang="en-US" id="hd_id0921201912165661" role="heading" level="1" l10n="NEW">Oracle Presenter Console Keyboard Shortcuts</paragraph>
- <paragraph xml-lang="en-US" id="par_id0921201912165656" role="paragraph" l10n="NEW">When running a slide show using the Oracle Presenter Console, you can use the following keys:</paragraph>
+<paragraph xml-lang="en-US" id="hd_id0921201912165661" role="heading" level="1" l10n="NEW">@PRESENTEREXTENSIONPRODUCTNAME@ Keyboard Shortcuts</paragraph>
+ <paragraph xml-lang="en-US" id="par_id0921201912165656" role="paragraph" l10n="NEW">When running a slide show using the @PRESENTEREXTENSIONPRODUCTNAME@, you can use the following keys:</paragraph>
<table id="tbl_id0921200901051232">
<tablerow>
<tablecell>
@@ -158,7 +158,7 @@
</tablerow>
<tablerow>
<tablecell>
- <paragraph xml-lang="en-US" id="par_id0921200901104566" role="tablecontent" l10n="NEW">Show the Presenter Console</paragraph>
+ <paragraph xml-lang="en-US" id="par_id0921200901104566" role="tablecontent" l10n="NEW">Show the @PRESENTEREXTENSIONPRODUCTNAME@</paragraph>
</tablecell>
<tablecell>
<paragraph xml-lang="en-US" id="par_id0921200901104544" role="tablecontent" l10n="NEW">Ctrl-'1'</paragraph>
diff --git a/sdext/source/presenter/makefile.mk b/sdext/source/presenter/makefile.mk
index 08a3470fc24d..a26cf54b3694 100755
--- a/sdext/source/presenter/makefile.mk
+++ b/sdext/source/presenter/makefile.mk
@@ -32,11 +32,16 @@ GEN_HID=FALSE
EXTNAME=PresenterScreen
ENABLE_EXCEPTIONS=TRUE
+# survive zip dependencies
+MAXLINELENGTH:=80000
# --- Settings ----------------------------------
.INCLUDE : rtlbootstrap.mk
.INCLUDE : settings.mk
+
+PACKAGE=com.sun.PresenterScreen-$(PLATFORMID)
+
.IF "$(L10N_framework)"==""
.INCLUDE : $(PRJ)$/util$/makefile.pmk
@@ -107,6 +112,12 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1RPATH= OXT
DEF1NAME= $(SHL1TARGET)
+ZIP2TARGET= presenter-screen_develop
+ZIP2DIR= $(COMMONMISC)
+ZIP2EXT= .zip
+ZIP2FLAGS=-r
+ZIP2LIST= */com.sun.PresenterScreen/*.xhp
+
ZIP1TARGET= presenter-screen
ZIP1DIR= $(MISC)$/$(TARGET)
ZIP1EXT= .oxt
@@ -248,10 +259,6 @@ PLATFORMID:=$(RTL_OS:l)_$(RTL_ARCH:l)
COMPONENT_HELP= \
$(ZIP1DIR)$/help/component.txt \
$(foreach,l,$(alllangiso) $(ZIP1DIR)$/help$/$l$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp)
-# $(ZIP1DIR)$/help$/en-US$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp
-
-# no localization yet - see #i107498#
-# $(foreach,l,$(alllangiso) $(ZIP1DIR)$/help$/$l$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp)
ZIP1DEPS= \
$(PACKLICS) \
@@ -262,14 +269,25 @@ ZIP1DEPS= \
$(COMPONENT_IMAGES) \
$(COMPONENT_LIBRARY) \
$(COMPONENT_HELP)
+
# $(COMPONENT_MERGED_XCU) \
+LINKNAME:=help
+XHPLINKSRC:=$(ZIP1DIR)/help
+
+my_XHPFILES= \
+ presenter.xhp
+
+LINKLINKFILES= \
+ $(PACKAGE)/{$(my_XHPFILES)}
# --- Targets ----------------------------------
.ENDIF # L10N_framework
.INCLUDE : target.mk
+.INCLUDE : extension_helplink.mk
+
.IF "$(L10N_framework)"==""
$(SLO)$/PresenterComponent.obj : $(INCCOM)$/PresenterExtensionIdentifier.hxx
@@ -284,10 +302,12 @@ $(ZIP1DIR)$/help$/component.txt : help$/$$(@:f)
@@-$(MKDIRHIER) $(@:d)
$(COPY) $< $@
-$(ZIP1DIR)$/help$/%$/com.sun.PresenterScreen-$(PLATFORMID)$/presenter.xhp : $(COMMONMISC)/%/com.sun.PresenterScreen/presenter.xhp
+$(ZIP1DIR)/help/%/com.sun.PresenterScreen-$(PLATFORMID)/presenter.xhp : $(COMMONMISC)/%/com.sun.PresenterScreen/presenter.xhp
@echo creating $@
- @@-$(MKDIRHIER) $(@:d)
- $(TYPE) $< | sed "s/PLATFORMID/$(PLATFORMID)/" > $@
+ @-$(MKDIRHIER) $(@:d)
+ $(TYPE) $< | sed "s/PLATFORMID/$(PLATFORMID)/" | sed 's/@PRESENTEREXTENSIONPRODUCTNAME@/Presenter Console/g' > $@
+
+$(ZIP1TARGETN) : $(HELPLINKALLTARGETS)
$(COMPONENT_BITMAPS) : bitmaps$/$$(@:f)
@-$(MKDIRHIER) $(@:d)
@@ -370,7 +390,7 @@ DESCRIPTION_TMP:=$(ZIP1DIR)$/description.xml.tmp
PHONYDESC=.PHONY
.ENDIF # "$(LAST_WITH_LANG)"!="$(WITH_LANG)"
$(DESCRIPTION) $(PHONYDESC) : $$(@:f)
- @@-$(MKDIRHIER) $(@:d)
+ @-$(MKDIRHIER) $(@:d)
$(PERL) $(SOLARENV)$/bin$/licinserter.pl description.xml registry/LICENSE_xxx $(DESCRIPTION_TMP)
@echo LAST_WITH_LANG=$(WITH_LANG) > $(ZIP1DIR)_lang_track.mk
$(TYPE) $(DESCRIPTION_TMP) | sed s/UPDATED_PLATFORM/$(PLATFORMID)/ > $@
diff --git a/sfx2/inc/sfx2/docfac.hxx b/sfx2/inc/sfx2/docfac.hxx
index 7468394d2617..89062d7b7263 100644
--- a/sfx2/inc/sfx2/docfac.hxx
+++ b/sfx2/inc/sfx2/docfac.hxx
@@ -94,7 +94,7 @@ public:
USHORT GetViewFactoryCount() const;
SfxViewFactory& GetViewFactory(USHORT i = 0) const;
- /// returns the view factory whose GetViewName delivers the requested logical name
+ /// returns the view factory whose GetAPIViewName or GetLegacyViewName delivers the requested logical name
SfxViewFactory* GetViewFactoryByViewName( const String& i_rViewName ) const;
// Filter
diff --git a/sfx2/inc/sfx2/viewfrm.hxx b/sfx2/inc/sfx2/viewfrm.hxx
index d376236bf830..affa836486e6 100644
--- a/sfx2/inc/sfx2/viewfrm.hxx
+++ b/sfx2/inc/sfx2/viewfrm.hxx
@@ -253,6 +253,7 @@ public:
private:
SAL_DLLPRIVATE BOOL SwitchToViewShell_Impl( USHORT nNo, BOOL bIsIndex = FALSE );
SAL_DLLPRIVATE void PopShellAndSubShells_Impl( SfxViewShell& i_rViewShell );
+ SAL_DLLPRIVATE void SaveCurrentViewData_Impl( const USHORT i_nNewViewId );
/** loads the given existing document into the given frame
diff --git a/sfx2/inc/sfx2/viewsh.hxx b/sfx2/inc/sfx2/viewsh.hxx
index 8465a238cd5b..ee8dfb1ca57c 100644
--- a/sfx2/inc/sfx2/viewsh.hxx
+++ b/sfx2/inc/sfx2/viewsh.hxx
@@ -123,13 +123,13 @@ public: \
static SfxViewFactory&Factory() { return *pFactory; } \
static void InitFactory()
-#define SFX_IMPL_VIEWFACTORY(Class, rResId) \
+#define SFX_IMPL_NAMED_VIEWFACTORY(Class, AsciiViewName) \
SfxViewFactory* Class::pFactory; \
SfxViewShell* __EXPORT Class::CreateInstance(SfxViewFrame *pFrame, SfxViewShell *pOldView) \
{ return new Class(pFrame, pOldView); } \
void Class::RegisterFactory( USHORT nPrio ) \
{ \
- pFactory = new SfxViewFactory(&CreateInstance,&InitFactory,nPrio,rResId);\
+ pFactory = new SfxViewFactory(&CreateInstance,&InitFactory,nPrio,AsciiViewName);\
InitFactory(); \
} \
void Class::InitFactory()
diff --git a/sfx2/inc/viewfac.hxx b/sfx2/inc/viewfac.hxx
index 6f9ae1d3cb37..b0f0abdba3b3 100644
--- a/sfx2/inc/viewfac.hxx
+++ b/sfx2/inc/viewfac.hxx
@@ -46,24 +46,29 @@ class SFX2_DLLPUBLIC SfxViewFactory
{
public:
SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI,
- USHORT nOrdinal, const ResId& aDescrResId );
+ USHORT nOrdinal, const sal_Char* asciiViewName );
~SfxViewFactory();
SfxViewShell *CreateInstance(SfxViewFrame *pViewFrame, SfxViewShell *pOldSh);
void InitFactory();
- String GetDescription() const
- { return String( aDescription ); }
USHORT GetOrdinal() const { return nOrd; }
- /// returns an API-compatible view name. For the moment, this is "view" with an appended ordinal/ID
- String GetViewName() const;
+ /// returns a legacy view name. This is "view" with an appended ordinal/ID.
+ String GetLegacyViewName() const;
+
+ /** returns a API-compatible view name.
+
+ For details on which view names are specified, see the XModel2.getAvailableViewControllerNames
+ documentation.
+ */
+ String GetAPIViewName() const;
private:
SfxViewCtor fnCreate;
SfxViewInit fnInit;
USHORT nOrd;
- ResId aDescription;
+ const String m_sViewName;
};
#endif
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index 5d763f81744d..30fe2460d512 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -253,10 +253,11 @@ namespace sfx2
pWindow->SetHelpId( HID_TASKPANE_WINDOW );
pWindow->SetOutputSizePixel( Size( 300, 450 ) );
- pWindow->Show();
dynamic_cast< SfxDockingWindow* >( pWindow )->Initialize( i_pInfo );
SetHideNotDelete( TRUE );
+
+ pWindow->Show();
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index bfd67210ec44..4311559f94af 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -159,6 +159,21 @@ void SfxObjectFactory::RegisterViewFactory
SfxViewFactory &rFactory
)
{
+#if OSL_DEBUG_LEVEL > 0
+ {
+ const String sViewName( rFactory.GetAPIViewName() );
+ for ( sal_uInt16 i = 0; i < pImpl->aViewFactoryArr.Count(); ++i )
+ {
+ if ( !pImpl->aViewFactoryArr[i]->GetAPIViewName().Equals( sViewName ) )
+ continue;
+ ByteString sMessage( "SfxObjectFactory::RegisterViewFactory: duplicate view name '" );
+ sMessage += ByteString( sViewName, RTL_TEXTENCODING_ASCII_US );
+ sMessage += "'!";
+ OSL_ENSURE( false, sMessage.GetBuffer() );
+ break;
+ }
+ }
+#endif
sal_uInt16 nPos;
for ( nPos = 0;
nPos < pImpl->aViewFactoryArr.Count() &&
@@ -467,7 +482,9 @@ SfxViewFactory* SfxObjectFactory::GetViewFactoryByViewName( const String& i_rVie
)
{
SfxViewFactory& rViewFac( GetViewFactory( nViewNo ) );
- if ( rViewFac.GetViewName() == i_rViewName )
+ if ( ( rViewFac.GetAPIViewName() == i_rViewName )
+ || ( rViewFac.GetLegacyViewName() == i_rViewName )
+ )
return &rViewFac;
}
return NULL;
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index fe4ffa50f67d..846cc669b9a7 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3812,7 +3812,7 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL SfxBaseModel::getAvailableViewCon
Sequence< ::rtl::OUString > aViewNames( nViewFactoryCount );
for ( sal_Int32 nViewNo = 0; nViewNo < nViewFactoryCount; ++nViewNo )
- aViewNames[nViewNo] = rDocumentFactory.GetViewFactory( nViewNo ).GetViewName();
+ aViewNames[nViewNo] = rDocumentFactory.GetViewFactory( nViewNo ).GetAPIViewName();
return aViewNames;
}
@@ -3826,7 +3826,7 @@ css::uno::Reference< css::frame::XController2 > SAL_CALL SfxBaseModel::createDef
SfxModelGuard aGuard( *this );
const SfxObjectFactory& rDocumentFactory = GetObjectShell()->GetFactory();
- const ::rtl::OUString sDefaultViewName = rDocumentFactory.GetViewFactory( 0 ).GetViewName();
+ const ::rtl::OUString sDefaultViewName = rDocumentFactory.GetViewFactory( 0 ).GetAPIViewName();
aGuard.clear();
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index ed158ce009e3..df252b831803 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -650,7 +650,7 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA
// ensure the ID of the to-be-created view is in the descriptor, if possible
const sal_Int16 nViewId = impl_determineEffectiveViewId_nothrow( *xDoc, aDescriptor );
const sal_Int16 nViewNo = xDoc->GetFactory().GetViewNo_Impl( nViewId, 0 );
- const ::rtl::OUString sViewName( xDoc->GetFactory().GetViewFactory( nViewNo ).GetViewName() );
+ const ::rtl::OUString sViewName( xDoc->GetFactory().GetViewFactory( nViewNo ).GetAPIViewName() );
// if the document is created hidden, prevent it from being deleted until it is shown or disposed
impl_lockHiddenDocument( *xDoc, aDescriptor );
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index f5c24b195af7..cda5fd0bdd7d 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -118,6 +118,7 @@ using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::RuntimeException;
using ::com::sun::star::uno::UNO_QUERY_THROW;
+using ::com::sun::star::uno::UNO_SET_THROW;
using ::com::sun::star::lang::DisposedException;
using ::com::sun::star::awt::XWindow;
using ::com::sun::star::frame::XController;
@@ -579,7 +580,7 @@ Reference< XWindow > SAL_CALL SfxBaseController::getComponentWindow() throw (Run
::rtl::OUString sViewName;
if ( nViewNo < rDocFac.GetViewFactoryCount() )
- sViewName = rDocFac.GetViewFactory( nViewNo ).GetViewName();
+ sViewName = rDocFac.GetViewFactory( nViewNo ).GetAPIViewName();
return sViewName;
}
@@ -1421,20 +1422,52 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
// if so, forward it to the view/shell.
if ( !bHasPluginMode && !bHasJumpMark )
{
+ // Note that this might not be the ideal place here. Restoring view data should, IMO, be the
+ // responsibility of the loader, not an implementation detail burried here deep within the controller's
+ // implementation.
+ // What I think should be done to replace the below code:
+ // - change SfxBaseController::restoreViewData to also accept a PropertyValue[] (it currently accepts
+ // a string only), and forward it to its ViewShell's ReadUserDataSequence
+ // - change the frame loader so that when a new document is loaded (as opposed to an existing
+ // document being loaded into a new frame), the model's view data is examine the very same
+ // way as below, and the proper view data is set via XController::restoreViewData
+ // - extend SfxViewFrame::SwitchToViewShell_Impl. Currently, it cares for the case where a non-PrintPreview
+ // view is exchanged, and sets the old view's data at the model. It should also care for the other
+ // way, were the PrintPreview view is left: in this case, the new view should also be initialized
+ // with the model's view data
try
{
- Reference< XViewDataSupplier > xViewDataSupplier( getModel(), UNO_QUERY );
- Reference< XIndexAccess > xViewData;
- if ( xViewDataSupplier.is() )
- xViewData = xViewDataSupplier->getViewData();
- if ( xViewData.is() && xViewData->getCount() > 0 )
+ Reference< XViewDataSupplier > xViewDataSupplier( getModel(), UNO_QUERY_THROW );
+ Reference< XIndexAccess > xViewData( xViewDataSupplier->getViewData(), UNO_SET_THROW );
+
+ // find the view data item whose ViewId matches the ID of the view we're just connecting to
+ const SfxObjectFactory& rDocFactory( rDoc.GetFactory() );
+ const sal_Int32 nCount = xViewData->getCount();
+ sal_Int32 nViewDataIndex = 0;
+ for ( sal_Int32 i=0; i<nCount; ++i )
{
- Sequence< PropertyValue > aViewData;
- if ( ( xViewData->getByIndex( 0 ) >>= aViewData ) && ( aViewData.getLength() ) )
+ const ::comphelper::NamedValueCollection aViewData( xViewData->getByIndex(i) );
+ ::rtl::OUString sViewId( aViewData.getOrDefault( "ViewId", ::rtl::OUString() ) );
+ if ( sViewId.getLength() == 0 )
+ continue;
+
+ const SfxViewFactory* pViewFactory = rDocFactory.GetViewFactoryByViewName( sViewId );
+ if ( pViewFactory == NULL )
+ continue;
+
+ if ( pViewFactory->GetOrdinal() == pViewFrame->GetCurViewId() )
{
- m_pData->m_pViewShell->ReadUserDataSequence( aViewData, TRUE );
+ nViewDataIndex = i;
+ break;
}
}
+ if ( nViewDataIndex < nCount )
+ {
+ Sequence< PropertyValue > aViewData;
+ OSL_VERIFY( xViewData->getByIndex( nViewDataIndex ) >>= aViewData );
+ if ( aViewData.getLength() > 0 )
+ m_pData->m_pViewShell->ReadUserDataSequence( aViewData, TRUE );
+ }
}
catch( const Exception& )
{
diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx
index b58bbc2840da..f9469e8a9f88 100644
--- a/sfx2/source/view/viewfac.cxx
+++ b/sfx2/source/view/viewfac.cxx
@@ -49,7 +49,7 @@ void SfxViewFactory::InitFactory()
(*fnInit)();
}
-String SfxViewFactory::GetViewName() const
+String SfxViewFactory::GetLegacyViewName() const
{
::rtl::OUStringBuffer aViewName;
aViewName.appendAscii( "view" );
@@ -57,18 +57,27 @@ String SfxViewFactory::GetViewName() const
return aViewName.makeStringAndClear();
}
+String SfxViewFactory::GetAPIViewName() const
+{
+ if ( m_sViewName.Len() > 0 )
+ return m_sViewName;
+
+ if ( GetOrdinal() == 0 )
+ return String::CreateFromAscii( "Default" );
+
+ return GetLegacyViewName();
+}
+
// CTOR / DTOR -----------------------------------------------------------
SfxViewFactory::SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI,
- USHORT nOrdinal, const ResId& aDescrResId ):
+ USHORT nOrdinal, const sal_Char* asciiViewName ):
fnCreate(fnC),
fnInit(fnI),
nOrd(nOrdinal),
- aDescription(aDescrResId.GetId(), *aDescrResId.GetResMgr())
+ m_sViewName( String::CreateFromAscii( asciiViewName ) )
{
- aDescription.SetRT(aDescrResId.GetRT());
DBG_CTOR(SfxViewFactory, 0);
-// SFX_APP()->RegisterViewFactory_Impl(*this);
}
SfxViewFactory::~SfxViewFactory()
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index a7f5c9d16541..72e3737057c1 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -75,6 +75,8 @@
#include <com/sun/star/uri/XVndSunStarScriptUrl.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
+#include <com/sun/star/document/XViewDataSupplier.hpp>
+#include <com/sun/star/container/XIndexContainer.hpp>
#include <rtl/ustrbuf.hxx>
#include <unotools/localfilehelper.hxx>
@@ -107,6 +109,8 @@ using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::lang;
using ::com::sun::star::awt::XWindow;
using ::com::sun::star::beans::PropertyValue;
+using ::com::sun::star::document::XViewDataSupplier;
+using ::com::sun::star::container::XIndexContainer;
namespace css = ::com::sun::star;
#ifndef GCC
@@ -2261,6 +2265,72 @@ SfxViewFrame* SfxViewFrame::Get( const Reference< XController>& i_rController, c
//--------------------------------------------------------------------
+void SfxViewFrame::SaveCurrentViewData_Impl( const USHORT i_nNewViewId )
+{
+ SfxViewShell* pCurrentShell = GetViewShell();
+ ENSURE_OR_RETURN_VOID( pCurrentShell != NULL, "SfxViewFrame::SaveCurrentViewData_Impl: no current view shell -> no current view data!" );
+
+ // determine the logical (API) view name
+ const SfxObjectFactory& rDocFactory( pCurrentShell->GetObjectShell()->GetFactory() );
+ const sal_uInt16 nCurViewNo = rDocFactory.GetViewNo_Impl( GetCurViewId(), 0 );
+ const String sCurrentViewName = rDocFactory.GetViewFactory( nCurViewNo ).GetAPIViewName();
+ const sal_uInt16 nNewViewNo = rDocFactory.GetViewNo_Impl( i_nNewViewId, 0 );
+ const String sNewViewName = rDocFactory.GetViewFactory( nNewViewNo ).GetAPIViewName();
+ if ( ( sCurrentViewName.Len() == 0 ) || ( sNewViewName.Len() == 0 ) )
+ {
+ // can't say anything about the view, the respective application did not yet migrate its code to
+ // named view factories => bail out
+ OSL_ENSURE( false, "SfxViewFrame::SaveCurrentViewData_Impl: views without API names? Shouldn't happen anymore?" );
+ return;
+ }
+ OSL_ENSURE( !sNewViewName.Equals( sCurrentViewName ), "SfxViewFrame::SaveCurrentViewData_Impl: suspicious: new and old view name are identical!" );
+
+ // save the view data only when we're moving from a non-print-preview to the print-preview view
+ if ( !sNewViewName.EqualsAscii( "PrintPreview" ) )
+ return;
+
+ // retrieve the view data from the view
+ Sequence< PropertyValue > aViewData;
+ pCurrentShell->WriteUserDataSequence( aViewData );
+
+ try
+ {
+ // retrieve view data (for *all* views) from the model
+ const Reference< XController > xController( pCurrentShell->GetController(), UNO_SET_THROW );
+ const Reference< XViewDataSupplier > xViewDataSupplier( xController->getModel(), UNO_QUERY_THROW );
+ const Reference< XIndexContainer > xViewData( xViewDataSupplier->getViewData(), UNO_QUERY_THROW );
+
+ // look up the one view data item which corresponds to our current view, and remove it
+ const sal_Int32 nCount = xViewData->getCount();
+ for ( sal_Int32 i=0; i<nCount; ++i )
+ {
+ const ::comphelper::NamedValueCollection aCurViewData( xViewData->getByIndex(i) );
+ ::rtl::OUString sViewId( aCurViewData.getOrDefault( "ViewId", ::rtl::OUString() ) );
+ if ( sViewId.getLength() == 0 )
+ continue;
+
+ const SfxViewFactory* pViewFactory = rDocFactory.GetViewFactoryByViewName( sViewId );
+ if ( pViewFactory == NULL )
+ continue;
+
+ if ( pViewFactory->GetOrdinal() == GetCurViewId() )
+ {
+ xViewData->removeByIndex(i);
+ break;
+ }
+ }
+
+ // then replace it with the most recent view data we just obtained
+ xViewData->insertByIndex( 0, makeAny( aViewData ) );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+//--------------------------------------------------------------------
+
sal_Bool SfxViewFrame::SwitchToViewShell_Impl
(
sal_uInt16 nViewIdOrNo, /* > 0
@@ -2323,6 +2393,9 @@ sal_Bool SfxViewFrame::SwitchToViewShell_Impl
SfxObjectFactory& rDocFact = GetObjectShell()->GetFactory();
const USHORT nViewId = ( bIsIndex || !nViewIdOrNo ) ? rDocFact.GetViewFactory( nViewIdOrNo ).GetOrdinal() : nViewIdOrNo;
+ // save the view data of the old view, so it can be restored later on (when needed)
+ SaveCurrentViewData_Impl( nViewId );
+
// create and load new ViewShell
SfxViewShell* pNewSh = LoadViewIntoFrame_Impl(
*GetObjectShell(),
diff --git a/solenv/inc/extension_helplink.mk b/solenv/inc/extension_helplink.mk
new file mode 100644
index 000000000000..e375696bda18
--- /dev/null
+++ b/solenv/inc/extension_helplink.mk
@@ -0,0 +1,80 @@
+#*************************************************************************
+#
+# 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
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+my_cp:=$(CLASSPATH)$(PATH_SEPERATOR)$(SOLARBINDIR)/jaxp.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/juh.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/parser.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/xt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/unoil.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/ridl.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/jurt.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/xmlsearch.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/LuceneHelpWrapper.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/HelpIndexerTool.jar$
+
+.IF "$(SYSTEM_LUCENE)" == "YES"
+my_cp!:=$(my_cp)$(PATH_SEPERATOR)$(LUCENE_CORE_JAR)$(PATH_SEPERATOR)$(LUCENE_ANALYZERS_JAR)
+.ELSE
+my_cp!:=$(my_cp)$(PATH_SEPERATOR)$(SOLARBINDIR)/lucene-core-2.3.jar$(PATH_SEPERATOR)$(SOLARBINDIR)/lucene-analyzers-2.3.jar
+.ENDIF
+
+.IF "$(SYSTEM_DB)" != "YES"
+JAVA_LIBRARY_PATH= -Djava.library.path=$(SOLARSHAREDBIN)
+.ENDIF
+
+#aux_alllangiso*:=$(foreach,i,$(alllangiso) $(foreach,j,$(aux_langdirs) $(eq,$i,$j $i $(NULL))))
+aux_alllangiso*:=$(alllangiso)
+
+#########################################################
+
+
+HELPLINKALLTARGETS=$(foreach,i,$(aux_alllangiso) $(MISC)/$(TARGET)_$(LINKNAME)_$i.done)
+HELPLINKALLADDEDDEPS=$(foreach,i,$(aux_alllangiso) $(subst,LANGUAGE,$i $(LINKADDEDDPES)))
+
+ALLTAR : $(HELPLINKALLTARGETS)
+
+.IF "$(SYSTEM_DB)" != "YES"
+JAVA_LIBRARY_PATH= -Djava.library.path=$(SOLARSHAREDBIN)
+.ENDIF
+
+XSL_DIR*:=$(SOLARBINDIR)
+XHPLINKSRC*:=$(XHPDEST)
+STY_SWITCH:= -sty $(XSL_DIR)/embed.xsl
+
+.IF "$(XHPFILES)"!="" && "$(HELP_OUT)"!=""
+$(foreach,i,$(LINKLINKFILES) $(XHPLINKSRC)/{$(aux_alllangiso)}/$i) : $(HELP_OUT)/$(TARGET).done
+LINKDEPS+=$(HELP_OUT)/xhp_changed.flag
+.ENDIF # "$(XHPFILES)"!="" && "$(HELP_OUT)"!=""
+
+$(HELPLINKALLTARGETS) : $(foreach,i,$(LINKLINKFILES) $(XHPLINKSRC)/$$(@:b:s/_/./:e:s/.//)/$i) $(subst,LANGUAGE,$$(@:b:s/_/./:e:s/.//) $(LINKDEPS))
+ @echo Building help index for $(@:b:s/_/./:e:s/.//)
+ $(COMMAND_ECHO)$(HELPLINKER) -mod $(LINKNAME) -extlangsrc $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} $(STY_SWITCH) -extlangdest $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} -idxcaption $(XSL_DIR)/idxcaption.xsl -idxcontent $(XSL_DIR)/idxcontent.xsl $(LINKLINKFILES)
+ $(COMMAND_ECHO)cd $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} && zip -u -r $(LINKNAME).jar $(PACKAGE)/* $(CHECKZIPRESULT)
+.IF "$(SOLAR_JAVA)" == "TRUE"
+# cleanup index dir
+ -$(RM) $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))}/$(LINKNAME).idxl/*
+.IF "$(CHECK_LUCENCE_INDEXER_OUTPUT)" == ""
+ $(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVA_LIBRARY_PATH) -cp "$(my_cp)" com.sun.star.help.HelpIndexerTool -extension -lang $(@:b:s/_/./:e:s/.//) -mod $(LINKNAME) -zipdir $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} && $(TOUCH) $@
+.ELSE
+ $(COMMAND_ECHO)$(JAVAI) $(JAVAIFLAGS) $(JAVA_LIBRARY_PATH) -cp "$(my_cp)" com.sun.star.help.HelpIndexerTool -extension -lang $(@:b:s/_/./:e:s/.//) -mod $(LINKNAME) -zipdir $(XHPLINKSRC)/{$(subst,$(TARGET)_$(LINKNAME)_, $(@:b))} -checkcfsandsegname _0 _3 && $(TOUCH) $@
+.ENDIF
+.ELSE
+ -$(RM) $(XHPLINKSRC)/$(@:b)/content/*.*
+ -$(RM) $(XHPLINKSRC)/$(@:b)/caption/*.*
+.ENDIF
+
diff --git a/solenv/inc/extension_post.mk b/solenv/inc/extension_post.mk
index 47b62d20dd12..f221ff7ebe4a 100644
--- a/solenv/inc/extension_post.mk
+++ b/solenv/inc/extension_post.mk
@@ -39,7 +39,11 @@ fixme4=$(fixme:n)
$(EXTENSIONDIR)/$(COMPONENT_CONFIGDEST)/%.xcu : %.xcu
# ugly hacking to workaround prepended first source path
@@-$(MKDIRHIER) $(subst,$(fixme2),$(MISC) $(@:d))
+.IF "$(COMPONENT_XCU_REPLACEMENT)"!=""
+ $(TYPE) $< | sed '$(COMPONENT_XCU_REPLACEMENT)' > $(subst,$(fixme2),$(MISC) $@)
+.ELSE # "$(COMPONENT_REPLACEMENT)"!=""
$(GNUCOPY) $< $(subst,$(fixme2),$(MISC) $@)
+.ENDIF # "$(COMPONENT_REPLACEMENT)"!=""
$(EXTENSIONDIR)/$(COMPONENT_CONFIGDESTSCHEMA)/%.xcs : %.xcs
@@-$(MKDIRHIER) $(subst,$(fixme4),$(MISC) $(@:d))
diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk
index d769c5bed779..20070cddbd8a 100644
--- a/solenv/inc/minor.mk
+++ b/solenv/inc/minor.mk
@@ -1,5 +1,5 @@
RSCVERSION=330
-RSCREVISION=330m7(Build:9526)
-BUILD=9526
-LAST_MINOR=m7
+RSCREVISION=330m8(Build:9527)
+BUILD=9527
+LAST_MINOR=m8
SOURCEVERSION=OOO330
diff --git a/solenv/inc/tg_help.mk b/solenv/inc/tg_help.mk
index bfd5a0dad5c1..cce5b9ee62b2 100644
--- a/solenv/inc/tg_help.mk
+++ b/solenv/inc/tg_help.mk
@@ -31,11 +31,17 @@
aux_alllangiso*:=$(alllangiso)
SHELL_PACKAGE:=$(subst,/,$/ $(PACKAGE))
+
+.IF "$(XHPDEST)"==""
XHPDEST*:=$(COMMONMISC)
+HELP_OUT:=$(COMMONMISC)
+.ELSE # "$(XHPDEST)"==""
+HELP_OUT:=$(MISC)
+.ENDIF # "$(XHPDEST)"==""
-HLANGXHPFILES:=$(foreach,i,$(XHPFILES) $(foreach,j,$(aux_alllangiso) $(XHPDEST)$/$j$/$(SHELL_PACKAGE)$/$(i:f)))
+HLANGXHPFILES*:=$(foreach,i,$(XHPFILES) $(foreach,j,$(aux_alllangiso) $(XHPDEST)$/$j$/$(SHELL_PACKAGE)$/$(i:f)))
-ALLTAR : $(COMMONMISC)$/$(TARGET).done $(COMMONMISC)$/xhp_changed.flag optix
+ALLTAR : $(HELP_OUT)$/$(TARGET).done $(HELP_OUT)$/xhp_changed.flag optix
$(HLANGXHPFILES) : $$(@:d)thisdir.created
@@ -45,7 +51,7 @@ $(XHPDEST)$/{$(aux_alllangiso)}$/$(SHELL_PACKAGE)$/%.xhp :| %.xhp
# @$(NULL)
-$(COMMONMISC)$/$(TARGET).done : $(HLANGXHPFILES)
+$(HELP_OUT)$/$(TARGET).done : $(HLANGXHPFILES)
.IF "$(WITH_LANG)"!=""
$(AUGMENT_LIBRARY_PATH) $(HELPEX) -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(XHPDEST) -y $(SHELL_PACKAGE) -l all -lf $(aux_alllangiso:t",") -m $(LOCALIZESDF) && $(TOUCH) $@
.ELSE # "$(WITH_LANG)"!=""
@@ -57,24 +63,24 @@ $(COMMONMISC)$/$(TARGET).done : $(HLANGXHPFILES)
@$(ECHONL)
.ENDIF # "$(OS)"=="SOLARIS"
-$(COMMONMISC)$/xhp_changed.flag : $(HLANGXHPFILES)
+$(HELP_OUT)$/xhp_changed.flag : $(HLANGXHPFILES)
@$(TOUCH) $@
# urks - dmake mixes up operators and strings :-(
.IF "$(HLANGXHPFILES:s/defined/xxx/)"!=""
.IF "$(HELPTRANSPHONY)"!=""
-$(COMMONMISC)$/$(TARGET).done .PHONY :
+$(HELP_OUT)$/$(TARGET).done .PHONY :
.ELSE # "$(HELPTRANSPHONY)"!=""
-$(COMMONMISC)$/$(TARGET).done : makefile.mk
+$(HELP_OUT)$/$(TARGET).done : makefile.mk
.IF "$(WITH_LANG)"!=""
-$(COMMONMISC)$/$(TARGET).done : $(LOCALIZESDF)
+$(HELP_OUT)$/$(TARGET).done : $(LOCALIZESDF)
.ENDIF # "$(WITH_LANG)"!=""
.ENDIF # "$(HELPTRANSPHONY)"!=""
.ENDIF # "$(HLANGXHPFILES)"!=""
-optix: $(COMMONMISC)$/$(TARGET).done
+optix: $(HELP_OUT)$/$(TARGET).done
@echo done
%.created :
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc
index d73ea27a0d45..8d156792e1d3 100644
--- a/starmath/inc/starmath.hrc
+++ b/starmath/inc/starmath.hrc
@@ -107,7 +107,7 @@
#define RID_READSYMBOLERROR (RID_APP_START + 203)
#define RID_NOMATHTYPEFACEWARNING (RID_APP_START + 204)
#define RID_OBJECTNAME (RID_APP_START + 501)
-#define RID_VIEWNAME (RID_APP_START + 502)
+ // free
#define RID_UNDOEDITNAME (RID_APP_START + 503)
#define RID_UNDOFORMATNAME (RID_APP_START + 504)
#define RID_APPICO (RID_APP_START + 601)
diff --git a/starmath/source/smres.src b/starmath/source/smres.src
index 7d3525bd2a29..c35d77c9afcf 100755
--- a/starmath/source/smres.src
+++ b/starmath/source/smres.src
@@ -1379,10 +1379,6 @@ String RID_OBJECTNAME
{
Text = "SMath3" ;
};
-String RID_VIEWNAME
-{
- Text = "StarMath" ;
-};
String RID_UNDOEDITNAME
{
Text = "Edit" ;
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 0087595703ca..3920c65e941c 100755
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -749,7 +749,7 @@ SFX_IMPL_INTERFACE(SmViewShell, SfxViewShell, SmResId(0))
}
-SFX_IMPL_VIEWFACTORY(SmViewShell, SmResId(RID_VIEWNAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SmViewShell, "Default")
{
SFX_VIEW_REGISTRATION(SmDocShell);
}
diff --git a/svtools/inc/svtools/table/tabledatawindow.hxx b/svtools/inc/svtools/table/tabledatawindow.hxx
index 9a6ece489119..829feecd5836 100644
--- a/svtools/inc/svtools/table/tabledatawindow.hxx
+++ b/svtools/inc/svtools/table/tabledatawindow.hxx
@@ -55,7 +55,6 @@ namespace svt { namespace table
Link m_aMouseButtonDownHdl;
Link m_aMouseButtonUpHdl;
Link m_aSelectHdl;
- RowPos m_nRowAlreadySelected;
public:
TableDataWindow( TableControl_Impl& _rTableControl );
inline void SetMouseButtonDownHdl( const Link& rLink ) { m_aMouseButtonDownHdl = rLink; }
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 484584828b9f..35324d551858 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2172,14 +2172,6 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
SelAllDestrAnch( FALSE, TRUE ); // DeselectAll();
SetCursor( pEntry );
- DBG_ERROR( "Please report what you did to get this assertion to FS!" );
- // The entry which has been double-clicked changed - and we select it, again.
- // I have situations where this behaviour does not make any sense at all - even more, it
- // leads to hacks to revert it's results.
- // So I'm not sure if this behaviour here is nonsense (which I believe at the moment),
- // or if there are really scenarious where it dones make sense ....
- // 07.12.2001 - 95727 - fs@openoffice.org
-
return;
}
if( pEntry->HasChilds() || pEntry->HasChildsOnDemand() )
diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx
index ad8f7a7562d3..f6a58ad17efe 100644
--- a/svtools/source/table/defaultinputhandler.cxx
+++ b/svtools/source/table/defaultinputhandler.cxx
@@ -173,6 +173,7 @@ namespace svt { namespace table
if ( ( pActions->nKeyCode == nKeyCode ) && ( pActions->nKeyModifier == rKeyCode.GetAllModifier() ) )
{
bHandled = _rControl.dispatchAction( pActions->eAction );
+ bHandled = true; // always handled issue #i114340
break;
}
}
diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx
index e2e1ce5353fe..bbd7f6829369 100644
--- a/svtools/source/table/tabledatawindow.cxx
+++ b/svtools/source/table/tabledatawindow.cxx
@@ -45,7 +45,6 @@ namespace svt { namespace table
TableDataWindow::TableDataWindow( TableControl_Impl& _rTableControl )
:Window( &_rTableControl.getAntiImpl() )
,m_rTableControl ( _rTableControl )
- ,m_nRowAlreadySelected( -1 )
{
// by default, use the background as determined by the style settings
const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() );
@@ -110,15 +109,17 @@ namespace svt { namespace table
{
Point aPoint = rMEvt.GetPosPixel();
RowPos nCurRow = m_rTableControl.getCurrentRow(aPoint);
+ std::vector<RowPos> selectedRows(m_rTableControl.getSelectedRows());
if ( !m_rTableControl.getInputHandler()->MouseButtonDown( m_rTableControl, rMEvt ) )
Window::MouseButtonDown( rMEvt );
else
{
if(nCurRow >= 0 && m_rTableControl.getSelEngine()->GetSelectionMode() != NO_SELECTION)
{
- if( m_nRowAlreadySelected != nCurRow )
+ bool found = std::find(selectedRows.begin(),selectedRows.end(), nCurRow) != selectedRows.end();
+
+ if( !found )
{
- m_nRowAlreadySelected = nCurRow;
m_aSelectHdl.Call( NULL );
}
}
diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx
index c54634017392..80096ce70f32 100644
--- a/svx/source/dialog/checklbx.cxx
+++ b/svx/source/dialog/checklbx.cxx
@@ -212,7 +212,7 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( rMEvt.IsLeft() )
{
- Point aPnt = rMEvt.GetPosPixel();
+ const Point aPnt = rMEvt.GetPosPixel();
SvLBoxEntry* pEntry = GetEntry( aPnt );
if ( pEntry )
@@ -230,6 +230,13 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt )
{
ToggleCheckButton( pEntry );
SvTreeListBox::MouseButtonDown( rMEvt );
+
+ // check if the entry below the mouse changed during the base method call. This is possible if,
+ // for instance, a handler invoked by the base class tampers with the list entries.
+ const SvLBoxEntry* pNewEntry = GetEntry( aPnt );
+ if ( pNewEntry != pEntry )
+ return;
+
if ( bCheck != ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ) )
CheckButtonHdl();
return;
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index d860f4973fd2..9c5affc38f9b 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -708,6 +708,7 @@ void SvxItemPropertySet_ObtainSettingsFromPropertySet(const SvxItemPropertySet&
// next entry
++aSrcIt;
}
+ const_cast< SvxItemPropertySet& >(rPropSet).ClearAllUsrAny();
}
}
diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
index 8032d3506a27..f492696ef8ac 100644
--- a/sw/source/core/attr/cellatr.cxx
+++ b/sw/source/core/attr/cellatr.cxx
@@ -28,9 +28,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+#include <float.h>
+#include <rtl/math.hxx>
-#include <float.h>
#include <hintids.hxx> // fuer RES_..
#include <cellatr.hxx>
#include <calc.hxx>
@@ -249,8 +250,12 @@ SwTblBoxValue::SwTblBoxValue( const double nVal )
int SwTblBoxValue::operator==( const SfxPoolItem& rAttr ) const
{
- ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
- return nValue == ((SwTblBoxValue&)rAttr).nValue;
+ ASSERT(SfxPoolItem::operator==(rAttr), "SwTblBoxValue: item not equal");
+ SwTblBoxValue const& rOther( static_cast<SwTblBoxValue const&>(rAttr) );
+ // items with NaN should be equal to enable pooling
+ return ::rtl::math::isNan(nValue)
+ ? ::rtl::math::isNan(rOther.nValue)
+ : (nValue == rOther.nValue);
}
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index b7098710802b..fdc382ad99d9 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1009,12 +1009,9 @@ void SwXCell::setFormula(const OUString& rFormula) throw( uno::RuntimeException
double SwXCell::getValue(void) throw( uno::RuntimeException )
{
vos::OGuard aGuard(Application::GetSolarMutex());
- double fRet = lcl_getValue( *this );
- //lcl_getValue was changed thus it can return nan values,
- //so I make this additional nan check here to not change the behaviour
- //but maybe it would even be more correct to just return nan here? ... todo?
- if( ::rtl::math::isNan( fRet ) )
- fRet = 0.0;
+
+ double const fRet = lcl_getValue( *this );
+ // #i112652# a table cell may contain NaN as a value, do not filter that
return fRet;
}
/*-- 11.12.98 10:56:26---------------------------------------------------
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index a4805a168c1c..281e3ce3fabb 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -823,7 +823,7 @@ void SwSpellPopup::Execute( USHORT nId )
else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END)
{
OUString aWord( xSpellAlt->getWord() );
- //DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" );
+// DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" );
PopupMenu *pMenu = GetPopupMenu(MN_ADD_TO_DIC);
String aDicName ( pMenu->GetItemText(nId) );
diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx
index d499add5ad53..27fe1a65641f 100644
--- a/sw/source/ui/uiview/pview.cxx
+++ b/sw/source/ui/uiview/pview.cxx
@@ -108,7 +108,7 @@
using namespace ::com::sun::star;
-SFX_IMPL_VIEWFACTORY(SwPagePreView, SW_RES(STR_NONAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreView, "PrintPreview")
{
SFX_VIEW_REGISTRATION(SwDocShell);
SFX_VIEW_REGISTRATION(SwWebDocShell);
diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx
index 801ecba22c73..667beb8ab4ca 100644
--- a/sw/source/ui/uiview/srcview.cxx
+++ b/sw/source/ui/uiview/srcview.cxx
@@ -125,7 +125,7 @@ using ::com::sun::star::util::SearchOptions;
-SFX_IMPL_VIEWFACTORY(SwSrcView, SW_RES(STR_NONAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SwSrcView, "SourceView")
{
SFX_VIEW_REGISTRATION(SwWebDocShell);
}
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index 9d905a4c3443..93a29f699f5a 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -105,7 +105,7 @@ using ::rtl::OUString;
#include <unomid.h>
-SFX_IMPL_VIEWFACTORY(SwView, SW_RES(STR_NONAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Default")
{
if ( SvtModuleOptions().IsWriter() )
{
diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx
index 9a55aaf94a28..1822ab2de4e8 100644
--- a/sw/source/ui/web/wview.cxx
+++ b/sw/source/ui/web/wview.cxx
@@ -93,7 +93,7 @@
#include <swslots.hxx>
-SFX_IMPL_VIEWFACTORY(SwWebView, SW_RES(STR_NONAME))
+SFX_IMPL_NAMED_VIEWFACTORY(SwWebView, "Default")
{
SFX_VIEW_REGISTRATION(SwWebDocShell);
}
diff --git a/swext/mediawiki/build.xml b/swext/mediawiki/build.xml
index ff96fe578ca6..8dea0dce0bd2 100644
--- a/swext/mediawiki/build.xml
+++ b/swext/mediawiki/build.xml
@@ -123,15 +123,6 @@
<filter token="WIKIEXTENSIONFILENAME" value="${name}"/>
</filterset>
</copy>
- <copy todir="${out}/misc/${target}/package_tmp/help" overwrite="true" encoding="UTF-8">
- <fileset dir="${out}/misc/${target}/help" includes="**/*.xhp" casesensitive="yes"/>
- <filterset>
- <filter token="WIKIEXTENSIONPRODUCTNAME" value="Wiki Publisher"/>
- <filter token="WIKIEXTENSIONID" value="com.sun.wiki-publisher"/>
- <filter token="WIKIEXTENSIONFILENAME" value="${name}"/>
- </filterset>
- <mapper type="regexp" from="^(.*[/\\])com.sun.sun-mediawiki([/\\].*)" to="\1com.sun.wiki-publisher\2"/>
- </copy>
</target>
<target name="uno-package" depends="tmpdir, xcumerge, jar, init">
@@ -149,6 +140,8 @@
<zipfileset dir="src" includes="uno-extension-manifest.xml" casesensitive="yes" fullpath="META-INF/manifest.xml"/>
<zipfileset dir="dialogs" includes="**/*.xdl,**/*.xba,**/*.xlb" casesensitive="yes" prefix="WikiEditor"/>
<zipfileset dir="${out}/misc/${target}/license" includes="LICENSE*" casesensitive="yes" prefix="license"/>
+ <zipfileset dir="${out}/misc/${target}/help" includes="**/*.idxl/*,**/*.*_,**/*.jar" casesensitive="yes" prefix="help"/>
+ <zipfileset dir="${out}/misc/${target}/help" includes="**/*.xhp" casesensitive="yes" prefix="help"/>
<zipfileset dir="src" includes="THIRDPARTYLICENSEREADME.html" casesensitive="yes" prefix="license"/>
</zip>
</target>
@@ -161,14 +154,15 @@
<fileset dir="${out}/misc/${target}/registry/schema/org/openoffice/Office/Custom" includes="*.xcs" casesensitive="yes"/>
<fileset dir="${out}/misc/${target}/registry/data/org/openoffice/Office" includes="ProtocolHandler.xcu,Paths.xcu" casesensitive="yes"/>
<fileset dir="${out}/misc/${target}/merge/org/openoffice/Office/Custom" includes="*.xcu" casesensitive="yes"/>
- <fileset dir="${out}/misc/${target}/merge/org/openoffice/Office" includes="*.xcu" casesensitive="yes"/>
+ <fileset dir="${out}/misc/${target}/merge/org/openoffice/Office" includes="*.xcu" excludes="**/ProtocolHandler.xcu,**/Paths.xcu" casesensitive="yes"/>
<!-- FIXME: currently the build xcu files can not be used since the tag containing x-default attribute is thrown away, issue 99378
<fileset dir="${out}/misc/${target}/merge/org/openoffice/TypeDetection" includes="*.xcu" casesensitive="yes"/>
-->
<fileset dir="src/registry/data/org/openoffice/TypeDetection" includes="*.xcu" casesensitive="yes"/>
<zipfileset file="src/filter/odt2mediawiki.xsl" casesensitive="yes" fullpath="filter/odt2mediawiki.xsl"/>
<zipfileset file="src/filter/mediawiki.ott" casesensitive="yes" fullpath="templates/MediaWiki/mediawiki.ott"/>
- <zipfileset dir="${out}/misc/${target}/help" includes="**/*.xhp,component.txt" casesensitive="yes" prefix="help"/>
+ <zipfileset dir="${out}/misc/${target}/help" includes="component.txt" casesensitive="yes" prefix="help"/>
+ <zipfileset dir="${out}/misc/${target}_merge/help" includes="**/*.xhp" casesensitive="yes" prefix="help"/>
<zipfileset dir="dialogs" includes="**/*.xdl,**/*.xba,**/*.xlb" casesensitive="yes" prefix="WikiEditor"/>
<zipfileset dir="src" includes="uno-extension-manifest.xml" casesensitive="yes" fullpath="META-INF/manifest.xml"/>
<zipfileset dir="${out}/misc/${target}/license" includes="LICENSE*" casesensitive="yes" prefix="license"/>
diff --git a/swext/mediawiki/help/makefile.mk b/swext/mediawiki/help/makefile.mk
index 1cb200a1860f..1804ec2b668a 100644
--- a/swext/mediawiki/help/makefile.mk
+++ b/swext/mediawiki/help/makefile.mk
@@ -30,16 +30,29 @@ PRJNAME=swext
TARGET=$(PRJNAME)_help
.INCLUDE : settings.mk
-.INCLUDE : target.mk
-
-.IF "$(ENABLE_MEDIAWIKI)" == "YES"
-PACKAGE=com.sun.sun-mediawiki
+.IF "$(WITH_LANG)"!=""
# workaround for the problem in help, the help uses en instead of en-US
-MEDIAWIKI_LANG= en $(alllangiso)
+MEDIAWIKI_LANG=$(uniq en $(alllangiso))
+aux_alllangiso:=$(MEDIAWIKI_LANG)
+.ELSE # "$(WITH_LANG)"!=""
+aux_alllangiso:=$(defaultlangiso)
+MEDIAWIKI_LANG=$(uniq en $(alllangiso))
+.ENDIF # "$(WITH_LANG)"!=""
+
+.IF "$(ENABLE_MEDIAWIKI)" != "YES"
+all:
+ @echo Building mediawiki disabled...
+.ELSE # "$(ENABLE_MEDIAWIKI)" != "YES"
+
+PACKAGE=com.sun.wiki-publisher
-OUT_MEDIAWIKI=$(MISC)$/mediawiki
-OUT_HELP=$(OUT_MEDIAWIKI)$/help
+OUT_MEDIAWIKI:=$(MISC)$/mediawiki
+
+LINKNAME:=help
+XHPLINKSRC:=$(OUT_MEDIAWIKI)/help
+
+XHPDEST=$(OUT_MEDIAWIKI)_merge/help
XHPFILES= \
wiki.xhp\
@@ -48,26 +61,27 @@ XHPFILES= \
wikisend.xhp\
wikisettings.xhp
-HLANGXHPFILES:=$(foreach,i,$(XHPFILES) $(foreach,j,$(MEDIAWIKI_LANG) $(OUT_HELP)$/$j$/$(PACKAGE)$/$(i:f)))
+LINKLINKFILES= \
+ $(PACKAGE)/{$(XHPFILES)}
-ALLTAR : $(OUT_MEDIAWIKI)$/$(TARGET).done $(OUT_HELP)$/component.txt
+# define with own language set
+HLANGXHPFILES=$(foreach,i,$(XHPFILES) $(foreach,j,$(MEDIAWIKI_LANG) $(XHPDEST)$/$j$/$(PACKAGE)$/$(i:f)))
-#$(OUT_MEDIAWIKI)$/xhp_changed.flag optix
-
-$(OUT_HELP)$/component.txt : component.txt
- $(COPY) component.txt $(OUT_HELP)$/component.txt
+.INCLUDE : target.mk
+.INCLUDE : tg_help.mk
+.INCLUDE : extension_helplink.mk
-$(HLANGXHPFILES) : #$$(@:d)thisdir.created
- -$(MKDIRHIER) $(@:d)
- $(TOUCH) $(@:d)thisdir.created
+ALLTAR : $(OUT_MEDIAWIKI)/help/component.txt
-$(OUT_HELP)$/{$(MEDIAWIKI_LANG)}$/$(PACKAGE)$/%.xhp :| %.xhp
- @$(TOUCH) $@
-# internal dependencies not sufficient to trigger merge?
-# @$(NULL)
+$(OUT_MEDIAWIKI)/help/component.txt : component.txt
+ @-$(MKDIRHIER) $(@:d)
+ $(COMMAND_ECHO)$(COPY) component.txt $@
+$(OUT_MEDIAWIKI)/help/%.xhp : $(OUT_MEDIAWIKI)_merge/help/%.xhp
+ @-$(MKDIRHIER) $(@:d)
+ $(COMMAND_ECHO)cat $< | sed -e 's/@WIKIEXTENSIONPRODUCTNAME@/Wiki Publisher/g' | \
+ sed 's/@WIKIEXTENSIONID@/com.sun.wiki-publisher/g' | \
+ sed 's/@WIKIEXTENSIONFILENAME@/wiki-publisher/g' > $@
-$(OUT_MEDIAWIKI)$/$(TARGET).done : $(LOCALIZESDF) $(XHPFILES) $(HLANGXHPFILES)
- @$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(HELPEX) -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(OUT_HELP) -y $(PACKAGE) -l all -lf $(MEDIAWIKI_LANG:t",") -m $(LOCALIZESDF) && $(TOUCH) $@
-.ENDIF
+.ENDIF # "$(ENABLE_MEDIAWIKI)" != "YES"
diff --git a/swext/prj/build.lst b/swext/prj/build.lst
index eb1aaca61422..aa07df358770 100644
--- a/swext/prj/build.lst
+++ b/swext/prj/build.lst
@@ -1,4 +1,4 @@
-swext swext : officecfg l10n javaunohelper ridljar unoil jurt APACHE_COMMONS:apache-commons readlicense_oo xsltml NULL
+swext swext : officecfg l10n javaunohelper ridljar unoil jurt APACHE_COMMONS:apache-commons readlicense_oo xsltml xmlhelp NULL
swext swext usr1 - all swext_mkout NULL
swext swext\mediawiki\help nmake - all swext_mwhelp NULL
swext swext\mediawiki\src\registry\schema\org\openoffice\Office\Custom nmake - all swext_mwschema NULL
diff --git a/testautomation/dbaccess/optional/includes/rpt_Formating.inc b/testautomation/dbaccess/optional/includes/rpt_Formating.inc
index e2671728b168..4bde542bd176 100755
--- a/testautomation/dbaccess/optional/includes/rpt_Formating.inc
+++ b/testautomation/dbaccess/optional/includes/rpt_Formating.inc
@@ -62,9 +62,9 @@ testcase tConditionalFormating
sleep(1)
Kontext "ReportDesign"
- ReportDesign.MouseDown ( 30, 50 )
- ReportDesign.MouseMove ( 40, 60 )
- ReportDesign.MouseUp ( 40, 60 )
+ ReportDesign.MouseDown ( 30, 40 )
+ ReportDesign.MouseMove ( 40, 50 )
+ ReportDesign.MouseUp ( 40, 50 )
sleep(1)
'/// open the conditional formating dialog via the menu
@@ -129,9 +129,9 @@ testcase tGrowAndShrink
sleep(1)
Kontext "ReportDesign"
- ReportDesign.MouseDown ( 30, 50 )
- ReportDesign.MouseMove ( 40, 60 )
- ReportDesign.MouseUp ( 40, 60 )
+ ReportDesign.MouseDown ( 30, 40 )
+ ReportDesign.MouseMove ( 40, 50 )
+ ReportDesign.MouseUp ( 40, 50 )
sleep(1)
'/// open the conditional formating dialog via the menu
diff --git a/toolkit/inc/toolkit/helper/solarrelease.hxx b/toolkit/inc/toolkit/helper/solarrelease.hxx
index d8938b41c220..e45a1b6ee2c3 100644
--- a/toolkit/inc/toolkit/helper/solarrelease.hxx
+++ b/toolkit/inc/toolkit/helper/solarrelease.hxx
@@ -41,15 +41,36 @@ namespace toolkit
class ReleaseSolarMutex
{
sal_uInt32 mnLockCount;
+ const bool mbRescheduleDuringAcquire;
+
public:
- ReleaseSolarMutex()
+ enum
{
- mnLockCount = Application::ReleaseSolarMutex();
+ RescheduleDuringAcquire = true
+ };
+
+ public:
+ ReleaseSolarMutex( const bool i_rescheduleDuringAcquire = false )
+ :mnLockCount( Application::ReleaseSolarMutex() )
+ ,mbRescheduleDuringAcquire( i_rescheduleDuringAcquire )
+ {
+
}
~ReleaseSolarMutex()
{
- Application::AcquireSolarMutex( mnLockCount );
+ if ( mnLockCount > 0 )
+ {
+ if ( mbRescheduleDuringAcquire )
+ {
+ while ( !Application::GetSolarMutex().tryToAcquire() )
+ {
+ Application::Reschedule();
+ }
+ --mnLockCount;
+ }
+ Application::AcquireSolarMutex( mnLockCount );
+ }
}
};
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index efc2c40c6baa..1022d78a43ed 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -92,6 +92,7 @@ using ::com::sun::star::style::VerticalAlignment_MAKE_FIXED_SIZE;
namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior;
+using ::toolkit::ReleaseSolarMutex;
//====================================================================
//= misc helpers
@@ -339,7 +340,7 @@ IMPL_LINK( VCLXWindowImpl, OnProcessCallbacks, void*, EMPTYARG )
}
{
- ::toolkit::ReleaseSolarMutex aReleaseSolar;
+ ReleaseSolarMutex aReleaseSolar( ReleaseSolarMutex::RescheduleDuringAcquire );
for ( CallbackArray::const_iterator loop = aCallbacksCopy.begin();
loop != aCallbacksCopy.end();
++loop
diff --git a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
index 53ab6dd36128..804cf108dba8 100644
--- a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
@@ -40,20 +40,23 @@ using namespace ::com::sun::star::uno;
+(id)selectedChildrenAttributeForElement:(AquaA11yWrapper *)wrapper
{
Reference< XAccessibleSelection > xAccessibleSelection = [ wrapper accessibleSelection ];
- NSMutableArray * children = [ [ NSMutableArray alloc ] init ];
-
- try {
- sal_Int32 n = xAccessibleSelection -> getSelectedAccessibleChildCount();
- for ( sal_Int32 i=0 ; i < n ; ++i ) {
- [ children addObject: [ AquaA11yFactory wrapperForAccessible: xAccessibleSelection -> getSelectedAccessibleChild( i ) ] ];
+ if( xAccessibleSelection.is() )
+ {
+ NSMutableArray * children = [ [ NSMutableArray alloc ] init ];
+ try {
+ sal_Int32 n = xAccessibleSelection -> getSelectedAccessibleChildCount();
+ for ( sal_Int32 i=0 ; i < n ; ++i ) {
+ [ children addObject: [ AquaA11yFactory wrapperForAccessible: xAccessibleSelection -> getSelectedAccessibleChild( i ) ] ];
+ }
+
+ return children;
+
+ } catch ( Exception& e)
+ {
}
-
- return children;
-
- } catch ( Exception& e) {
- return nil;
}
+ return nil;
}
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index 8a4744d1efcd..ca3fcc04769a 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -1453,16 +1453,24 @@ BOOL AquaSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight,
// prepare the target context
NSGraphicsContext* pOrigNSCtx = [NSGraphicsContext currentContext];
+ [pOrigNSCtx retain];
+
+ // create new context
NSGraphicsContext* pDrawNSCtx = [NSGraphicsContext graphicsContextWithGraphicsPort: mrContext flipped: IsFlipped()];
+ // set it, setCurrentContext also releases the prviously set one
[NSGraphicsContext setCurrentContext: pDrawNSCtx];
+
// draw the EPS
const NSRect aDstRect = {{nX,nY},{nWidth,nHeight}};
const BOOL bOK = [xEpsImage drawInRect: aDstRect];
+
+ // restore the NSGraphicsContext
+ [NSGraphicsContext setCurrentContext: pOrigNSCtx];
+ [pOrigNSCtx release]; // restore the original retain count
+
CGContextRestoreGState( mrContext );
// mark the destination rectangle as updated
RefreshRect( aDstRect );
- // restore the NSGraphicsContext, TODO: do we need this?
- [NSGraphicsContext setCurrentContext: pOrigNSCtx];
return bOK;
}
diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx
index 6e206977b5c4..9ce2b8a5a518 100644
--- a/vcl/aqua/source/gdi/salnativewidgets.cxx
+++ b/vcl/aqua/source/gdi/salnativewidgets.cxx
@@ -1366,10 +1366,12 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
w = aCtrlBoundRect.GetWidth();
if( w < 3+2*FOCUS_RING_WIDTH )
w = 3+2*FOCUS_RING_WIDTH;
- h = TEXT_EDIT_HEIGHT_NORMAL;
+ h = TEXT_EDIT_HEIGHT_NORMAL+2*FOCUS_RING_WIDTH;
+ if( h < aCtrlBoundRect.GetHeight() )
+ h = aCtrlBoundRect.GetHeight();
- rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*FOCUS_RING_WIDTH-2, h-2 ) );
- rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
+ rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*(FOCUS_RING_WIDTH+1), h-2*(FOCUS_RING_WIDTH+1) ) );
+ rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
toReturn = TRUE;
}
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index f3624ef56f59..f6a37658b79f 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -773,7 +773,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
BOOL bWrapped = FALSE;
while( pWin )
{
- if( !pWin->ImplIsRealParentPath( this ) &&
+ if( !pWin->ImplIsRealParentPath( this ) && ( pWin != this ) &&
pWin->ImplGetWindow()->IsTopWindow() && pWin->mpWindowImpl->mbReallyVisible )
{
SalFrameGeometry g = pWin->mpWindowImpl->mpFrame->GetGeometry();
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 9d3ce6b137cd..ec92c20b54b5 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1102,8 +1102,9 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
GtkRequisition aReq;
gtk_widget_size_request( widget, &aReq );
Rectangle aEditRect = rControlRegion;
+ long nHeight = (aEditRect.GetHeight() > aReq.height+1) ? aEditRect.GetHeight() : aReq.height+1;
aEditRect = Rectangle( aEditRect.TopLeft(),
- Size( aEditRect.GetWidth(), aReq.height+1 ) );
+ Size( aEditRect.GetWidth(), nHeight ) );
rNativeBoundingRegion = aEditRect;
rNativeContentRegion = rNativeBoundingRegion;
returnVal = TRUE;
@@ -2291,11 +2292,10 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
const ImplControlValue& aValue,
const OUString& )
{
- OSL_ASSERT( aValue.getType() == CTRL_TAB_ITEM );
+ OSL_ASSERT( nType != CTRL_TAB_ITEM || aValue.getType() == CTRL_TAB_ITEM );
GdkPixmap * pixmap;
Rectangle pixmapRect;
Rectangle tabRect;
- const TabitemValue * pTabitemValue = static_cast<const TabitemValue *>(&aValue);
GtkStateType stateType;
GtkShadowType shadowType;
if( ! gWidgetData[ m_nScreen ].gCacheTabItems )
@@ -2311,9 +2311,8 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
if( !aCachePage.GetSize() )
aCachePage.SetSize( 1 );
- if ( !pTabitemValue && (nType==CTRL_TAB_ITEM) )
+ if ( (nType == CTRL_TAB_ITEM) && (aValue.getType() != CTRL_TAB_ITEM) )
{
- std::fprintf( stderr, "NWPaintGTKTabItem() received a NULL TabitemValue. Cannot draw native tab\n" );
return( false );
}
@@ -2326,6 +2325,7 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
pixmapRect = rControlRectangle;
if ( nType == CTRL_TAB_ITEM )
{
+ const TabitemValue * pTabitemValue = static_cast<const TabitemValue *>(&aValue);
if ( !pTabitemValue->isFirst() )
{
// GTK+ tabs overlap on the right edge (the top tab obscures the
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 806d3b420b33..bc80cbf94fb8 100755
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -2203,7 +2203,9 @@ void UniscribeLayout::Simplify( bool /*bIsBase*/ )
const int k = mpGlyphs2Chars[ i ];
mpGlyphs2Chars[ j ] = k;
const int nRelGlyphPos = (j++) - rVI.mnMinGlyphPos;
- mpLogClusters[ k ] = static_cast<WORD>(nRelGlyphPos);
+ if( k < 0) // extra glyphs are already mapped
+ continue;
+ mpLogClusters[ k ] = static_cast<WORD>(nRelGlyphPos);
}
rVI.mnEndGlyphPos = j;
diff --git a/xmlhelp/prj/d.lst b/xmlhelp/prj/d.lst
index 1cfa107f73b9..67fe323757bb 100644
--- a/xmlhelp/prj/d.lst
+++ b/xmlhelp/prj/d.lst
@@ -4,4 +4,7 @@
..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.*
..\%__SRC%\class\*.jar %_DEST%\bin%_EXT%\*.*
..\util\ucpchelp.xml %_DEST%\xml%_EXT%\ucpchelp.xml
+..\util\*.xsl %_DEST%\bin%_EXT%\*.*
..\%__SRC%\lib\ihelplinker.lib %_DEST%\lib%_EXT%\ihelplinker.lib
+..\%__SRC%\bin\helpxsl.zip %_DEST%\pck%_EXT%\helpxsl.zip
+
diff --git a/xmlhelp/util/delzip b/xmlhelp/util/delzip
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/xmlhelp/util/delzip
diff --git a/xmlhelp/util/embed.xsl b/xmlhelp/util/embed.xsl
new file mode 100644
index 000000000000..3a4e3ef80f61
--- /dev/null
+++ b/xmlhelp/util/embed.xsl
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:output indent="yes" method="xml"/>
+
+<!-- SPECIFY YOUR FILE SYSTEM ROOT PATH TO THE HELP FILES -->
+<xsl:param name="fsroot" select="'file:///handbuch/WORKBENCH/helpcontent2/source/'"/>
+
+<!--
+######################################################
+All others
+######################################################
+-->
+<xsl:template match="/">
+ <xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="*|@*|comment()|processing-instruction()|text()">
+ <xsl:copy>
+ <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="*|@*|comment()|processing-instruction()|text()" mode="embedded">
+ <xsl:copy>
+ <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()" mode="embedded"/>
+ </xsl:copy>
+</xsl:template>
+
+<xsl:template match="bookmark" mode="embedded" />
+<xsl:template match="ahelp" mode="embedded">
+ <xsl:apply-templates mode="embedded"/>
+</xsl:template>
+
+<xsl:template match="paragraph[@role='heading']">
+ <title>
+ <xsl:apply-templates/>
+ </title>
+</xsl:template>
+
+<xsl:template match="paragraph[@role=*]">
+ <paragraph>
+ <xsl:apply-templates/>
+ </paragraph>
+</xsl:template>
+
+<xsl:template match="sort">
+ <xsl:apply-templates/>
+</xsl:template>
+
+
+<!--
+######################################################
+EMBED
+######################################################
+-->
+<xsl:template match="embed">
+
+ <xsl:variable name="href"><xsl:value-of select="substring-before(concat($fsroot,@href),'#')"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <xsl:apply-templates select="$doc//section[@id=$anchor]" mode="embedded"/>
+ <xsl:if test="not($doc//section[@id=$anchor])"> <!-- fallback for embeds that actually should be embedvars -->
+ <paragraph role="paragraph"><xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/></paragraph>
+ </xsl:if>
+</xsl:template>
+
+<!--
+######################################################
+EMBEDVAR
+######################################################
+-->
+<xsl:template match="embedvar">
+ <xsl:if test="not(@href='text/shared/00/00000004.xhp#wie')"> <!-- special treatment if howtoget links -->
+ <xsl:variable name="href"><xsl:value-of select="substring-before(concat($fsroot,@href),'#')"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
+ </xsl:if>
+
+ <!-- FPE: embedvars, that point to "text/shared/00/00000004.xml#wie" will only be resolved in the main_transform -->
+
+</xsl:template>
+</xsl:stylesheet>
diff --git a/xmlhelp/util/idxcaption.xsl b/xmlhelp/util/idxcaption.xsl
new file mode 100644
index 000000000000..7570fa5c7870
--- /dev/null
+++ b/xmlhelp/util/idxcaption.xsl
@@ -0,0 +1,34 @@
+<xsl:stylesheet version="1.0" encoding="UTF-8"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:office="http://openoffice.org/2000/office"
+ xmlns:style="http://openoffice.org/2000/style"
+ xmlns:table="http://openoffice.org/2000/table"
+ xmlns:draw="http://openoffice.org/2000/drawing"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:meta="http://openoffice.org/2000/meta"
+ xmlns:number="http://openoffice.org/2000/datastyle"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:chart="http://openoffice.org/2000/chart"
+ xmlns:help="http://openoffice.org/2000/help"
+ xmlns:index="http://sun.com/2000/XMLSearch"
+ xmlns:text="http://openoffice.org/2000/text">
+
+<xsl:param name="Language" select="'en-US'"/>
+<xsl:output method="text" encoding="UTF-8"/>
+
+<xsl:template match="/">
+ <xsl:apply-templates select="//title" mode="include"/>
+ <xsl:apply-templates select="//paragraph[@role='heading']" mode="include"/>
+</xsl:template>
+
+<xsl:template match="*" mode="include">
+ <xsl:value-of select="."/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="*"/>
+
+</xsl:stylesheet>
+
diff --git a/xmlhelp/util/idxcontent.xsl b/xmlhelp/util/idxcontent.xsl
new file mode 100644
index 000000000000..aa371d7f9255
--- /dev/null
+++ b/xmlhelp/util/idxcontent.xsl
@@ -0,0 +1,104 @@
+<xsl:stylesheet version="1.0" encoding="UTF-8"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:office="http://openoffice.org/2000/office"
+ xmlns:style="http://openoffice.org/2000/style"
+ xmlns:table="http://openoffice.org/2000/table"
+ xmlns:draw="http://openoffice.org/2000/drawing"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:meta="http://openoffice.org/2000/meta"
+ xmlns:number="http://openoffice.org/2000/datastyle"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:chart="http://openoffice.org/2000/chart"
+ xmlns:help="http://openoffice.org/2000/help"
+ xmlns:index="http://sun.com/2000/XMLSearch"
+ xmlns:text="http://openoffice.org/2000/text">
+
+<xsl:param name="Language" select="'en-US'"/>
+<xsl:output method="text" encoding="UTF-8"/>
+
+<xsl:template match="helpdocument|body">
+ <xsl:choose>
+ <xsl:when test="meta/topic[@indexer='exclude']"/>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="title">
+ <xsl:value-of select="."/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="table">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="tablecell">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="tablerow">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="list">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="listitem">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="item">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="emph">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="paragraph">
+ <xsl:value-of select="."/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="section">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="bookmark">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="bookmark_value">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="link">
+ <xsl:apply-templates/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="ahelp[@visibility='visible']">
+ <xsl:value-of select="."/>
+ <xsl:text>&#xA;</xsl:text>
+</xsl:template>
+
+<xsl:template match="*"/>
+
+</xsl:stylesheet>
+
+
diff --git a/xmlhelp/util/main_transform.xsl b/xmlhelp/util/main_transform.xsl
new file mode 100644
index 000000000000..d9b6c3229696
--- /dev/null
+++ b/xmlhelp/util/main_transform.xsl
@@ -0,0 +1,972 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<!--***********************************************************************
+ This is the main transformation style sheet for transforming.
+ Only use with OOo 2.0
+ Owner: fpe@openoffice.org
+ =========================================================================
+ Changes Log
+ May 24 2004 Created
+ Aug 24 2004 Fixed for help2 CWS
+ Aug 27 2004 Added css link, fixed missing embed-mode for variable
+ Removed width/height for images
+ Sep 03 2004 Modularized xsl, added some embedded modes
+ Oct 08 2004 Fixed bug wrong mode "embedded" for links
+ Added embedded modes for embed and embedvar (for cascaded embeds)
+ Added <p> tags around falsely embedded pars and vars
+ Dec 08 2004 #i38483#, fixed wrong handling of web links
+ #i37377#, fixed missing usage of Database parameter for switching
+ Jan 04 2005 #i38905#, fixed buggy branding replacement template
+ Mar 17 2005 #i43972#, added language info to image URL, evaluate Language parameter
+ evaluate new localize attribute in images
+ May 10 2005 #i48785#, fixed wrong setting of distrib variable
+ Aug 16 2005 workaround for #i53365#
+ Aug 19 2005 fixed missing list processing in embedded sections
+ Aug 19 2005 #i53535#, fixed wrong handling of Database parameter
+ Oct 17 2006 #i70462#, disabled sorting to avoid output of error messages to console
+ Jun 15 2009 #i101799#, fixed wrong handling of http URLs with anchors
+***********************************************************************//-->
+
+<!--
+
+ 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
+ <http://www.openoffice.org/license.html>
+ for a copy of the LGPLv3 License.
+
+-->
+
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output indent="yes" method="html"/>
+
+<!--
+############################
+# Variables and Parameters #
+############################
+//-->
+
+<!-- General Usage -->
+<xsl:variable name="am" select="'&amp;'"/>
+<xsl:variable name="sl" select="'/'"/>
+<xsl:variable name="qt" select="'&quot;'"/>
+
+<!-- generic Icon alt text -->
+<xsl:variable name="alttext" select="'text/shared/00/icon_alt.xhp'"/>
+
+<!-- For calculating pixel sizes -->
+<xsl:variable name="dpi" select="'96'"/>
+<xsl:variable name="dpcm" select="'38'"/>
+
+<!-- Product brand variables used in the help files -->
+<xsl:variable name="brand1" select="'$[officename]'"/>
+<xsl:variable name="brand2" select="'$[officeversion]'"/>
+<xsl:variable name="brand3" select="'%PRODUCTNAME'"/>
+<xsl:variable name="brand4" select="'%PRODUCTVERSION'"/>
+
+<!-- meta data variables from the help file -->
+<xsl:variable name="filename" select="/helpdocument/meta/topic/filename"/>
+<xsl:variable name="topic_id" select="/helpdocument/meta/topic/@id"/>
+<xsl:variable name="topic_status" select="/helpdocument/meta/topic/@status"/>
+<xsl:variable name="title" select="/helpdocument/meta/topic/title"/>
+<xsl:variable name="doclang" select="/helpdocument/meta/topic/title/@xml-lang"/>
+
+<!-- Module and the corresponding switching values-->
+<xsl:param name="Database" select="'swriter'"/>
+<xsl:variable name="module" select="$Database"/>
+<xsl:variable name="appl">
+ <xsl:choose>
+ <xsl:when test="$module = 'swriter'"><xsl:value-of select="'WRITER'"/></xsl:when>
+ <xsl:when test="$module = 'scalc'"><xsl:value-of select="'CALC'"/></xsl:when>
+ <xsl:when test="$module = 'sdraw'"><xsl:value-of select="'DRAW'"/></xsl:when>
+ <xsl:when test="$module = 'simpress'"><xsl:value-of select="'IMPRESS'"/></xsl:when>
+ <xsl:when test="$module = 'schart'"><xsl:value-of select="'CHART'"/></xsl:when>
+ <xsl:when test="$module = 'sbasic'"><xsl:value-of select="'BASIC'"/></xsl:when>
+ <xsl:when test="$module = 'smath'"><xsl:value-of select="'MATH'"/></xsl:when>
+ </xsl:choose>
+</xsl:variable>
+
+ <!-- the other parameters given by the help caller -->
+<xsl:param name="System" select="'WIN'"/>
+<xsl:param name="productname" select="'Office'"/>
+<xsl:param name="productversion" select="''"/>
+<xsl:variable name="pversion">
+ <xsl:value-of select="translate($productversion,' ','')"/>
+</xsl:variable>
+<!-- this is were the images are -->
+<xsl:param name="imgrepos" select="''"/>
+<xsl:param name="Id" />
+<!-- (lame) distinction between OS and Commercial -->
+<xsl:param name="distrib">
+ <xsl:choose>
+ <xsl:when test="starts-with($productname,'OpenOffice')">
+ <xsl:value-of select="'OpenSource'"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'COMMERCIAL'"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:param>
+<xsl:param name="Language" select="'en-US'"/>
+<xsl:variable name="lang" select="$Language"/>
+
+<xsl:param name="ExtensionId" select="''"/>
+<xsl:param name="ExtensionPath" select="''"/>
+
+
+ <!-- parts of help and image urls -->
+<xsl:variable name="help_url_prefix" select="'vnd.sun.star.help://'"/>
+<xsl:variable name="img_url_prefix" select="concat('vnd.sun.star.zip://',$imgrepos,'/')"/>
+<xsl:variable name="urlpost" select="concat('?Language=',$lang,$am,'System=',$System,$am,'UseDB=no')"/>
+<xsl:variable name="urlpre" select="$help_url_prefix" />
+<xsl:variable name="linkprefix" select="$urlpre"/>
+<xsl:variable name="linkpostfix" select="$urlpost"/>
+
+<xsl:variable name="css" select="'default.css'"/>
+
+<!-- images for notes, tips and warnings -->
+<xsl:variable name="note_img" select="concat($img_url_prefix,'res/helpimg/note.png')"/>
+<xsl:variable name="tip_img" select="concat($img_url_prefix,'res/helpimg/tip.png')"/>
+<xsl:variable name="warning_img" select="concat($img_url_prefix,'res/helpimg/warning.png')"/>
+
+<!--
+#############
+# Templates #
+#############
+//-->
+
+<!-- Create the document skeleton -->
+<xsl:template match="/">
+ <xsl:variable name="csslink" select="concat($urlpre,'/',$urlpost)"/>
+ <html>
+ <head>
+ <title><xsl:value-of select="$title"/></title>
+ <link href="{$csslink}" rel="Stylesheet" type="text/css" /> <!-- stylesheet link -->
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
+ </head>
+ <body lang="{$lang}">
+ <xsl:apply-templates select="/helpdocument/body"/>
+ </body>
+ </html>
+</xsl:template>
+
+<!-- AHELP -->
+<xsl:template match="ahelp">
+ <xsl:if test="not(@visibility='hidden')"><span class="avis"><xsl:apply-templates /></span></xsl:if>
+</xsl:template>
+
+<!-- ALT -->
+<xsl:template match="alt"/>
+
+<!-- BOOKMARK -->
+<xsl:template match="bookmark">
+ <a name="{@id}"></a>
+ <xsl:choose>
+ <xsl:when test="starts-with(@branch,'hid')" />
+ <xsl:otherwise><xsl:apply-templates /></xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+<xsl:template match="bookmark" mode="embedded" />
+
+<!-- BOOKMARK_VALUE -->
+<xsl:template match="bookmark_value" />
+
+<!-- BR -->
+<xsl:template match="br"><br /></xsl:template>
+
+<!-- CAPTION -->
+<xsl:template match="caption" />
+
+<!-- CASE -->
+<xsl:template match="case"><xsl:call-template name="insertcase" /></xsl:template>
+<xsl:template match="case" mode="embedded">
+ <xsl:call-template name="insertcase">
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- CASEINLINE -->
+<xsl:template match="caseinline"><xsl:call-template name="insertcase" /></xsl:template>
+<xsl:template match="caseinline" mode="embedded">
+ <xsl:call-template name="insertcase">
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- COMMENT -->
+<xsl:template match="comment" />
+<xsl:template match="comment" mode="embedded"/>
+
+<!-- CREATED -->
+<xsl:template match="created" />
+
+<!-- DEFAULT -->
+<xsl:template match="default"><xsl:call-template name="insertdefault" /></xsl:template>
+<xsl:template match="default" mode="embedded">
+ <xsl:call-template name="insertdefault">
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- DEFAULTINLINE -->
+<xsl:template match="defaultinline"><xsl:call-template name="insertdefault" /></xsl:template>
+<xsl:template match="defaultinline" mode="embedded">
+ <xsl:call-template name="insertdefault">
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- EMBED -->
+<xsl:template match="embed"><xsl:call-template name="resolveembed"/></xsl:template>
+<xsl:template match="embed" mode="embedded"><xsl:call-template name="resolveembed"/></xsl:template>
+
+<!-- EMBEDVAR -->
+<xsl:template match="embedvar"><xsl:call-template name="resolveembedvar"/></xsl:template>
+<xsl:template match="embedvar" mode="embedded"><xsl:call-template name="resolveembedvar"/></xsl:template>
+
+<!-- EMPH -->
+<xsl:template match="emph">
+ <span class="emph"><xsl:apply-templates /></span>
+</xsl:template>
+<xsl:template match="emph" mode="embedded">
+ <span class="emph"><xsl:apply-templates /></span>
+</xsl:template>
+
+<!-- FILENAME -->
+<xsl:template match="filename" />
+
+<!-- HISTORY -->
+<xsl:template match="history" />
+
+<!-- IMAGE -->
+<xsl:template match="image"><xsl:call-template name="insertimage"/></xsl:template>
+<xsl:template match="image" mode="embedded"><xsl:call-template name="insertimage"/></xsl:template>
+
+<!-- ITEM -->
+<xsl:template match="item"><span class="{@type}"><xsl:apply-templates /></span></xsl:template>
+<xsl:template match="item" mode="embedded"><span class="{@type}"><xsl:apply-templates /></span></xsl:template>
+
+<!-- LASTEDITED -->
+<xsl:template match="lastedited" />
+
+<!-- LINK -->
+<xsl:template match="link">
+ <xsl:choose> <!-- don't insert the heading link to itself -->
+ <xsl:when test="(concat('/',@href) = /helpdocument/meta/topic/filename) or (@href = /helpdocument/meta/topic/filename)">
+ <xsl:apply-templates />
+ </xsl:when>
+ <xsl:when test="contains(child::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
+ <xsl:call-template name="insert_howtoget">
+ <xsl:with-param name="linkhref" select="@href"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="createlink" />
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+<xsl:template match="link" mode="embedded">
+ <xsl:call-template name="createlink"/>
+</xsl:template>
+
+<!-- LIST -->
+<xsl:template match="list">
+ <xsl:choose>
+ <xsl:when test="@type='ordered'">
+ <ol>
+ <xsl:if test="@startwith">
+ <xsl:attribute name="start"><xsl:value-of select="@startwith"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates />
+ </ol>
+ </xsl:when>
+ <xsl:otherwise>
+ <ul><xsl:apply-templates /></ul>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="list" mode="embedded">
+ <xsl:choose>
+ <xsl:when test="@type='ordered'">
+ <ol>
+ <xsl:if test="@startwith">
+ <xsl:attribute name="start"><xsl:value-of select="@startwith"/></xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates mode="embedded"/>
+ </ol>
+ </xsl:when>
+ <xsl:otherwise>
+ <ul><xsl:apply-templates mode="embedded"/></ul>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- LISTITEM -->
+<xsl:template match="listitem">
+ <li><xsl:apply-templates /></li>
+</xsl:template>
+
+<xsl:template match="listitem" mode="embedded">
+ <li><xsl:apply-templates mode="embedded"/></li>
+</xsl:template>
+
+<!-- META, SEE HEADER -->
+<xsl:template match="meta" />
+
+<!-- OBJECT (UNUSED) -->
+<xsl:template match="object" />
+
+<!-- PARAGRAPH -->
+<xsl:template match="paragraph">
+ <xsl:choose>
+
+ <xsl:when test="@role='heading'">
+ <xsl:call-template name="insertheading">
+ <xsl:with-param name="level" select="@level"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains(' note warning tip ',@role)">
+ <xsl:call-template name="insertnote">
+ <xsl:with-param name="type" select="@role" />
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
+ <xsl:apply-templates />
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:call-template name="insertpara" />
+ </xsl:otherwise>
+
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="paragraph" mode="embedded">
+ <xsl:choose>
+
+ <xsl:when test="@role='heading'"> <!-- increase the level of headings that are embedded -->
+ <!--
+ The internal sablotron processor does not seem to support the number function.
+ Therefore, we need a workaround for
+ <xsl:variable name="level"><xsl:value-of select="number(@level)+1"/></xsl:variable>
+ -->
+ <xsl:variable name="newlevel">
+ <xsl:choose>
+ <xsl:when test="@level='1'"><xsl:value-of select="'2'"/></xsl:when>
+ <xsl:when test="@level='2'"><xsl:value-of select="'2'"/></xsl:when>
+ <xsl:when test="@level='3'"><xsl:value-of select="'3'"/></xsl:when>
+ <xsl:when test="@level='4'"><xsl:value-of select="'4'"/></xsl:when>
+ <xsl:when test="@level='5'"><xsl:value-of select="'5'"/></xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:call-template name="insertheading">
+ <xsl:with-param name="level" select="$newlevel"/>
+ <xsl:with-param name="embedded" select="'yes'"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains(' note warning tip ',@role)">
+ <xsl:call-template name="insertnote">
+ <xsl:with-param name="type" select="@role" />
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
+ <xsl:apply-templates />
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:call-template name="insertpara" />
+ </xsl:otherwise>
+
+ </xsl:choose>
+</xsl:template>
+
+
+<!-- SECTION -->
+<xsl:template match="section">
+ <a name="{@id}"></a>
+
+ <xsl:choose>
+
+ <xsl:when test="@id='relatedtopics'">
+ <div class="relatedtopics">
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="'related'"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <p class="related">
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]"/>
+ </p>
+ <div class="relatedbody">
+ <xsl:apply-templates />
+ </div>
+ </div>
+ </xsl:when>
+
+ <xsl:when test="@id='howtoget'">
+ <xsl:call-template name="insert_howtoget" />
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+
+ </xsl:choose>
+
+</xsl:template>
+
+
+<!-- SECTION -->
+<xsl:template match="section" mode="embedded">
+ <a name="{@id}"></a>
+ <xsl:apply-templates mode="embedded"/>
+</xsl:template>
+
+<!-- SORT -->
+<xsl:template match="sort" >
+ <!-- sorting disabled due to #i70462#
+ <xsl:apply-templates><xsl:sort select="descendant::paragraph"/></xsl:apply-templates>
+ //-->
+ <xsl:apply-templates />
+</xsl:template>
+<xsl:template match="sort" mode="embedded">
+<!-- sorting disabled due to #i70462#
+ <xsl:apply-templates><xsl:sort select="descendant::paragraph"/></xsl:apply-templates>
+ //-->
+ <xsl:apply-templates />
+</xsl:template>
+
+<!-- SWITCH -->
+<xsl:template match="switch"><xsl:apply-templates /></xsl:template>
+<xsl:template match="switch" mode="embedded"><xsl:apply-templates /></xsl:template>
+
+<!-- SWITCHINLINE -->
+<xsl:template match="switchinline"><xsl:apply-templates /></xsl:template>
+<xsl:template match="switchinline" mode="embedded"><xsl:apply-templates mode="embedded"/></xsl:template>
+
+<!-- TABLE -->
+<xsl:template match="table"><xsl:call-template name="inserttable"/></xsl:template>
+<xsl:template match="table" mode="embedded"><xsl:call-template name="inserttable"/></xsl:template>
+
+<!-- TABLECELL -->
+<xsl:template match="tablecell"><td valign="top"><xsl:apply-templates /></td></xsl:template>
+<xsl:template match="tablecell" mode="icontable"><td valign="top"><xsl:apply-templates/></td></xsl:template>
+<xsl:template match="tablecell" mode="embedded"><td valign="top"><xsl:apply-templates mode="embedded"/></td></xsl:template>
+
+<!-- TABLEROW -->
+<xsl:template match="tablerow"><tr><xsl:apply-templates /></tr></xsl:template>
+<xsl:template match="tablerow" mode="icontable"><tr><xsl:apply-templates mode="icontable"/></tr></xsl:template>
+<xsl:template match="tablerow" mode="embedded"><tr><xsl:apply-templates mode="embedded"/></tr></xsl:template>
+
+<!-- TITLE -->
+<xsl:template match="title"/>
+
+<!-- TOPIC -->
+<xsl:template match="topic"/>
+
+<!-- VARIABLE -->
+<xsl:template match="variable"><a name="{@id}"></a><xsl:apply-templates /></xsl:template>
+<xsl:template match="variable" mode="embedded"><a name="{@id}"></a><xsl:apply-templates mode="embedded"/></xsl:template>
+
+<xsl:template match="text()">
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="text()" mode="embedded">
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<!-- In case of missing help files -->
+<xsl:template match="help-id-missing"><xsl:value-of select="$Id"/></xsl:template>
+
+<!--
+###################
+# NAMED TEMPLATES #
+###################
+//-->
+
+<!-- Branding -->
+<xsl:template name="brand" >
+ <xsl:param name="string"/>
+
+ <xsl:choose>
+
+ <xsl:when test="contains($string,$brand1)">
+ <xsl:variable name="newstr">
+ <xsl:value-of select="substring-before($string,$brand1)"/>
+ <xsl:value-of select="$productname"/>
+ <xsl:value-of select="substring-after($string,$brand1)"/>
+ </xsl:variable>
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains($string,$brand2)">
+ <xsl:variable name="newstr">
+ <xsl:value-of select="substring-before($string,$brand2)"/>
+ <xsl:value-of select="$pversion"/>
+ <xsl:value-of select="substring-after($string,$brand2)"/>
+ </xsl:variable>
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains($string,$brand3)">
+ <xsl:variable name="newstr">
+ <xsl:value-of select="substring-before($string,$brand3)"/>
+ <xsl:value-of select="$productname"/>
+ <xsl:value-of select="substring-after($string,$brand3)"/>
+ </xsl:variable>
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:when test="contains($string,$brand4)">
+ <xsl:variable name="newstr">
+ <xsl:value-of select="substring-before($string,$brand4)"/>
+ <xsl:value-of select="$pversion"/>
+ <xsl:value-of select="substring-after($string,$brand4)"/>
+ </xsl:variable>
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <xsl:value-of select="$string"/>
+ </xsl:otherwise>
+ </xsl:choose>
+
+</xsl:template>
+
+
+<!-- Insert Paragraph -->
+<xsl:template name="insertpara">
+ <xsl:variable name="role">
+ <xsl:choose>
+ <xsl:when test="ancestor::table">
+ <xsl:value-of select="concat(@role,'intable')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@role"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <p class="{$role}"><xsl:apply-templates /></p>
+</xsl:template>
+
+<!-- Insert "How to get Link" -->
+<xsl:template name="insert_howtoget">
+ <xsl:param name="linkhref" />
+ <xsl:variable name="archive" select="'shared'"/>
+ <xsl:variable name="tmp_href"><xsl:value-of select="concat($urlpre,'shared/text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable>
+ <xsl:variable name="tmp_doc" select="document($tmp_href)"/>
+ <table class="howtoget" width="100%" border="1" cellpadding="3" cellspacing="0">
+ <tr>
+ <td>
+ <p class="howtogetheader"><xsl:apply-templates select="$tmp_doc//variable[@id='wie']"/></p>
+ <div class="howtogetbody">
+ <xsl:choose>
+ <xsl:when test="$linkhref = ''"> <!-- new style -->
+ <xsl:apply-templates/>
+ </xsl:when>
+ <xsl:otherwise> <!-- old style -->
+ <xsl:variable name="archive1"><xsl:value-of select="concat(substring-before(substring-after($linkhref,'text/'),'/'),'/')"/></xsl:variable>
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive1,substring-before($linkhref,'#'),$urlpost)"/></xsl:variable>
+ <xsl:variable name="anc"><xsl:value-of select="substring-after($linkhref,'#')"/></xsl:variable>
+ <xsl:variable name="docum" select="document($href)"/>
+
+ <xsl:call-template name="insertembed">
+ <xsl:with-param name="doc" select="$docum" />
+ <xsl:with-param name="anchor" select="$anc" />
+ </xsl:call-template>
+
+ </xsl:otherwise>
+ </xsl:choose>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <br/>
+</xsl:template>
+
+<!-- Create a link -->
+<xsl:template name="createlink">
+<xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
+<xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
+ <xsl:choose>
+ <xsl:when test="starts-with(@href,'http://')"> <!-- web links -->
+ <a href="{@href}"><xsl:apply-templates /></a>
+ </xsl:when>
+ <xsl:when test="contains(@href,'#')">
+ <xsl:variable name="anchor"><xsl:value-of select="concat('#',substring-after(@href,'#'))"/></xsl:variable>
+ <xsl:variable name="href"><xsl:value-of select="concat($linkprefix,$archive,substring-before(@href,'#'),$linkpostfix,$dbpostfix,$anchor)"/></xsl:variable>
+ <a href="{$href}"><xsl:apply-templates /></a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:variable name="href"><xsl:value-of select="concat($linkprefix,$archive,@href,$linkpostfix,$dbpostfix)"/></xsl:variable>
+ <a href="{$href}"><xsl:apply-templates /></a>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- Insert Note, Warning, or Tip -->
+<xsl:template name="insertnote">
+ <xsl:param name="type" /> <!-- note, tip, or warning -->
+ <xsl:variable name="imgsrc">
+ <xsl:choose>
+ <xsl:when test="$type='note'"><xsl:value-of select="$note_img"/></xsl:when>
+ <xsl:when test="$type='tip'"><xsl:value-of select="$tip_img"/></xsl:when>
+ <xsl:when test="$type='warning'"><xsl:value-of select="$warning_img"/></xsl:when>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="'shared'"/></xsl:call-template></xsl:variable>
+ <xsl:variable name="alt">
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/',$alttext,$urlpost,$dbpostfix)"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="concat('alt_',$type)"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
+ </xsl:variable>
+ <div class="{$type}">
+ <table border="0" class="{$type}" cellspacing="0" cellpadding="5">
+ <tr>
+ <td><img src="{$imgsrc}" alt="{$alt}" title="{$alt}"/></td>
+ <td><xsl:apply-templates /></td>
+ </tr>
+ </table>
+ </div>
+ <br/>
+</xsl:template>
+
+<!-- Insert a heading -->
+<xsl:template name="insertheading">
+ <xsl:param name="level" />
+ <xsl:param name="embedded" />
+ <xsl:text disable-output-escaping="yes">&lt;h</xsl:text><xsl:value-of select="$level"/><xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text disable-output-escaping="yes">&lt;/h</xsl:text><xsl:value-of select="$level"/><xsl:text disable-output-escaping="yes">&gt;</xsl:text>
+</xsl:template>
+
+<!-- Evaluate a case or caseinline switch -->
+<xsl:template name="insertcase">
+ <xsl:param name="embedded" />
+ <xsl:choose>
+ <xsl:when test="parent::switch[@select='sys'] or parent::switchinline[@select='sys']">
+ <xsl:if test="@select = $System">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="parent::switch[@select='appl'] or parent::switchinline[@select='appl']">
+ <xsl:if test="@select = $appl">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="parent::switch[@select='distrib'] or parent::switchinline[@select='distrib']">
+ <xsl:if test="@select = $distrib">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<!-- Evaluate a default or defaultinline switch -->
+<xsl:template name="insertdefault">
+ <xsl:param name="embedded" />
+
+ <xsl:choose>
+ <xsl:when test="parent::switch[@select='sys'] or parent::switchinline[@select='sys']">
+ <xsl:if test="not(../child::case[@select=$System]) and not(../child::caseinline[@select=$System])">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="parent::switch[@select='appl'] or parent::switchinline[@select='appl']">
+ <xsl:if test="not(../child::case[@select=$appl]) and not(../child::caseinline[@select=$appl])">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="parent::switch[@select='distrib'] or parent::switchinline[@select='distrib']">
+ <xsl:if test="not(../child::case[@select=$distrib]) and not(../child::caseinline[@select=$distrib])">
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<!-- evaluate embeds -->
+<xsl:template name="insertembed">
+ <xsl:param name="doc" />
+ <xsl:param name="anchor" />
+ <!-- different embed targets (also falsely used embed instead embedvar) -->
+ <xsl:choose>
+ <xsl:when test="$doc//section[@id=$anchor]"> <!-- first test for a section of that name -->
+ <xsl:apply-templates select="$doc//section[@id=$anchor]" mode="embedded"/>
+ </xsl:when>
+ <xsl:when test="$doc//paragraph[@id=$anchor]"> <!-- then test for a para of that name -->
+ <p class="embedded">
+ <xsl:apply-templates select="$doc//paragraph[@id=$anchor]" mode="embedded"/>
+ </p>
+ </xsl:when>
+ <xsl:when test="$doc//variable[@id=$anchor]"> <!-- then test for a variable of that name -->
+ <p class="embedded">
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
+ </p>
+ </xsl:when>
+ <xsl:otherwise> <!-- then give up -->
+ <p class="bug">D'oh! You found a bug (<xsl:value-of select="@href"/> not found).</p>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<!-- Insert an image -->
+<xsl:template name="insertimage">
+
+ <xsl:variable name="fpath">
+ <xsl:call-template name="getfpath">
+ <xsl:with-param name="s"><xsl:value-of select="@src"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="fname">
+ <xsl:call-template name="getfname">
+ <xsl:with-param name="s"><xsl:value-of select="@src"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <xsl:variable name="src">
+ <xsl:choose>
+ <xsl:when test="not($ExtensionId='') and starts-with(@src,$ExtensionId)">
+ <xsl:value-of select="concat($ExtensionPath,'/',@src)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="(@localize='true') and not($lang='en-US')">
+ <xsl:value-of select="concat($img_url_prefix,$fpath,$lang,'/',$fname)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat($img_url_prefix,$fpath,$fname)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <!--<xsl:variable name="src"><xsl:value-of select="concat($img_url_prefix,@src)"/></xsl:variable>-->
+ <xsl:variable name="alt"><xsl:value-of select="./alt"/></xsl:variable>
+ <xsl:variable name="width" select="''"/> <!-- Images don't all have the correct size -->
+ <xsl:variable name="height" select="''"/><!-- Image don't all have the correct size -->
+ <img src="{$src}" alt="{$alt}" title="{$alt}">
+ <xsl:if test="not($width='')"><xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute></xsl:if>
+ <xsl:if test="not($height='')"><xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute></xsl:if>
+ </img>
+</xsl:template>
+
+<!-- Insert a Table -->
+<xsl:template name="inserttable">
+ <xsl:variable name="imgsrc"> <!-- see if we are in an image table -->
+ <xsl:value-of select="tablerow/tablecell[1]/paragraph[1]/image/@src"/>
+ </xsl:variable>
+
+ <xsl:choose>
+
+ <xsl:when test="count(descendant::tablecell)=1">
+ <table border="0" class="onecell" cellpadding="0" cellspacing="0">
+ <xsl:apply-templates />
+ </table>
+ </xsl:when>
+
+ <xsl:when test="descendant::tablecell[1]/descendant::image">
+ <table border="0" class="icontable" cellpadding="5" cellspacing="0">
+ <xsl:apply-templates mode="icontable"/>
+ </table>
+ </xsl:when>
+
+ <xsl:when test="@class='wide'">
+ <table border="1" class="{@class}" cellpadding="0" cellspacing="0" width="100%" >
+ <xsl:apply-templates />
+ </table>
+ </xsl:when>
+
+ <xsl:when test="not(@class='')">
+ <table border="1" class="{@class}" cellpadding="0" cellspacing="0" >
+ <xsl:apply-templates />
+ </table>
+ </xsl:when>
+
+ <xsl:otherwise>
+ <table border="1" class="border" cellpadding="0" cellspacing="0" >
+ <xsl:apply-templates />
+ </table>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <br/>
+</xsl:template>
+
+<xsl:template name="resolveembed">
+ <div class="embedded">
+ <xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
+ <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive,substring-before(@href,'#'),$urlpost,$dbpostfix)"/></xsl:variable>
+ <xsl:variable name="anc"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
+ <xsl:variable name="docum" select="document($href)"/>
+
+ <xsl:call-template name="insertembed">
+ <xsl:with-param name="doc" select="$docum" />
+ <xsl:with-param name="anchor" select="$anc" />
+ </xsl:call-template>
+
+ </div>
+</xsl:template>
+
+<xsl:template name="resolveembedvar">
+ <xsl:if test="not(@href='text/shared/00/00000004.xhp#wie')"> <!-- special treatment if howtoget links -->
+ <xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
+ <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
+ <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive,substring-before(@href,'#'),$urlpost,$dbpostfix)"/></xsl:variable>
+ <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
+ <xsl:variable name="doc" select="document($href)"/>
+ <xsl:choose>
+ <xsl:when test="$doc//variable[@id=$anchor]"> <!-- test for a variable of that name -->
+ <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise> <!-- or give up -->
+ <span class="bug">[<xsl:value-of select="@href"/> not found].</span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+</xsl:template>
+
+<!-- Apply -->
+<xsl:template name="apply">
+ <xsl:param name="embedded" />
+ <xsl:choose>
+ <xsl:when test="$embedded = 'yes'">
+ <xsl:apply-templates mode="embedded"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates />
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="getfpath">
+ <xsl:param name="s"/>
+ <xsl:param name="p"/>
+ <xsl:choose>
+ <xsl:when test="contains($s,'/')">
+ <xsl:call-template name="getfpath">
+ <xsl:with-param name="p"><xsl:value-of select="concat($p,substring-before($s,'/'),'/')"/></xsl:with-param>
+ <xsl:with-param name="s"><xsl:value-of select="substring-after($s,'/')"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$p"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="getfname">
+ <xsl:param name="s"/>
+ <xsl:choose>
+ <xsl:when test="contains($s,'/')">
+ <xsl:call-template name="getfname">
+ <xsl:with-param name="s"><xsl:value-of select="substring-after($s,'/')"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$s"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template name="createDBpostfix">
+ <xsl:param name="archive"/>
+ <xsl:variable name="newDB">
+ <xsl:choose>
+ <xsl:when test="(substring($archive,1,6) = 'shared')"><xsl:value-of select="$Database"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="substring-before($archive,'/')"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:value-of select="concat($am,'DbPAR=',$newDB)"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xmlhelp/util/makefile.mk b/xmlhelp/util/makefile.mk
index 10206670b5f8..66551f15bffc 100644
--- a/xmlhelp/util/makefile.mk
+++ b/xmlhelp/util/makefile.mk
@@ -74,5 +74,11 @@ DEF1NAME=$(SHL1TARGET)
# --- Targets ----------------------------------------------------------
+ZIP1TARGET=helpxsl
+ZIP1FLAGS= -u -r
+#ZIP1DIR=$(PRJ)$/source$/auxiliary
+ZIP1LIST=main_transform*.xsl idxcaption.xsl idxcontent.xsl
+
+
.INCLUDE: target.mk
diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
index f4843d54ace1..80238a075973 100644
--- a/xmloff/inc/xmloff/xmltoken.hxx
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -3110,6 +3110,9 @@ namespace xmloff { namespace token {
XML_DIAGONAL_BL_TR_WIDTHS,
XML_DIAGONAL_TL_BR_WIDTHS,
+ XML_OUTSIDE_MINIMUM,//#i114142#
+ XML_OUTSIDE_MAXIMUM,//#i114142#
+
XML_TOKEN_END
};
diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx
index 0616040148b5..79a59ab6910f 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -223,6 +223,8 @@ SvXMLEnumMapEntry aXMLChartAxisLabelPositionEnumMap[] =
{ ::xmloff::token::XML_NEAR_AXIS_OTHER_SIDE, ::com::sun::star::chart::ChartAxisLabelPosition_NEAR_AXIS_OTHER_SIDE },
{ ::xmloff::token::XML_OUTSIDE_START, ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_START },
{ ::xmloff::token::XML_OUTSIDE_END, ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END },
+ { ::xmloff::token::XML_OUTSIDE_MINIMUM, ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_START },//#i114142#
+ { ::xmloff::token::XML_OUTSIDE_MAXIMUM, ::com::sun::star::chart::ChartAxisLabelPosition_OUTSIDE_END },//#i114142#
{ ::xmloff::token::XML_TOKEN_INVALID, 0 }
};
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index c4abc4172959..e6f6fc6d9340 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1688,20 +1688,16 @@ void SchXMLExportHelper_Impl::exportTable()
{
mrExport.AddAttribute( XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_STRING );
SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True );
- // write the original range name as id into the local table
- // to allow a correct re-association when copying via clipboard
+ exportText( *aIt );
+ if( nC < nComplexCount )
+ lcl_exportComplexLabel( rComplexColumnDescriptions[nC++], mrExport );
if( !bHasOwnData && aColumnDescriptions_RangeIter != aColumnDescriptions_RangeEnd )
{
+ // remind the original range to allow a correct re-association when copying via clipboard
if ((*aColumnDescriptions_RangeIter).getLength())
- {
- mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT,
- *aColumnDescriptions_RangeIter);
- }
+ SchXMLTools::exportRangeToSomewhere( mrExport, *aColumnDescriptions_RangeIter );
++aColumnDescriptions_RangeIter;
}
- exportText( *aIt );
- if( nC < nComplexCount )
- lcl_exportComplexLabel( rComplexColumnDescriptions[nC++], mrExport );
}
OSL_ASSERT( bHasOwnData || aColumnDescriptions_RangeIter == aColumnDescriptions_RangeEnd );
} // closing row and header-rows elements
@@ -1725,17 +1721,15 @@ void SchXMLExportHelper_Impl::exportTable()
SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True );
if( aRowDescriptionsIter != aData.aRowDescriptions.end())
{
- // write the original range name as id into the local table
- // to allow a correct re-association when copying via clipboard
- if( !bHasOwnData && aRowDescriptions_RangeIter != aRowDescriptions_RangeEnd )
- {
- mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT,
- *aRowDescriptions_RangeIter++);
- }
exportText( *aRowDescriptionsIter );
++aRowDescriptionsIter;
if( nC < nComplexCount )
lcl_exportComplexLabel( rComplexRowDescriptions[nC++], mrExport );
+ if( !bHasOwnData && aRowDescriptions_RangeIter != aRowDescriptions_RangeEnd )
+ {
+ // remind the original range to allow a correct re-association when copying via clipboard
+ SchXMLTools::exportRangeToSomewhere( mrExport, *aRowDescriptions_RangeIter++ );
+ }
}
}
@@ -1748,19 +1742,15 @@ void SchXMLExportHelper_Impl::exportTable()
mrExport.AddAttribute( XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_FLOAT );
mrExport.AddAttribute( XML_NAMESPACE_OFFICE, XML_VALUE, msString );
SvXMLElementExport aCell( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True );
- // write the original range name as id into the local table to
- // allow a correct re-association when copying via clipboard
+ exportText( msString, false ); // do not convert tabs and lfs
if( ( !bHasOwnData && aDataRangeIter != aDataRangeEndIter ) &&
- ( mbRowSourceColumns || (aColIt == aRowIt->begin())) )
+ ( mbRowSourceColumns || (aColIt == aRowIt->begin()) ) )
{
+ // remind the original range to allow a correct re-association when copying via clipboard
if ((*aDataRangeIter).getLength())
- {
- mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT,
- *aDataRangeIter);
- }
+ SchXMLTools::exportRangeToSomewhere( mrExport, *aDataRangeIter );
++aDataRangeIter;
}
- exportText( msString, false ); // do not convert tabs and lfs
}
}
}
@@ -3063,6 +3053,10 @@ void SchXMLExportHelper_Impl::exportSeries(
{
// add style name attribute
AddAutoStyleAttribute( aPropertyStates );
+
+ const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() );
+ if( nCurrentVersion >= SvtSaveOptions::ODFVER_012 )
+ mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_DIMENSION, XML_Y );//#i114149#
SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_ERROR_INDICATOR, sal_True, sal_True );
}
else // autostyles
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index d82970858ebe..d3f0670f672d 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -34,6 +34,7 @@
#include "SchXMLImport.hxx"
#include "SchXMLTools.hxx"
#include "transporttypes.hxx"
+#include "XMLStringBufferImportContext.hxx"
#include <tools/debug.hxx>
#include <rtl/math.hxx>
#include "xmlnmspe.hxx"
@@ -687,6 +688,35 @@ SvXMLImportContext* SchXMLTableRowContext::CreateChildContext(
return pContext;
}
+//---------------------------------------------------------------------------------------------------
+//---------------------------------------------------------------------------------------------------
+
+class SchXMLRangeSomewhereContext : public SvXMLImportContext
+{
+//#i113950# previously the range was exported to attribute text:id,
+//but that attribute does not allow arbitrary strings anymore
+//so we need to find an alternative to save that range info for copy/paste scenario ...
+//-> use description at an empty group element for now
+
+private:
+ ::rtl::OUString& mrRangeString;
+ ::rtl::OUStringBuffer maRangeStringBuffer;
+
+public:
+ SchXMLRangeSomewhereContext( SvXMLImport& rImport,
+ const ::rtl::OUString& rLocalName,
+ ::rtl::OUString& rRangeString );
+ virtual ~SchXMLRangeSomewhereContext();
+
+ virtual SvXMLImportContext* CreateChildContext(
+ USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual void EndElement();
+};
+
+//---------------------------------------------------------------------------------------------------
+//---------------------------------------------------------------------------------------------------
// ========================================
// classes for cells and their content
@@ -778,11 +808,18 @@ SvXMLImportContext* SchXMLTableCellContext::CreateChildContext(
pContext = new SchXMLTextListContext( GetImport(), rLocalName, *rCell.pComplexString );
mbReadText = sal_False;//don't apply text from <text:p>
}
- // <text:p> element - read text and range-id
+ // <text:p> element - read text (and range from text:id old version)
else if( nPrefix == XML_NAMESPACE_TEXT && IsXMLToken( rLocalName, XML_P ) )
{
pContext = new SchXMLParagraphContext( GetImport(), rLocalName, maCellContent, &maRangeId );
}
+ // <draw:g> element - read range
+ else if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_G ) )
+ {
+ //#i113950# previously the range was exported to attribute text:id, but that attribute does not allow arbitrary strings anymore
+ //so we need to find an alternative to save that range info for copy/paste scenario ... -> use description at an empty group element for now
+ pContext = new SchXMLRangeSomewhereContext( GetImport(), rLocalName, maRangeId );
+ }
else
{
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
@@ -1148,3 +1185,34 @@ void SchXMLTableHelper::switchRangesFromOuterToInternalIfNecessary(
}
}
+//---------------------------------------------------------------------------------------------------
+
+SchXMLRangeSomewhereContext::SchXMLRangeSomewhereContext( SvXMLImport& rImport,
+ const OUString& rLocalName,
+ OUString& rRangeString ) :
+ SvXMLImportContext( rImport, XML_NAMESPACE_TEXT, rLocalName ),
+ mrRangeString( rRangeString )
+{
+}
+
+SchXMLRangeSomewhereContext::~SchXMLRangeSomewhereContext()
+{
+}
+
+SvXMLImportContext* SchXMLRangeSomewhereContext::CreateChildContext(
+ USHORT nPrefix,
+ const OUString& rLocalName,
+ const uno::Reference< xml::sax::XAttributeList >& )
+{
+ if( XML_NAMESPACE_SVG == nPrefix && IsXMLToken( rLocalName, XML_DESC ) )
+ {
+ return new XMLStringBufferImportContext(
+ GetImport(), nPrefix, rLocalName, maRangeStringBuffer );
+ }
+ return new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
+}
+
+void SchXMLRangeSomewhereContext::EndElement()
+{
+ mrRangeString = maRangeStringBuffer.makeStringAndClear();
+}
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index 582e5aead326..b2a90e534771 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -600,6 +600,29 @@ void exportText( SvXMLExport& rExport, const OUString& rText, bool bConvertTabsL
}
}
+void exportRangeToSomewhere( SvXMLExport& rExport, const ::rtl::OUString& rValue )
+{
+ //with issue #i366# and CWS chart20 ranges for error bars were introduced
+ //to keep them during copy paste from calc to impress for example it
+ //was necessary to introduce a mapping between the used ranges within calc and the data written to the local table
+ //this is why we write this ranges here
+
+ //#i113950# first the range was exported to attribute text:id, but that attribute does not allow arbitrary strings anymore within ODF 1.2
+ //as an alternative the range info is now saved into the description at an empty group element (not very nice, but ODF conform)
+
+ const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
+ if( nCurrentODFVersion == SvtSaveOptions::ODFVER_010 || nCurrentODFVersion == SvtSaveOptions::ODFVER_011 )
+ return;//svg:desc is not allowed at draw:g in ODF1.0; but as the ranges for error bars are anyhow not allowed within ODF1.0 nor ODF1.1 we do not need the information
+
+ SvXMLElementExport aEmptyShapeGroup( rExport, XML_NAMESPACE_DRAW,
+ ::xmloff::token::GetXMLToken( ::xmloff::token::XML_G ),
+ sal_True, sal_False );
+ SvXMLElementExport aDescription( rExport, XML_NAMESPACE_SVG,
+ ::xmloff::token::GetXMLToken( ::xmloff::token::XML_DESC ),
+ sal_True, sal_False );
+ rExport.GetDocHandler()->characters( rValue );
+}
+
Reference< chart2::XRegressionCurve > getRegressionCurve(
const Reference< chart2::XDataSeries > & xDataSeries )
{
diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx
index bcc39ae3d114..d8841bf3861b 100644
--- a/xmloff/source/chart/SchXMLTools.hxx
+++ b/xmloff/source/chart/SchXMLTools.hxx
@@ -105,6 +105,8 @@ namespace SchXMLTools
void exportText( SvXMLExport& rExport, const ::rtl::OUString& rText, bool bConvertTabsLFs );
+ void exportRangeToSomewhere( SvXMLExport& rExport, const ::rtl::OUString& rValue );
+
/** returns the properties of the equation of the first regression curve
that is no mean-value line
*/
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index a3d4a0c48d02..d65bafe583df 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -3082,8 +3082,8 @@ namespace xmloff { namespace token {
TOKEN( "axis-label-position", XML_AXIS_LABEL_POSITION ),
TOKEN( "near-axis", XML_NEAR_AXIS ),
TOKEN( "near-axis-other-side", XML_NEAR_AXIS_OTHER_SIDE ),
- TOKEN( "outside-minimum", XML_OUTSIDE_START ),
- TOKEN( "outside-maximum", XML_OUTSIDE_END ),
+ TOKEN( "outside-start", XML_OUTSIDE_START ),
+ TOKEN( "outside-end", XML_OUTSIDE_END ),
TOKEN( "tick-mark-position", XML_TICK_MARK_POSITION ),
TOKEN( "at-labels", XML_AT_LABELS ),
TOKEN( "at-axis", XML_AT_AXIS ),
@@ -3110,6 +3110,9 @@ namespace xmloff { namespace token {
TOKEN( "diagonal-bl-tr-widths", XML_DIAGONAL_BL_TR_WIDTHS ),
TOKEN( "diagonal-tl-br-widths", XML_DIAGONAL_TL_BR_WIDTHS ),
+ TOKEN( "outside-minimum", XML_OUTSIDE_MINIMUM ),
+ TOKEN( "outside-maximum", XML_OUTSIDE_MAXIMUM ),
+
#if OSL_DEBUG_LEVEL > 0
{ 0, NULL, NULL, XML_TOKEN_END }
#else