[Libreoffice-commits] .: framework/inc
framework/inc/properties.h | 14 -- 1 file changed, 14 deletions(-) New commits: commit 2343be9f1bda458835ed8e3c6bf11905ccbe9b13 Author: Tor Lillqvist Date: Wed Feb 29 09:45:28 2012 +0200 Bin obviously bogus (Thanks, Clang!) but fortunately unused function diff --git a/framework/inc/properties.h b/framework/inc/properties.h index c04984c..60cb74b 100644 --- a/framework/inc/properties.h +++ b/framework/inc/properties.h @@ -317,20 +317,6 @@ class PropHelper return bChanged; } - -//___ - -/** calculates the count of items inside the given ascii array. - * - * @param pArray must point to an array of items from type sal_Char - * - * @return The count of items inside this array, calculated by knowing the size of sal_Char. - */ - -static sal_Int32 calculatePropArrayCount( const sal_Char* pArray[] ) -{ -return (sal_Int32)(sizeof(pArray)/sizeof(sal_Char*)); -} }; } // namespace framework ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] calc/perf
calc/perf/pivot-cache-reload.ods |binary 1 file changed New commits: commit 85b51132a7af712a480aa0299ca227d6660cad1b Author: Kohei Yoshida Date: Tue Feb 28 23:44:11 2012 -0500 New document with large data for pivot table. To measure the performance of pivot cache load. diff --git a/calc/perf/pivot-cache-reload.ods b/calc/perf/pivot-cache-reload.ods new file mode 100644 index 000..9036125 Binary files /dev/null and b/calc/perf/pivot-cache-reload.ods differ ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - vcl/unx
vcl/unx/generic/plugadapt/salplug.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit e532d4932b8a265cc82bf06ef54db58c9b532e38 Author: Tomas Chvatal Date: Tue Feb 28 21:09:08 2012 +0100 Fix crash on exit using KDE interface This is slightly modified version of patch from Lubos Lunak . This fixes downstream bugs: https://bugs.gentoo.org/show_bug.cgi?id=394533 https://bugs.launchpad.net/bugs/925049 Signed-off-by: Bjoern Michaelsen diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx index 72d236f..f94d6e5 100644 --- a/vcl/unx/generic/plugadapt/salplug.cxx +++ b/vcl/unx/generic/plugadapt/salplug.cxx @@ -96,8 +96,10 @@ static SalInstance* tryInstance( const OUString& rModuleBase ) /* * #i109007# KDE3 seems to have the same problem; an atexit cleanup * handler, which cannot be resolved anymore if the plugin is already unloaded. +* Same applies for kde4. */ -else if( rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("kde")) ) +else if( rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("kde")) || + rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("kde4")) ) { pCloseModule = NULL; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/unx
vcl/unx/generic/plugadapt/salplug.cxx | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) New commits: commit 966981dd77b5e6c091b9e2615a8191353897a9b2 Author: Tomas Chvatal Date: Tue Feb 28 21:19:45 2012 +0100 Actually there is no need to have if and elseif with same action. diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx index eb9e90c..6bc7d89 100644 --- a/vcl/unx/generic/plugadapt/salplug.cxx +++ b/vcl/unx/generic/plugadapt/salplug.cxx @@ -90,19 +90,13 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals * not access the 'gnome_accessibility_module_shutdown' anymore. * So make sure libgtk+ & co are still mapped into memory when * atk-bridge's atexit handler gets called. + * #i109007# KDE3 seems to have the same problem. +* And same applies for KDE4. */ if( rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("gtk")) || - rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("gtk3")) ) -{ -pCloseModule = NULL; -} -/* - * #i109007# KDE3 seems to have the same problem; an atexit cleanup - * handler, which cannot be resolved anymore if the plugin is already unloaded. -* Same applies for kde4. - */ -else if( rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("kde")) || - rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("kde4")) ) + rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("gtk3")) || + rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("kde")) || + rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("kde4")) ) { pCloseModule = NULL; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/unx
vcl/unx/generic/plugadapt/salplug.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 24f4cd9983aa2bc9d642c40a8fef19d7fe7b98a6 Author: Tomas Chvatal Date: Tue Feb 28 21:09:08 2012 +0100 Fix crash on exit using KDE interface This is slightly modified version of patch from Lubos Lunak . This fixes downstream bugs: https://bugs.gentoo.org/show_bug.cgi?id=394533 https://bugs.launchpad.net/bugs/925049 diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx index 1d9a5ba..eb9e90c 100644 --- a/vcl/unx/generic/plugadapt/salplug.cxx +++ b/vcl/unx/generic/plugadapt/salplug.cxx @@ -99,8 +99,10 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals /* * #i109007# KDE3 seems to have the same problem; an atexit cleanup * handler, which cannot be resolved anymore if the plugin is already unloaded. +* Same applies for kde4. */ -else if( rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("kde")) ) +else if( rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("kde")) || + rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("kde4")) ) { pCloseModule = NULL; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5-1' - filter/source
filter/source/pdf/impdialog.src |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit f009ee83af38d33299133878f760cbb0e97a9566 Author: Andras Timar Date: Tue Feb 28 14:06:16 2012 +0100 fdo#45023 UI fix on PDF export dialog (cherry picked from commit e54773aa64af28795155aa55b3179141ca904f12) Signed-off-by: Eike Rathke Signed-off-by: Caolán McNamara Signed-off-by: Michael Meeks diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src index 006fa3a..dd8d50b 100644 --- a/filter/source/pdf/impdialog.src +++ b/filter/source/pdf/impdialog.src @@ -177,8 +177,9 @@ TabPage RID_PDF_TAB_GENER }; FixedText FT_ADDSTREAMDESCRIPTION { -Pos = MAP_APPFONT( 206 , 27 ) ; -Size = MAP_APPFONT( 140, 8 ) ; +Pos = MAP_APPFONT( 206 , 23 ) ; +Size = MAP_APPFONT( 140, 16 ) ; +Wordbreak = TRUE ; Text[ en-US ] = "Makes this PDF easily editable in %PRODUCTNAME" ; }; CheckBox CB_PDFA_1B_SELECT ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: connectivity/source dbaccess/source editeng/source filter/source svtools/source sw/source
connectivity/source/drivers/dbase/DTable.cxx|4 +- dbaccess/source/ui/inc/TableRow.hxx |4 +- editeng/source/items/bulitem.cxx|2 - editeng/source/items/frmitems.cxx |4 +- editeng/source/items/numitem.cxx|6 ++-- editeng/source/rtf/rtfgrf.cxx | 36 filter/source/graphicfilter/eos2met/eos2met.cxx | 20 ++--- filter/source/graphicfilter/ios2met/ios2met.cxx | 14 - filter/source/msfilter/escherex.cxx |8 ++--- svtools/source/filter/wmf/emfwr.cxx |8 - svtools/source/filter/wmf/wmfwr.cxx | 10 +++--- sw/source/core/bastyp/swrect.cxx|7 +++- sw/source/core/layout/laycache.cxx |7 ++-- sw/source/filter/ww8/wrtw8esh.cxx |6 ++-- sw/source/ui/config/uinums.cxx |8 +++-- 15 files changed, 77 insertions(+), 67 deletions(-) New commits: commit ac08d3f6967b241d6028d9cd17cce583ac72871e Author: Caolán McNamara Date: Tue Feb 28 16:58:25 2012 + we don't want any of these to be streamed out/in as 64bit values diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 82777ca..63f792e 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1223,7 +1223,7 @@ sal_Bool ODbaseTable::CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMe (*m_pFileStream) << (sal_uInt8) aDate.GetMonth(); (*m_pFileStream) << (sal_uInt8) aDate.GetDay(); -(*m_pFileStream) << 0L; // number of data records +(*m_pFileStream) << (sal_uInt32)0; // number of data records (*m_pFileStream) << (sal_uInt16)((m_pColumns->getCount()+1) * 32 + 1); // header information, // pColumns contains always an additional column (*m_pFileStream) << (sal_uInt16) 0; // record length will be determined later @@ -1425,7 +1425,7 @@ sal_Bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile) m_pMemoStream->SetStreamSize(512); m_pMemoStream->Seek(0L); -(*m_pMemoStream) << long(1); // pointer to the first free block +(*m_pMemoStream) << sal_uInt32(1); // pointer to the first free block m_pMemoStream->Flush(); delete m_pMemoStream; diff --git a/dbaccess/source/ui/inc/TableRow.hxx b/dbaccess/source/ui/inc/TableRow.hxx index 3d336bb..a17da65 100644 --- a/dbaccess/source/ui/inc/TableRow.hxx +++ b/dbaccess/source/ui/inc/TableRow.hxx @@ -42,7 +42,7 @@ namespace dbaui { private: OFieldDescription* m_pActFieldDescr; -longm_nPos; +sal_Int32 m_nPos; boolm_bReadOnly; boolm_bOwnsDescriptions; @@ -65,7 +65,7 @@ namespace dbaui @return the current position in the table */ -inline long GetPos() const { return m_nPos; } +inline sal_Int32 GetPos() const { return m_nPos; } inline void SetPos(sal_Int32 _nPos) { m_nPos = _nPos; } /** set the row readonly diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index ce6c789..8991311 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -360,7 +360,7 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) c if ( (nEnd-_nStart) > 0xFF00 ) rStrm.Seek( _nStart ); } -rStrm << nWidth; +rStrm << static_cast(nWidth); rStrm << nStart; rStrm << nJustify; rStrm << rtl::OUStringToOString(rtl::OUString(cSymbol), aFont.GetCharSet()).toChar(); diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 26c2736..849439d 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -686,8 +686,8 @@ SvStream& SvxLRSpaceItem::Store( SvStream& rStrm , sal_uInt16 nItemVersion ) con if( 0x80 & nAutoFirst ) { -rStrm << nLeftMargin; -rStrm << nRightMargin; +rStrm << static_cast(nLeftMargin); +rStrm << static_cast(nRightMargin); } } diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index ccb3455..7346805 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -259,9 +259,9 @@ SvStream& SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pC rStream << ( sal_uInt16 ) mePositionAndSpaceMode; rStream << ( sal_uInt16 ) meLabelFollowedBy; -rStream << ( long ) mnListtabPos; -rStream << ( long ) mnFirstLine
[Libreoffice-commits] .: sc/source
sc/source/core/data/dptablecache.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit dc505d3a5cdebe6271fcd6dae7b4d69e7c1af13e Author: Kohei Yoshida Date: Tue Feb 28 11:49:35 2012 -0500 bnc#520828: Correctly import fields with same name in excel's pivot tables. We just need to append '2' on the 2nd field with identical name, not '1'. This alone fixes the import problem. diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx index cc60e6f..69f1bfa 100644 --- a/sc/source/core/data/dptablecache.cxx +++ b/sc/source/core/data/dptablecache.cxx @@ -654,8 +654,7 @@ void ScDPCache::AddLabel(ScDPItemData *pData) if (maLabelNames[i].maString.equals(strNewName)) { strNewName = pData->maString; -strNewName += String::CreateFromInt32( nIndex ); -++nIndex; +strNewName += String::CreateFromInt32( ++nIndex ); bFound = true; } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source jvmfwk/plugins sw/source ucb/source
framework/source/fwi/helper/mischelper.cxx |4 ++-- jvmfwk/plugins/sunmajor/pluginlib/util.cxx |2 +- sw/source/ui/lingu/olmenu.cxx |2 +- ucb/source/ucp/file/bc.cxx |2 +- 4 files changed, 5 insertions(+), 5 deletions(-) New commits: commit a138709519b00b65cf5b530a319ed67ca657a1f4 Author: Takeshi Abe Date: Wed Feb 29 01:15:16 2012 +0900 Drop comparison with empty rtl::OUString diff --git a/framework/source/fwi/helper/mischelper.cxx b/framework/source/fwi/helper/mischelper.cxx index 8a50e94..3964826 100644 --- a/framework/source/fwi/helper/mischelper.cxx +++ b/framework/source/fwi/helper/mischelper.cxx @@ -162,7 +162,7 @@ void FillLangItems( std::set< OUString > &rLangItems, rLangItems.clear(); //1--add current language -if( rCurLang != OUString() && +if( !rCurLang.isEmpty() && LANGUAGE_DONTKNOW != rLanguageTable.GetType( rCurLang )) rLangItems.insert( rCurLang ); @@ -195,7 +195,7 @@ void FillLangItems( std::set< OUString > &rLangItems, } //5--keyboard language -if( rKeyboardLang != OUString()) +if( !rKeyboardLang.isEmpty() ) { if ( IsScriptTypeMatchingToLanguage( nScriptType, rLanguageTable.GetType( rKeyboardLang ))) rLangItems.insert( rKeyboardLang ); diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index a3176fa..132a867 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -1188,7 +1188,7 @@ void createJavaInfoDirScan(vector >& vecInfos) { OUString usDir2(usDir1 + arCollectDirs[j]); // prevent that we scan the whole /usr, /usr/lib, etc directories -if (arCollectDirs[j] != OUString()) +if (!arCollectDirs[j].isEmpty()) { //usr/java/xxx //Examin every subdirectory diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index db4bd4e..23e5535 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -225,7 +225,7 @@ void SwSpellPopup::fillLangPopupMenu( OUStringaKeyboardLang( aSeq[2] ); OUStringaGuessedTextLang( aSeq[3] ); -if (aCurLang != OUString() && +if (!aCurLang.isEmpty() && LANGUAGE_DONTKNOW != aLanguageTable.GetType( aCurLang )) aLangItems.insert( aCurLang ); diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index 38271ac..4c1c9f0 100644 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.cxx @@ -603,7 +603,7 @@ BaseContent::addProperty( lang::IllegalArgumentException, RuntimeException) { -if( ( m_nState & JustInserted ) || ( m_nState & Deleted ) || Name == rtl::OUString() ) +if( ( m_nState & JustInserted ) || ( m_nState & Deleted ) || Name.isEmpty() ) { throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 ); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] calc/xls-import
calc/xls-import/pivot-dup-data-fields.xls |binary 1 file changed New commits: commit a0eed22c90ff77df160223beec821d76fc623758 Author: Kohei Yoshida Date: Tue Feb 28 11:06:42 2012 -0500 Pivot table with fields with identical names. Excel appends number at the end, while Calc appends '*' to make each name unique. This causes import issue apparently. diff --git a/calc/xls-import/pivot-dup-data-fields.xls b/calc/xls-import/pivot-dup-data-fields.xls index 4f03461..6d88c00 100644 Binary files a/calc/xls-import/pivot-dup-data-fields.xls and b/calc/xls-import/pivot-dup-data-fields.xls differ ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - sw/source
sw/source/filter/ww8/ww8par3.cxx |8 sw/source/filter/ww8/ww8scan.cxx |4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) New commits: commit 51af20c8b4183fc796f5c9d4be25d3560a20ca3e Author: Caolán McNamara Date: Tue Feb 28 15:58:15 2012 + we don't want \'longs\' here diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index c3df152..5934524 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -360,9 +360,9 @@ struct WW8LFO // nur DIE Eintraege, die WIR benoetigen! struct WW8LVL // nur DIE Eintraege, die WIR benoetigen! { -longnStartAt; // start at value for this value -longnV6DxaSpace;// Ver6-Compatible: min Space between Num anf text::Paragraph -longnV6Indent; // Ver6-Compatible: Breite des Prefix Textes; ggfs. zur +sal_Int32 nStartAt; // start at value for this value +sal_Int32 nV6DxaSpace;// Ver6-Compatible: min Space between Num anf text::Paragraph +sal_Int32 nV6Indent; // Ver6-Compatible: Breite des Prefix Textes; ggfs. zur // Definition d. Erstzl.einzug nutzen! // Absatzattribute aus GrpprlPapx sal_uInt16 nDxaLeft; // linker Einzug @@ -385,7 +385,7 @@ struct WW8LVL // nur DIE Eintraege, die WIR benoetigen! struct WW8LFOLVL { -long nStartAt; // start-at value if bFormat==false and bStartAt == true +sal_Int32 nStartAt; // start-at value if bFormat==false and bStartAt == true // (if bFormat==true, the start-at is stored in the LVL) sal_uInt8 nLevel; // the level to be overridden // dieses Byte ist _absichtlich_ nicht in das folgende Byte hineingepackt !! commit a08fb657ec936f2785166d38e4f85682c4ba9aa1 Author: Caolán McNamara Date: Tue Feb 28 15:52:45 2012 + log some more useful information on invalid sprms diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index dfc04be..801e687 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -7388,7 +7388,9 @@ sal_uInt8* wwSprmParser::findSprmData(sal_uInt16 nId, sal_uInt8* pSprms, bool bValid = nSize <= nLen; -SAL_WARN_IF(!bValid, "sw.ww8", "sprm longer than remaining bytes, doc or parser is wrong"); +SAL_WARN_IF(!bValid, "sw.ww8", +"sprm 0x" << std::hex << nAktId << std::dec << " longer than remaining bytes, " << +nSize << " vs " << nLen << "doc or parser is wrong"); if (nAktId == nId && bValid) // Sprm found return pSprms + DistanceToData(nId); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: l10ntools/source
l10ntools/source/common.hxx | 32 +++- l10ntools/source/xmlparse.cxx |8 ++-- 2 files changed, 21 insertions(+), 19 deletions(-) New commits: commit 4aa17570a75097741f78b03ad9dff0688fbed513 Author: Stephan Bergmann Date: Tue Feb 28 16:28:55 2012 +0100 Make sure osl_openFile is called with an absolute URL diff --git a/l10ntools/source/common.hxx b/l10ntools/source/common.hxx index fb11844..0129c6a 100644 --- a/l10ntools/source/common.hxx +++ b/l10ntools/source/common.hxx @@ -47,12 +47,29 @@ namespace common { -inline rtl::OString pathnameToken(char const * pathname, char const * root) { +inline rtl::OUString pathnameToAbsoluteUrl(rtl::OUString const & pathname) { +rtl::OUString url; +if (osl::FileBase::getFileURLFromSystemPath(pathname, url) +!= osl::FileBase::E_None) +{ +std::cerr << "Error: Cannot convert input pathname to URL\n"; +std::exit(EXIT_FAILURE); +} rtl::OUString cwd; if (osl_getProcessWorkingDir(&cwd.pData) != osl_Process_E_None) { std::cerr << "Error: Cannot determine cwd\n"; std::exit(EXIT_FAILURE); } +if (osl::FileBase::getAbsoluteFileURL(cwd, url, url) +!= osl::FileBase::E_None) +{ +std::cerr << "Error: Cannot convert input URL to absolute URL\n"; +std::exit(EXIT_FAILURE); +} +return url; +} + +inline rtl::OString pathnameToken(char const * pathname, char const * root) { rtl::OUString full; if (!rtl_convertStringToUString( &full.pData, pathname, rtl_str_getLength(pathname), @@ -64,18 +81,7 @@ inline rtl::OString pathnameToken(char const * pathname, char const * root) { std::cerr << "Error: Cannot convert input pathname to UTF-16\n"; std::exit(EXIT_FAILURE); } -if (osl::FileBase::getFileURLFromSystemPath(full, full) -!= osl::FileBase::E_None) -{ -std::cerr << "Error: Cannot convert input pathname to URL\n"; -std::exit(EXIT_FAILURE); -} -if (osl::FileBase::getAbsoluteFileURL(cwd, full, full) -!= osl::FileBase::E_None) -{ -std::cerr << "Error: Cannot convert input URL to absolute URL\n"; -std::exit(EXIT_FAILURE); -} +full = pathnameToAbsoluteUrl(full); if (root == 0) { std::cerr << "Error: No project root argument\n"; std::exit(EXIT_FAILURE); diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx index 24dedf0..e646308 100644 --- a/l10ntools/source/xmlparse.cxx +++ b/l10ntools/source/xmlparse.cxx @@ -33,6 +33,7 @@ #include #include +#include "common.hxx" #include "xmlparse.hxx" #include #include @@ -1123,12 +1124,7 @@ XMLFile *SimpleXMLParser::Execute( const rtl::OUString &rFileName, XMLFile* pXML RTL_CONSTASCII_USTRINGPARAM("ERROR: Unable to open file ")); aErrorInformation.sMessage += rFileName; -rtl::OUString aFileURL; -if (osl::File::getFileURLFromSystemPath(rFileName, aFileURL) -!= osl::File::E_None) -{ -return 0; -} +rtl::OUString aFileURL(common::pathnameToAbsoluteUrl(rFileName)); oslFileHandle h; if (osl_openFile(aFileURL.pData, &h, osl_File_OpenFlag_Read) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 2 commits - i18npool/Library_localedata_others.mk i18npool/source svl/source
i18npool/Library_localedata_others.mk |1 i18npool/source/localedata/data/pjt_AU.xml | 230 + i18npool/source/localedata/localedata.cxx |3 svl/source/numbers/zforlist.cxx|6 4 files changed, 236 insertions(+), 4 deletions(-) New commits: commit ef37bb6a02674cf676cadcd69445b4deadad9be6 Author: Eike Rathke Date: Tue Feb 28 16:07:33 2012 +0100 fixed crashes due to transition from Table to std::map Old code used Table Seek/Next followed by GetCurKey() that returned -1 (or some such? anyway) if after the last element, comparing with another key. Replacement code did not check for valid iterators. Crash happened when changing the locale within the number formatter and obtaining the default currency format. May also have happened when changing the default locale and documents using a number formatter were open. diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index ca3ca49..c454843 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -367,7 +367,7 @@ void SvNumberFormatter::ImpChangeSysCL( LanguageType eLnge, bool bLoadingSO5 ) { // delete additional standard formats sal_uInt32 nKey; SvNumberFormatTable::iterator it = aFTable.find( SV_MAX_ANZ_STANDARD_FORMATE + 1 ); -while ( (nKey = it->first) > SV_MAX_ANZ_STANDARD_FORMATE && +while ( it != aFTable.end() && (nKey = it->first) > SV_MAX_ANZ_STANDARD_FORMATE && nKey < SV_COUNTRY_LANGUAGE_OFFSET ) { delete it->second; @@ -1293,7 +1293,7 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultFormat( short nType ) sal_uInt32 nStopKey = CLOffset + SV_COUNTRY_LANGUAGE_OFFSET; sal_uInt32 nKey; SvNumberFormatTable::iterator it2 = aFTable.find( CLOffset ); -while ( (nKey = it2->first ) >= CLOffset && nKey < nStopKey ) +while ( it2 != aFTable.end() && (nKey = it2->first ) >= CLOffset && nKey < nStopKey ) { const SvNumberformat* pEntry = it2->second; if ( pEntry->IsStandard() && ((pEntry->GetType() & @@ -3263,7 +3263,7 @@ sal_uInt32 SvNumberFormatter::ImpGetDefaultCurrencyFormat() sal_uInt32 nStopKey = CLOffset + SV_COUNTRY_LANGUAGE_OFFSET; sal_uInt32 nKey; SvNumberFormatTable::iterator it2 = aFTable.lower_bound( CLOffset ); -while ( (nKey = it2->first) >= CLOffset && nKey < nStopKey ) +while ( it2 != aFTable.end() && (nKey = it2->first) >= CLOffset && nKey < nStopKey ) { const SvNumberformat* pEntry = it2->second; if ( pEntry->IsStandard() && (pEntry->GetType() & NUMBERFORMAT_CURRENCY) ) commit 20c25d497a0d35a68a7dea9a0d7bc5b667a40ad4 Author: Eike Rathke Date: Tue Feb 28 15:12:31 2012 +0100 fdo#46411 added [pjt-AU] Pitjantjatjara locale data diff --git a/i18npool/Library_localedata_others.mk b/i18npool/Library_localedata_others.mk index 6ab62a5..a8ec4b3 100644 --- a/i18npool/Library_localedata_others.mk +++ b/i18npool/Library_localedata_others.mk @@ -90,6 +90,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,localedata_others,\ CustomTarget/i18npool/source/localedata/localedata_or_IN \ CustomTarget/i18npool/source/localedata/localedata_pa_IN \ CustomTarget/i18npool/source/localedata/localedata_plt_MG \ + CustomTarget/i18npool/source/localedata/localedata_pjt_AU \ CustomTarget/i18npool/source/localedata/localedata_pt_AO \ CustomTarget/i18npool/source/localedata/localedata_rw_RW \ CustomTarget/i18npool/source/localedata/localedata_sg_CF \ diff --git a/i18npool/source/localedata/data/pjt_AU.xml b/i18npool/source/localedata/data/pjt_AU.xml new file mode 100644 index 000..948de86 --- /dev/null +++ b/i18npool/source/localedata/data/pjt_AU.xml @@ -0,0 +1,230 @@ + + + + + + pjt + Pitjantjatjara + + + AU + Australia + + + + + / + , + . + : + . + ; + , + , + + + + + â + â + â + â + +AM +PM +metric + + + + General + + + 0 + + + 0.00 + + + #,##0 + + + #,##0.00 + + + #,###.00 + + + 0.00E+00 + + + 0.00E+000 + + + 0% + + + 0.00% + + + [CURRENCY]#,##0;-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;-[CURRENCY]#,##0.00 + + + [CURRENCY]#,##0;[RED]-[CURRENCY]#,##0 + + + [CURRENCY]#,##0.00;[RED]-[CURRENCY]#,##0.00 + + + #,##0.00 CCC + + + [CURRENCY]#,##0.--;[RED]-[CURRENCY]#,##0.-- + + + D/MM/YY + + + DD, + + + DD/MM/YY + + + DD/MM/ + + + D, MMM YY + + + D, MMM +
[Libreoffice-commits] .: Branch 'libreoffice-3-5-1' - configmgr/source
configmgr/source/partial.cxx | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) New commits: commit 8eb49978a2454c154e94588c9e0e53bcb110253d Author: Stephan Bergmann Date: Fri Feb 24 17:19:32 2012 +0100 Resolves fdo#46074: Fix Partial::contains for paths that go past a leaf node Paths that already "failed" at the root node were not reported as CONTAINS_NOT, so that they were erroneously migrated, but with broken content (values of set member properties were nil). Signed-off-by: Caolán McNamara Signed-off-by: Michael Meeks Signed-off-by: Bjoern Michaelsen diff --git a/configmgr/source/partial.cxx b/configmgr/source/partial.cxx index 7922e2c..088de36 100644 --- a/configmgr/source/partial.cxx +++ b/configmgr/source/partial.cxx @@ -76,6 +76,12 @@ Partial::Partial( std::set< rtl::OUString > const & includedPaths, std::set< rtl::OUString > const & excludedPaths) { +// The Partial::Node tree built up here encodes the following information: +// * Inner node, startInclude: an include starts here that contains excluded +// sub-trees +// * Inner node, !startInclude: contains in-/excluded sub-trees +// * Leaf node, startInclude: an include starts here +// * Leaf node, !startInclude: an exclude starts here for (std::set< rtl::OUString >::const_iterator i(includedPaths.begin()); i != includedPaths.end(); ++i) { @@ -119,12 +125,19 @@ Partial::~Partial() {} Partial::Containment Partial::contains(Path const & path) const { //TODO: For set elements, the segment names recorded in the node tree need // not match the corresponding path segments, so this function can fail. + +// * If path ends at a leaf node or goes past a leaf node: +// ** If that leaf node is startInclude: => CONTAINS_NODE +// ** If that leaf node is !startInclude: => CONTAINS_NOT +// * If path ends at inner node: +// ** If there is some startInclude along its trace: => CONTAINS_NODE +// ** If there is no startInclude along its trace: => CONTAINS_SUBNODES Node const * p = &root_; bool includes = false; for (Path::const_iterator i(path.begin()); i != path.end(); ++i) { Node::Children::const_iterator j(p->children.find(*i)); if (j == p->children.end()) { -break; +return p->startInclude ? CONTAINS_NODE : CONTAINS_NOT; } p = &j->second; includes |= p->startInclude; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: solenv/bin tail_build/README
solenv/bin/build.pl |6 +- tail_build/README |4 2 files changed, 9 insertions(+), 1 deletion(-) New commits: commit 10512ce508e4000e7438738c789421fd0bce2772 Author: Michael Meeks Date: Tue Feb 28 14:54:28 2012 + build.pl: add a warning about the cost of: make tail_build.clean diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index 31e0f73..9d9bcd7 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -1514,7 +1514,11 @@ sub cancel_build { print STDERR "---\n"; print STDERR "To rebuild a specific module:\n"; print STDERR "\n"; -print STDERR "$ENV{GNUMAKE} $module.clean #optional\n"; +if ($module eq 'tail_build') { + print STDERR "$ENV{GNUMAKE} $module.clean # not recommended, this will re-build almost everything\n"; +} else { + print STDERR "$ENV{GNUMAKE} $module.clean # optional\n"; +} print STDERR "$ENV{GNUMAKE} $module\n"; print STDERR "\n"; print STDERR "when the problem is isolated and fixed, re-run '$ENV{GNUMAKE}'\n"; diff --git a/tail_build/README b/tail_build/README index 4e29fb1..88ff437 100644 --- a/tail_build/README +++ b/tail_build/README @@ -15,3 +15,7 @@ To migrate a module under tail_build, one should: * remove the module from postprocess/prj/build.lst dependencies * remove the module from tail_build/prj/build.lst dependencies * add the module name in Module_tail_build.mk at the root of bootstrap + +This module of course, takes a lot of thought, and dependency work / +statting until it has finished it's business, knows exactly what to +re-build, and can start building just that. ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: connectivity/source
connectivity/source/inc/file/fanalyzer.hxx|4 ++-- connectivity/source/inc/file/fcode.hxx| 26 -- connectivity/source/inc/file/quotedstring.hxx |4 ++-- 3 files changed, 16 insertions(+), 18 deletions(-) New commits: commit db8715c5babb1b2a7defc31298ed07e64618d9ed Author: Philipp Weissenbacher Date: Tue Feb 28 14:56:22 2012 +0100 Translate German comments and fix some whitespace diff --git a/connectivity/source/inc/file/fanalyzer.hxx b/connectivity/source/inc/file/fanalyzer.hxx index 03045f7..5faf61a 100644 --- a/connectivity/source/inc/file/fanalyzer.hxx +++ b/connectivity/source/inc/file/fanalyzer.hxx @@ -65,8 +65,8 @@ namespace connectivity { } OConnection* getConnection() const { return m_pConnection; } -void describeParam(::rtl::Reference rParameterColumns); // genauere Beschreibung der Parameter -::std::vector* bindEvaluationRow(OValueRefRow& _pRow); // Anbinden einer Ergebniszeile an die Restrictions +void describeParam(::rtl::Reference rParameterColumns); // More detailed description of parameters +::std::vector* bindEvaluationRow(OValueRefRow& _pRow); // Bind an evaluation row to the restriction /** bind the select columns if they contain a function which needs a row value @param _pRow the result row */ diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx index c74e633..8c8ed18 100644 --- a/connectivity/source/inc/file/fcode.hxx +++ b/connectivity/source/inc/file/fcode.hxx @@ -106,12 +106,12 @@ namespace connectivity sal_uInt16 getRowPos() const {return m_nRowPos;} virtual const ORowSetValue& getValue() const; virtual void setValue(const ORowSetValue& _rVal); -void bindValue(const OValueRefRow& _pRow); // Bindung an den Wert, den der Operand repraesentiert +void bindValue(const OValueRefRow& _pRow); // Bind to the value that the operand represents TYPEINFO(); }; -// Attribute aus einer Ergebniszeile +// Attributes from a result row class OOO_DLLPUBLIC_FILE OOperandAttr : public OOperandRow { protected: @@ -126,7 +126,7 @@ namespace connectivity TYPEINFO(); }; -// Parameter fuer ein Praedikat +// Parameter for a predicate class OOperandParam : public OOperandRow { public: @@ -136,7 +136,7 @@ namespace connectivity TYPEINFO(); }; -// WerteOperanden +// Value operands class OOperandValue : public OOperand { protected: @@ -158,7 +158,7 @@ namespace connectivity }; -// Konstanten +// Constants class OOperandConst : public OOperandValue { public: @@ -168,7 +168,7 @@ namespace connectivity }; -// Ergebnis Operanden +// Result operands class OOperandResult : public OOperandValue { protected: @@ -213,19 +213,18 @@ namespace connectivity TYPEINFO(); }; -// Operatoren +// Operators class OOO_DLLPUBLIC_FILE OOperator : public OCode { public: virtual void Exec(OCodeStack&) = 0; -virtual sal_uInt16 getRequestedOperands() const;// Anzahl benoetigter Operanden -// Standard ist 2 +virtual sal_uInt16 getRequestedOperands() const;// Count of requested operands +// Defaults to 2 TYPEINFO(); }; -// boolsche Operatoren - +// Boolean operators class OOO_DLLPUBLIC_FILE OBoolOperator : public OOperator { public: @@ -315,8 +314,7 @@ namespace connectivity virtual sal_Bool operate(const OOperand*, const OOperand*) const; }; -// numerische Operatoren - +// Numerical operators class ONumOperator : public OOperator { public: @@ -357,7 +355,7 @@ namespace connectivity return getValue().getDouble() != double(0.0); } -// operator +// Operator class ONthOperator : public OOperator { public: diff --git a/connectivity/source/inc/file/quotedstring.hxx b/connectivity/source/inc/file/quotedstring.hxx index cd4ace0..67e7fda 100644 --- a/connectivity/source/inc/file/quotedstring.hxx +++ b/connectivity/source/inc/file/quotedstring.hxx @@ -35,8 +35,8 @@ namespace connectivity { //== -// Ableitung von String mit ueberladenen GetToken/GetTokenCount-Methoden -// Speziell fuer FLAT FILE-Fo
[Libreoffice-commits] .: Branch 'feature/android' - sfx2/source
sfx2/source/appl/appbas.cxx |4 1 file changed, 4 insertions(+) New commits: commit 202735c33de9342b9477eb13c8523531d20901b3 Author: Tor Lillqvist Date: Mon Feb 27 23:43:18 2012 +0200 Deduplication of aSfxInt16Item_Impl only for iOS diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx index 9943157..12ef3f0 100644 --- a/sfx2/source/appl/appbas.cxx +++ b/sfx2/source/appl/appbas.cxx @@ -88,7 +88,9 @@ #if defined(LIBO_MERGELIBS) || defined(IOS) /* Avoid clash with the ones from svx/source/form/typemap.cxx */ #define aSfxBoolItem_Impl sfx2_source_appl_appbas_aSfxBoolItem_Impl +#ifdef IOS #define aSfxInt16Item_Impl sfx2_source_appl_appbas_aSfxInt16Item_Impl +#endif #define aSfxStringItem_Impl sfx2_source_appl_appbas_aSfxStringItem_Impl #define aSfxUInt16Item_Impl sfx2_source_appl_appbas_aSfxUInt16Item_Impl #define aSfxUInt32Item_Impl sfx2_source_appl_appbas_aSfxUInt32Item_Impl @@ -101,7 +103,9 @@ #if defined(LIBO_MERGELIBS) || defined(IOS) #undef aSfxBoolItem_Impl +#ifdef IOS #undef aSfxInt16Item_Impl +#endif #undef aSfxStringItem_Impl #undef aSfxUInt16Item_Impl #undef aSfxUInt32Item_Impl ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - writerfilter/source
writerfilter/source/dmapper/DomainMapper_Impl.cxx |7 ++- writerfilter/source/dmapper/PropertyIds.cxx |1 + writerfilter/source/dmapper/PropertyIds.hxx |1 + 3 files changed, 8 insertions(+), 1 deletion(-) New commits: commit c8d9f6461c9dcb6280635ffa46686a45f507486f Author: Miklos Vajna Date: Mon Feb 20 15:46:08 2012 +0100 n#695479 fix rtf/docx import of transparent frames Previously all frames were opaque by default, which is the Writer but not the docx/rtf default. Change the default, while keeping the possibility to set an opaque color background for the frame. (cherry picked from commits 4ac48167662c592c21025b89fe8f6925c680c6e0 and c306532e0bed1df36abf5d7ad6f0363056e69739) Signed-off-by: Michael Meeks diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index d36fda0..bc38966 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -702,7 +702,7 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( ) StyleSheetEntryPtr pParaStyle = GetStyleSheetTable()->FindStyleSheetByConvertedStyleName(rAppendContext.pLastParagraphProperties->GetParaStyleName()); -uno::Sequence< beans::PropertyValue > aFrameProperties(pParaStyle ? 15: 9); +uno::Sequence< beans::PropertyValue > aFrameProperties(pParaStyle ? 16: 9); if ( pParaStyle.get( ) ) { @@ -722,6 +722,7 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( ) pFrameProperties[12].Name = rPropNameSupplier.GetName(PROP_RIGHT_MARGIN); pFrameProperties[13].Name = rPropNameSupplier.GetName(PROP_TOP_MARGIN); pFrameProperties[14].Name = rPropNameSupplier.GetName(PROP_BOTTOM_MARGIN); +pFrameProperties[15].Name = rPropNameSupplier.GetName(PROP_BACK_COLOR_TRANSPARENCY); const ParagraphProperties* pStyleProperties = dynamic_cast( pParaStyle->pProperties.get() ); sal_Int32 nWidth = @@ -794,6 +795,10 @@ void DomainMapper_Impl::CheckUnregisteredFrameConversion( ) pStyleProperties->GetvSpace() >= 0 ? pStyleProperties->GetvSpace() : 0; pFrameProperties[13].Value <<= nHoriOrient == text::HoriOrientation::LEFT ? 0 : nLeftDist; pFrameProperties[14].Value <<= nHoriOrient == text::HoriOrientation::RIGHT ? 0 : nRightDist; +// If there is no fill, the Word default is 100% transparency. +// Otherwise CellColorHandler has priority, and this setting +// will be ignored. +pFrameProperties[15].Value <<= sal_Int32(100); lcl_MoveBorderPropertiesToFrame(aFrameProperties, rAppendContext.pLastParagraphProperties->GetStartingRange(), diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx index 173be40..c8f8a55 100644 --- a/writerfilter/source/dmapper/PropertyIds.cxx +++ b/writerfilter/source/dmapper/PropertyIds.cxx @@ -196,6 +196,7 @@ const rtl::OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const case PROP_CONTOUR_POLY_POLYGON :sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ContourPolyPolygon")); break; case PROP_PAGE_TOGGLE :sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PageToggle")); break; case PROP_BACK_COLOR :sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BackColor")); break; +case PROP_BACK_COLOR_TRANSPARENCY: sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BackColorTransparency")); break; case PROP_ALTERNATIVE_TEXT :sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AlternativeText")); break; case PROP_HEADER_TEXT_LEFT :sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HeaderTextLeft")); break; case PROP_HEADER_TEXT :sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HeaderText")); break; diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx index dd20f06..b109cd6 100644 --- a/writerfilter/source/dmapper/PropertyIds.hxx +++ b/writerfilter/source/dmapper/PropertyIds.hxx @@ -51,6 +51,7 @@ enum PropertyIds ,PROP_ANCHOR_TYPE ,PROP_AUTOMATIC_DISTANCE ,PROP_BACK_COLOR +,PROP_BACK_COLOR_TRANSPARENCY ,PROP_BITMAP ,PROP_BOTTOM_BORDER ,PROP_BOTTOM_BORDER_DISTANCE ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: l10ntools/source
l10ntools/source/helpmerge.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit f24011374972992e1d5b5eca48597d00f3df3700 Author: Stephan Bergmann Date: Tue Feb 28 15:26:37 2012 +0100 Better error message diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx index a682bfb..6dab36a 100644 --- a/l10ntools/source/helpmerge.cxx +++ b/l10ntools/source/helpmerge.cxx @@ -97,7 +97,12 @@ bool HelpParser::CreateSDF( if(file.get() == NULL) { -printf("%s\n", rtl::OUStringToOString(aParser.GetError().sMessage, RTL_TEXTENCODING_ASCII_US).getStr()); +printf( +"%s: %s\n", +sHelpFile.getStr(), +(rtl::OUStringToOString( +aParser.GetError().sMessage, RTL_TEXTENCODING_ASCII_US). + getStr())); exit(-1); } file->Extract(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: vcl/generic
vcl/generic/print/glyphset.cxx | 76 +++-- vcl/generic/print/glyphset.hxx |3 + 2 files changed, 15 insertions(+), 64 deletions(-) New commits: commit 15cf249967a56e1d6b28b659c00e201161f2e98f Author: Christina Rossmanith Date: Tue Feb 28 11:04:12 2012 +0100 Reduced duplicate code (simian) / vcl/generic/print/glyphset.cxx diff --git a/vcl/generic/print/glyphset.cxx b/vcl/generic/print/glyphset.cxx index 5b03666..6d4cfde 100644 --- a/vcl/generic/print/glyphset.cxx +++ b/vcl/generic/print/glyphset.cxx @@ -479,7 +479,8 @@ void GlyphSet::DrawGlyphs( const sal_uInt32* pGlyphIds, const sal_Unicode* pUnicodes, sal_Int16 nLen, - const sal_Int32* pDeltaArray ) + const sal_Int32* pDeltaArray, + const sal_Bool bUseGlyphs) { sal_uChar *pGlyphID= (sal_uChar*)alloca (nLen * sizeof(sal_uChar)); sal_Int32 *pGlyphSetID = (sal_Int32*)alloca (nLen * sizeof(sal_Int32)); @@ -488,7 +489,10 @@ void GlyphSet::DrawGlyphs( // convert unicode to font glyph id and font subset for (int nChar = 0; nChar < nLen; nChar++) { -GetGlyphID (pGlyphIds[nChar], pUnicodes[nChar], pGlyphID + nChar, pGlyphSetID + nChar); +if (bUseGlyphs) +GetGlyphID (pGlyphIds[nChar], pUnicodes[nChar], pGlyphID + nChar, pGlyphSetID + nChar); +else +GetCharID (pUnicodes[nChar], pGlyphID + nChar, pGlyphSetID + nChar); aGlyphSet.insert (pGlyphSetID[nChar]); } @@ -536,7 +540,12 @@ void GlyphSet::DrawGlyphs( // show the text using the PrinterGfx text api aPoint.Move (nOffset, 0); -OString aGlyphSetName(GetGlyphSetName(*aSet)); +OString aGlyphSetName; +if (bUseGlyphs) +aGlyphSetName = GetGlyphSetName(*aSet); +else +aGlyphSetName = GetCharSetName(*aSet); + rGfx.PSSetFont (aGlyphSetName, GetGlyphSetEncoding(*aSet)); rGfx.PSMoveTo (aPoint); rGfx.PSShowText (pGlyphSubset, nGlyphs, nGlyphs, nGlyphs > 1 ? pDeltaSubset : NULL); @@ -614,66 +623,7 @@ GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint, return; } -sal_uChar *pGlyphID= (sal_uChar*)alloca (nLen * sizeof(sal_uChar)); -sal_Int32 *pGlyphSetID = (sal_Int32*)alloca (nLen * sizeof(sal_Int32)); -std::set< sal_Int32 > aGlyphSet; - -// convert unicode to font glyph id and font subset -for (int nChar = 0; nChar < nLen; nChar++) -{ -GetCharID (pStr[nChar], pGlyphID + nChar, pGlyphSetID + nChar); -aGlyphSet.insert (pGlyphSetID[nChar]); -} - -// loop over all glyph sets to detect substrings that can be xshown together -// without changing the postscript font -sal_Int32 *pDeltaSubset = (sal_Int32*)alloca (nLen * sizeof(sal_Int32)); -sal_uChar *pGlyphSubset = (sal_uChar*)alloca (nLen * sizeof(sal_uChar)); - -std::set< sal_Int32 >::iterator aSet; -for (aSet = aGlyphSet.begin(); aSet != aGlyphSet.end(); ++aSet) -{ -Point aPoint = rPoint; -sal_Int32 nOffset = 0; -sal_Int32 nGlyphs = 0; -sal_Int32 nChar; - -// get offset to first glyph -for (nChar = 0; (nChar < nLen) && (pGlyphSetID[nChar] != *aSet); nChar++) -{ -nOffset = pDeltaArray [nChar]; -} - -// loop over all chars to extract those that share the current glyph set -for (nChar = 0; nChar < nLen; nChar++) -{ -if (pGlyphSetID[nChar] == *aSet) -{ -pGlyphSubset [nGlyphs] = pGlyphID [nChar]; -// the offset to the next glyph is determined by the glyph in -// front of the next glyph with the same glyphset id -// most often, this will be the current glyph -while ((nChar + 1) < nLen) -{ -if (pGlyphSetID[nChar + 1] == *aSet) -break; -else -nChar += 1; -} -pDeltaSubset [nGlyphs] = pDeltaArray[nChar] - nOffset; - -nGlyphs += 1; -} -} - -// show the text using the PrinterGfx text api -aPoint.Move (nOffset, 0); - -OString aGlyphSetName(GetCharSetName(*aSet)); -rGfx.PSSetFont (aGlyphSetName, GetGlyphSetEncoding(*aSet)); -rGfx.PSMoveTo (aPoint); -rGfx.PSShowText (pGlyphSubset, nGlyphs, nGlyphs, nGlyphs > 1 ? pDeltaSubset : NULL); -} +DrawGlyphs( rGfx, rPoint, NULL, pStr, nLen, pDeltaArray, sal_False); } sal_Bool diff --git a/vcl/generic/print/glyphset.hxx b/vcl/generic/print/glyphset.hxx index d2d5a3f..1d6eb6f 100644 --- a/vcl/generic/print/glyphset.hxx +++ b/vcl/generic/print/glyphset.hxx @@ -121,7 +121,8 @@ public:
[Libreoffice-commits] .: l10ntools/source
l10ntools/source/helpmerge.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 249dea425a1b8660197af53ab8a56268fddf8ce6 Author: Andras Timar Date: Tue Feb 28 15:11:22 2012 +0100 Prevent crash of helpex.exe diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx index 4cbf8d5..a682bfb 100644 --- a/l10ntools/source/helpmerge.cxx +++ b/l10ntools/source/helpmerge.cxx @@ -244,7 +244,6 @@ bool HelpParser::Merge( //TODO: explicit BOM handling? XMLFile* xmlfile = aParser.Execute( sXmlFile, new XMLFile( rtl::OUString('0') ) ); -xmlfile->Extract(); if( xmlfile == NULL) { @@ -252,6 +251,7 @@ bool HelpParser::Merge( exit(-1); } +xmlfile->Extract(); rtl::OString sCur; for( unsigned int n = 0; n < aLanguages.size(); n++ ){ ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: oox/inc oox/source
oox/inc/oox/xls/biffinputstream.hxx | 28 - oox/source/xls/biffinputstream.cxx | 40 2 files changed, 68 deletions(-) New commits: commit 37eb6211b2703c062aa391054bd2d3ed7b3a56f7 Author: Santiago Martinez Date: Mon Feb 27 20:32:50 2012 +0100 Remove unused code in BiffInputStream. diff --git a/oox/inc/oox/xls/biffinputstream.hxx b/oox/inc/oox/xls/biffinputstream.hxx index 2f6f537..c05186c 100644 --- a/oox/inc/oox/xls/biffinputstream.hxx +++ b/oox/inc/oox/xls/biffinputstream.hxx @@ -254,8 +254,6 @@ public: /** Returns the absolute position in the wrapped binary stream. */ sal_Int64 tellBase() const; -/** Returns the total size of the wrapped binary stream. */ -sal_Int64 sizeBase() const; // BinaryInputStream interface (stream read access) --- @@ -295,13 +293,6 @@ public: */ ::rtl::OUString readByteStringUC( bool b16BitLen, rtl_TextEncoding eTextEnc, bool bAllowNulChars = false ); -/** Ignores 8/16 bit string length and character array. -@param b16BitLen -True = Read 16-bit string length field before the character array. -False = Read 8-bit string length field before the character array. - */ -voidskipByteString( bool b16BitLen ); - // Unicode strings /** Reads nChars characters of a BIFF8 string, and returns the string. @@ -332,25 +323,6 @@ public: */ ::rtl::OUString readUniString( bool bAllowNulChars = false ); -/** Ignores nChars characters of a BIFF8 string. -@param nChars Number of characters to skip in the stream. -@param b16BitChars -True = The character array contains 16-bit characters. -False = The character array contains truncated 8-bit characters. - */ -voidskipUniStringChars( sal_uInt16 nChars, bool b16BitChars ); - -/** Ignores 8-bit flags, extended header, nChar characters, extended data -of a BIFF8 string. -@param nChars Number of characters to skip in the stream. - */ -voidskipUniStringBody( sal_uInt16 nChars ); - -/** Ignores 16-bit character count, 8-bit flags, extended header, character -array, extended data of a BIFF8 string. - */ -voidskipUniString(); - // private: /** Initializes all members after base stream has been seeked to new record. */ diff --git a/oox/source/xls/biffinputstream.cxx b/oox/source/xls/biffinputstream.cxx index 5634ae4..d238bb3 100644 --- a/oox/source/xls/biffinputstream.cxx +++ b/oox/source/xls/biffinputstream.cxx @@ -291,11 +291,6 @@ sal_Int64 BiffInputStream::tellBase() const return maRecBuffer.getBaseStream().tell(); } -sal_Int64 BiffInputStream::sizeBase() const -{ -return maRecBuffer.getBaseStream().size(); -} - // BinaryInputStream interface (stream read access) --- sal_Int32 BiffInputStream::readData( StreamDataSequence& orData, sal_Int32 nBytes, size_t nAtomSize ) @@ -368,11 +363,6 @@ OUString BiffInputStream::readByteStringUC( bool b16BitLen, rtl_TextEncoding eTe return OStringToOUString( readByteString( b16BitLen, bAllowNulChars ), eTextEnc ); } -void BiffInputStream::skipByteString( bool b16BitLen ) -{ -skip( b16BitLen ? readuInt16() : readuInt8() ); -} - // Unicode strings OUString BiffInputStream::readUniStringChars( sal_uInt16 nChars, bool b16BitChars, bool bAllowNulChars ) @@ -418,36 +408,6 @@ OUString BiffInputStream::readUniString( bool bAllowNulChars ) return readUniStringBody( readuInt16(), bAllowNulChars ); } -void BiffInputStream::skipUniStringChars( sal_uInt16 nChars, bool b16BitChars ) -{ -sal_Int32 nCharsLeft = nChars; -while( !mbEof && (nCharsLeft > 0) ) -{ -// skip the character array -sal_Int32 nSkipSize = b16BitChars ? getMaxRawReadSize( 2 * nCharsLeft, 2 ) : getMaxRawReadSize( nCharsLeft, 1 ); -skip( nSkipSize ); - -// prepare for next CONTINUE record -nCharsLeft -= (b16BitChars ? (nSkipSize / 2) : nSkipSize); -if( nCharsLeft > 0 ) -jumpToNextStringContinue( b16BitChars ); -} -} - -void BiffInputStream::skipUniStringBody( sal_uInt16 nChars ) -{ -bool b16BitChars; -sal_Int32 nAddSize; -readUniStringHeader( b16BitChars, nAddSize ); -skipUniStringChars( nChars, b16BitChars ); -skip( nAddSize ); -} - -void BiffInputStream::skipUniString() -{ -skipUniStringBody( readuInt16() ); -} - // private void BiffInputStream::setupRecord() ___ Libreoffice-commits mailing li
[Libreoffice-commits] .: oox/inc oox/source unusedcode.easy
oox/inc/oox/xls/drawingmanager.hxx |3 --- oox/source/xls/drawingmanager.cxx |5 - unusedcode.easy|1 - 3 files changed, 9 deletions(-) New commits: commit d4c467f7d37d47a798ac3880ad30ceca6e60ea8c Author: Santiago Martinez Date: Mon Feb 27 20:07:47 2012 +0100 Remove unused code in BiffObjLineModel. diff --git a/oox/inc/oox/xls/drawingmanager.hxx b/oox/inc/oox/xls/drawingmanager.hxx index 4ec80d7..758c60e 100644 --- a/oox/inc/oox/xls/drawingmanager.hxx +++ b/oox/inc/oox/xls/drawingmanager.hxx @@ -59,9 +59,6 @@ struct BiffObjLineModel boolmbAuto; /// True = automatic line format. explicitBiffObjLineModel(); - -/** Returns true, if the line formatting is visible (automatic or explicit). */ -boolisVisible() const; }; // diff --git a/oox/source/xls/drawingmanager.cxx b/oox/source/xls/drawingmanager.cxx index d8cf3b1..afadd1f 100644 --- a/oox/source/xls/drawingmanager.cxx +++ b/oox/source/xls/drawingmanager.cxx @@ -191,11 +191,6 @@ BiffObjLineModel::BiffObjLineModel() : { } -bool BiffObjLineModel::isVisible() const -{ -return mbAuto || (mnStyle != BIFF_OBJ_LINE_NONE); -} - BiffInputStream& operator>>( BiffInputStream& rStrm, BiffObjLineModel& rModel ) { sal_uInt8 nFlags; diff --git a/unusedcode.easy b/unusedcode.easy index b7e4e92..14cd110 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -1060,7 +1060,6 @@ oox::xls::BiffHelper::calcRkFromDouble(int&, double) oox::xls::BiffInputStream::sizeBase() const oox::xls::BiffInputStream::skipByteString(bool) oox::xls::BiffInputStream::skipUniString() -oox::xls::BiffObjLineModel::isVisible() const oox::xls::BiffOutputStream::BiffOutputStream(oox::BinaryOutputStream&, unsigned short) oox::xls::BiffOutputStream::endRecord() oox::xls::BiffOutputStream::fill(unsigned char, int, unsigned long) ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5-1' - scp2/source
scp2/source/ooo/ure.scp |2 -- 1 file changed, 2 deletions(-) New commits: commit 63d549196a60549aaffea1511467be193969f390 Author: Petr Mladek Date: Mon Feb 27 12:24:20 2012 +0100 pack libstdc++ and libgcc_s only in the new stdlibs subpackage (fdo#46658) The older commit moved the gid's definition in the file list but it did not move it in the module list. (cherry picked from commit 550cc3e9dbe7a86797fc946f40d9ae5529d6ce2c) Signed-off-by: Stephan Bergmann (cherry picked from commit 216e30277b06124822cccdc2a6d46de57a2f8e6e) Signed-off-by: Caolán McNamara diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp index 006e001..8deb571 100644 --- a/scp2/source/ooo/ure.scp +++ b/scp2/source/ooo/ure.scp @@ -1103,8 +1103,6 @@ Module gid_Module_Root_Ure_Hidden gid_File_Dl_Uuresolver, gid_File_Dl_Libxml2, gid_File_Dl_Stlport, -gid_File_Dl_GccS, -gid_File_Dl_Stdcpp, gid_File_Lib_Mingw_GccS_Ure, gid_File_Lib_Mingw_Stdcpp_Ure, gid_File_Dl_Unicows, ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - filter/source
filter/source/pdf/impdialog.src |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 5d844b8dd9b86668d4e16f60537e6e14d2a19433 Author: Andras Timar Date: Tue Feb 28 14:06:16 2012 +0100 fdo#45023 UI fix on PDF export dialog Signed-off-by: Michael Meeks diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src index 006fa3a..dd8d50b 100644 --- a/filter/source/pdf/impdialog.src +++ b/filter/source/pdf/impdialog.src @@ -177,8 +177,9 @@ TabPage RID_PDF_TAB_GENER }; FixedText FT_ADDSTREAMDESCRIPTION { -Pos = MAP_APPFONT( 206 , 27 ) ; -Size = MAP_APPFONT( 140, 8 ) ; +Pos = MAP_APPFONT( 206 , 23 ) ; +Size = MAP_APPFONT( 140, 16 ) ; +Wordbreak = TRUE ; Text[ en-US ] = "Makes this PDF easily editable in %PRODUCTNAME" ; }; CheckBox CB_PDFA_1B_SELECT ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 4 commits - framework/inc framework/source sfx2/source vcl/inc vcl/unx
framework/inc/services/desktop.hxx|4 + framework/source/services/desktop.cxx | 30 framework/source/services/sessionlistener.cxx | 27 +++ sfx2/source/appl/shutdownicon.cxx |1 vcl/inc/unx/sm.hxx|1 vcl/unx/generic/app/sm.cxx| 96 ++ 6 files changed, 100 insertions(+), 59 deletions(-) New commits: commit 5279616d50b0394e8ec6d8e2109471ca649412b7 Author: Bjoern Michaelsen Date: Tue Feb 28 14:29:06 2012 +0100 lp#562027: fix logout with quickstarter diff --git a/framework/inc/services/desktop.hxx b/framework/inc/services/desktop.hxx index ac51f25..530d615 100644 --- a/framework/inc/services/desktop.hxx +++ b/framework/inc/services/desktop.hxx @@ -339,6 +339,10 @@ class Desktop : // interfaces virtual ::rtl::OUString SAL_CALL getUntitledPrefix() throw (css::uno::RuntimeException); +// we need this wrapped terminate()-call to terminate even the QuickStarter +// non-virtual and non-UNO for now +bool SAL_CALL terminateQuickstarterToo() +throw( css::uno::RuntimeException ); //- // protected methods //- diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index eccd010..6c63aea 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -401,6 +401,36 @@ sal_Bool SAL_CALL Desktop::terminate() return bTerminate; } +namespace +{ +class QuickstartSuppressor +{ +Desktop* const m_pDesktop; +css::uno::Reference< css::frame::XTerminateListener > m_xQuickLauncher; +public: +QuickstartSuppressor(Desktop* const pDesktop, css::uno::Reference< css::frame::XTerminateListener > xQuickLauncher) +: m_pDesktop(pDesktop) +, m_xQuickLauncher(xQuickLauncher) +{ +SAL_INFO("fwk.desktop", "temporary removing Quickstarter"); +if(m_xQuickLauncher.is()) +m_pDesktop->removeTerminateListener(m_xQuickLauncher); +} +~QuickstartSuppressor() +{ +SAL_INFO("fwk.desktop", "readding Quickstarter"); +if(m_xQuickLauncher.is()) +m_pDesktop->addTerminateListener(m_xQuickLauncher); +} +}; +} + +bool SAL_CALL Desktop::terminateQuickstarterToo() +throw( css::uno::RuntimeException ) +{ +QuickstartSuppressor(this, m_xQuickLauncher); +return terminate(); +} //= void SAL_CALL Desktop::addTerminateListener( const css::uno::Reference< css::frame::XTerminateListener >& xListener ) diff --git a/framework/source/services/sessionlistener.cxx b/framework/source/services/sessionlistener.cxx index b6c94b2..92b479d 100644 --- a/framework/source/services/sessionlistener.cxx +++ b/framework/source/services/sessionlistener.cxx @@ -30,6 +30,7 @@ // my own includes #include +#include #include #include #include @@ -326,7 +327,19 @@ void SAL_CALL SessionListener::approveInteraction( sal_Bool bInteractionGranted StoreSession( sal_False ); css::uno::Reference< css::frame::XDesktop > xDesktop( m_xSMGR->createInstance(SERVICENAME_DESKTOP), css::uno::UNO_QUERY_THROW); -m_bTerminated = xDesktop->terminate(); +// honestly: how many implementations of XDesktop will we ever have? +// so casting this directly to the implementation +Desktop* pDesktop(dynamic_cast(xDesktop.get())); +if(pDesktop) +{ +SAL_INFO("fwk.session", "XDesktop is a framework::Desktop -- good."); +m_bTerminated = pDesktop->terminateQuickstarterToo(); +} +else +{ +SAL_WARN("fwk.session", "XDesktop is not a framework::Desktop -- this should never happen."); +m_bTerminated = xDesktop->terminate(); +} if ( m_rSessionManager.is() ) { commit 478485d19f290f417f824dbecad3e3588bf553f5 Author: Bjoern Michaelsen Date: Tue Feb 28 14:27:41 2012 +0100 some fancy new SAL_LOG tracing for sfx2 diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index ffaa63d..2f56e0b 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -686,6 +686,7 @@ void SAL_CALL ShutdownIcon::disposing( const ::com::sun::star::lang::EventObject void SAL_CALL ShutdownIcon::queryTermination( const ::com::sun::star::lang::EventObject& ) throw(::com::sun::star::frame::TerminationV
[Libreoffice-commits] .: sc/source
sc/source/ui/dbgui/tpsort.cxx | 45 ++ sc/source/ui/inc/tpsort.hxx | 30 +--- 2 files changed, 34 insertions(+), 41 deletions(-) New commits: commit 2bb8328d0a3b2d4a076c1896f0c45cff1cc4677b Author: Albert Thuswaldner Date: Tue Feb 28 19:14:26 2012 +0530 German Comments translations. diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 6609563..aecb208 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -61,26 +61,26 @@ using namespace com::sun::star; // --- /* - * Da sich Einstellungen auf der zweiten TabPage (Optionen) auf - * die erste TabPage auswirken, muss es die Moeglichkeit geben, - * dies der jeweils anderen Seite mitzuteilen. + * Since the settings on the second Tab Page (Options) effects + * the first Tab Page, there must be a way for it to communicate with the + * other Page. * - * Im Moment wird dieses Problem ueber zwei Datenmember des TabDialoges - * geloest. Wird eine Seite Aktiviert/Deaktiviert, so gleicht sie diese - * Datenmember mit dem eigenen Zustand ab (->Activate()/Deactivate()). + * At the moment this problem is solved through using two data members of the + * Tab Pages. If a page is enabled / disabled, it compares this data member + * with its own state (-> Activate() / Deactivate()). * - * Die Klasse SfxTabPage bietet mittlerweile ein Verfahren an: + * In the meantime the class SfxTabPage offers the following method: * * virtual sal_Bool HasExchangeSupport() const; -> return sal_True; * virtual void ActivatePage(const SfxItemSet &); * virtual int DeactivatePage(SfxItemSet * = 0); * - * muss noch geaendert werden! + * This still needs to be changed! */ // // -// Sortierkriterien-Tabpage: +// Sort Criteria Tab page ScTabPageSortFields::ScTabPageSortFields( Window* pParent, const SfxItemSet& rArgSet ) @@ -183,7 +183,7 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ ) if ( aLbSort1.GetEntryCount() == 0 ) FillFieldLists(); -// Selektieren der ListBoxen: +// ListBox selection: if ( rSortData.bDoSort[0] ) { @@ -200,7 +200,7 @@ void ScTabPageSortFields::Reset( const SfxItemSet& /* rArgSet */ ) } else { -aSortLbArr[i]->SelectEntryPos( 0 ); // "keiner" selektieren +aSortLbArr[i]->SelectEntryPos( 0 ); // Select none aDirBtnArr[i][0]->Check(); // Up } } @@ -261,7 +261,7 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) OSL_ENSURE((nSort1Pos <= SC_MAXFIELDS) && (nSort2Pos <= SC_MAXFIELDS) && (nSort3Pos <= SC_MAXFIELDS), -"Array-Range Fehler!" ); +"Array range error!" ); if ( nSort1Pos == LISTBOX_ENTRY_NOTFOUND ) nSort1Pos = 0; if ( nSort2Pos == LISTBOX_ENTRY_NOTFOUND ) nSort2Pos = 0; @@ -273,10 +273,9 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) theSortData.bDoSort[1] = (nSort2Pos > 0); theSortData.bDoSort[2] = (nSort3Pos > 0); -// wenn auf Optionen-Seite "OK" gewaehlt wurde und -// dabei die Sortierrichtung umgestellt wurde, so -// wird das erste Feld der jeweiligen Richtung als -// Sortierkriterium gewaehlt (steht in nFieldArr[0]): +// If the "OK" was selected on the Options page while the sort +// direction was changed, then the first field (i.e. nFieldArr[0]) +// of the respective direction is chosen as the sorting criterion: if ( bSortByRows != pDlg->GetByRows() ) { theSortData.nField[0] = @@ -295,7 +294,7 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) theSortData.bAscending[0] = aBtnUp1.IsChecked(); theSortData.bAscending[1] = aBtnUp2.IsChecked(); theSortData.bAscending[2] = aBtnUp3.IsChecked(); -// bHasHeader ist in ScTabPageSortOptions::FillItemSet, wo es hingehoert +// bHasHeader is in ScTabPageSortOptions::FillItemSet, where it belongs } else { @@ -311,8 +310,7 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet& rArgSet ) // --- -// fuer Datenaustausch ohne Dialog-Umweg: (! noch zu tun !) - +// for data exchange without dialogue detour: (still TODO!) void ScTabPageSortFields::ActivatePage() { if ( pDlg ) @@ -518,7 +516,7 @@ IMPL_LINK( ScTabPageSortFields, SelectHdl, ListBox *, pLb ) } // -// Sortieroptionen-Tabpag
[Libreoffice-commits] .: filter/source
filter/source/pdf/impdialog.src |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit e54773aa64af28795155aa55b3179141ca904f12 Author: Andras Timar Date: Tue Feb 28 14:06:16 2012 +0100 fdo#45023 UI fix on PDF export dialog diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src index 006fa3a..dd8d50b 100644 --- a/filter/source/pdf/impdialog.src +++ b/filter/source/pdf/impdialog.src @@ -177,8 +177,9 @@ TabPage RID_PDF_TAB_GENER }; FixedText FT_ADDSTREAMDESCRIPTION { -Pos = MAP_APPFONT( 206 , 27 ) ; -Size = MAP_APPFONT( 140, 8 ) ; +Pos = MAP_APPFONT( 206 , 23 ) ; +Size = MAP_APPFONT( 140, 16 ) ; +Wordbreak = TRUE ; Text[ en-US ] = "Makes this PDF easily editable in %PRODUCTNAME" ; }; CheckBox CB_PDFA_1B_SELECT ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5-1' - sw/inc sw/source
sw/inc/doc.hxx |2 - sw/source/core/doc/docfmt.cxx| 48 --- sw/source/ui/dochdl/swdtflvr.cxx |2 - 3 files changed, 32 insertions(+), 20 deletions(-) New commits: commit 0f2954dd3a1dcd9a4d2cc6a39e6b489acb223f10 Author: Caolán McNamara Date: Mon Feb 27 12:39:06 2012 + Resolves: fdo#46038 don't copy page styles into temporary clipboard doc writer rtf export has a nasty pgdsctbl extension sd rtf import has nasty "if its got a table keyword in it its a table" logic Classically we never put our styles into the temporary clipboard, so fastest and safest fix is to simply skip putting the page styles into it. (cherry picked from commit 15547450bdba10959473c2cb5891f29ad5053b09) Signed-off-by: Miklos Vajna Signed-off-by: Tor Lillqvist Signed-off-by: Michael Meeks diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 8165a57..29be2a7 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1275,7 +1275,7 @@ public: SwGrfFmtColl* CopyGrfColl( const SwGrfFmtColl& rColl ); // Replace all styles with those from rSource. -void ReplaceStyles( const SwDoc& rSource ); +void ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles = true ); // Replace all property defaults with those from rSource. void ReplaceDefaults( const SwDoc& rSource ); diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 10cd5f7..54a9707 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -2135,7 +2135,7 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc, } } -void SwDoc::ReplaceStyles( const SwDoc& rSource ) +void SwDoc::ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles ) { ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo()); @@ -2146,26 +2146,38 @@ void SwDoc::ReplaceStyles( const SwDoc& rSource ) CopyFmtArr( *rSource.pTxtFmtCollTbl, *pTxtFmtCollTbl, &SwDoc::_MakeTxtFmtColl, *pDfltTxtFmtColl ); -// and now the page templates -sal_uInt16 nCnt = rSource.aPageDescs.Count(); -if( nCnt ) -{ -// a different Doc -> Number formatter needs to be merged -SwTblNumFmtMerge aTNFM( rSource, *this ); +sal_uInt16 nCnt; -// 1st step: Create all formats (skip the 0th - it's the default!) -while( nCnt ) +//To-Do: +// a) in rtf export don't export our hideous pgdsctbl +// extension to rtf anymore +// b) in sd rtf import (View::InsertData) don't use +// a super-fragile test for mere presence of \trowd to +// indicate import of rtf into a table +// c) then drop use of bIncludePageStyles +if (bIncludePageStyles) +{ +// and now the page templates +nCnt = rSource.aPageDescs.Count(); +if( nCnt ) { -SwPageDesc *pSrc = rSource.aPageDescs[ --nCnt ]; -if( 0 == ::lcl_FindPageDesc( aPageDescs, pSrc->GetName() ) ) -MakePageDesc( pSrc->GetName() ); -} +// a different Doc -> Number formatter needs to be merged +SwTblNumFmtMerge aTNFM( rSource, *this ); -// 2nd step: Copy all attributes, set the right parents -for( nCnt = rSource.aPageDescs.Count(); nCnt; ) -{ -SwPageDesc *pSrc = rSource.aPageDescs[ --nCnt ]; -CopyPageDesc( *pSrc, *::lcl_FindPageDesc( aPageDescs, pSrc->GetName() )); +// 1st step: Create all formats (skip the 0th - it's the default!) +while( nCnt ) +{ +SwPageDesc *pSrc = rSource.aPageDescs[ --nCnt ]; +if( 0 == ::lcl_FindPageDesc( aPageDescs, pSrc->GetName() ) ) +MakePageDesc( pSrc->GetName() ); +} + +// 2nd step: Copy all attributes, set the right parents +for( nCnt = rSource.aPageDescs.Count(); nCnt; ) +{ +SwPageDesc *pSrc = rSource.aPageDescs[ --nCnt ]; +CopyPageDesc( *pSrc, *::lcl_FindPageDesc( aPageDescs, pSrc->GetName() )); +} } } diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index e5fdd55..dfa85ed 100755 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -379,7 +379,7 @@ namespace //It would probably make most sense here to only insert the styles used //by the selection, e.g. apply SwDoc::IsUsed on styles ? -rDest.ReplaceStyles(rSrc); +rDest.ReplaceStyles(rSrc, false); rSrcWrtShell.Copy(&rDest); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - configmgr/source
configmgr/source/partial.cxx | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) New commits: commit af8895270658bec676303da2154b903a78c6fbe6 Author: Stephan Bergmann Date: Fri Feb 24 17:19:32 2012 +0100 Resolves fdo#46074: Fix Partial::contains for paths that go past a leaf node Paths that already "failed" at the root node were not reported as CONTAINS_NOT, so that they were erroneously migrated, but with broken content (values of set member properties were nil). (cherry picked from commit f3f79cc9e6c265baf48955d53f7e888205e0b3e0) Signed-off-by: Caolán McNamara diff --git a/configmgr/source/partial.cxx b/configmgr/source/partial.cxx index 7922e2c..088de36 100644 --- a/configmgr/source/partial.cxx +++ b/configmgr/source/partial.cxx @@ -76,6 +76,12 @@ Partial::Partial( std::set< rtl::OUString > const & includedPaths, std::set< rtl::OUString > const & excludedPaths) { +// The Partial::Node tree built up here encodes the following information: +// * Inner node, startInclude: an include starts here that contains excluded +// sub-trees +// * Inner node, !startInclude: contains in-/excluded sub-trees +// * Leaf node, startInclude: an include starts here +// * Leaf node, !startInclude: an exclude starts here for (std::set< rtl::OUString >::const_iterator i(includedPaths.begin()); i != includedPaths.end(); ++i) { @@ -119,12 +125,19 @@ Partial::~Partial() {} Partial::Containment Partial::contains(Path const & path) const { //TODO: For set elements, the segment names recorded in the node tree need // not match the corresponding path segments, so this function can fail. + +// * If path ends at a leaf node or goes past a leaf node: +// ** If that leaf node is startInclude: => CONTAINS_NODE +// ** If that leaf node is !startInclude: => CONTAINS_NOT +// * If path ends at inner node: +// ** If there is some startInclude along its trace: => CONTAINS_NODE +// ** If there is no startInclude along its trace: => CONTAINS_SUBNODES Node const * p = &root_; bool includes = false; for (Path::const_iterator i(path.begin()); i != path.end(); ++i) { Node::Children::const_iterator j(p->children.find(*i)); if (j == p->children.end()) { -break; +return p->startInclude ? CONTAINS_NODE : CONTAINS_NOT; } p = &j->second; includes |= p->startInclude; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5-1' - sc/source
sc/source/ui/namedlg/namedlg.cxx | 18 ++ 1 file changed, 18 insertions(+) New commits: commit da7235196c138eed21065c94e2a855d6c3f217e0 Author: Noel Power Date: Fri Feb 24 12:27:37 2012 + fix core when clicking on entries in Manage Names dialog in calc fdo#46568 (cherry picked from commit 22871f1af3be444e747f7adaad5221b9c8b0bebf) Signed-off-by: Eike Rathke Signed-off-by: Kohei Yoshida Signed-off-by: Markus Mohrhard diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx index 56c50e8..06ad128 100644 --- a/sc/source/ui/namedlg/namedlg.cxx +++ b/sc/source/ui/namedlg/namedlg.cxx @@ -269,10 +269,28 @@ void ScNameDlg::SetActive() void ScNameDlg::UpdateChecks(ScRangeData* pData) { +// remove handlers, we only want the handlers to process +// user input and not when we are syncing the controls with our internal +// model ( also UpdateChecks is called already from some other event +// handlers, triggering handlers while already processing a handler can +// ( and does in this case ) corrupt the internal data + +maBtnCriteria.SetToggleHdl( Link() ); +maBtnPrintArea.SetToggleHdl( Link() ); +maBtnColHeader.SetToggleHdl( Link() ); +maBtnRowHeader.SetToggleHdl( Link() ); + maBtnCriteria .Check( pData->HasType( RT_CRITERIA ) ); maBtnPrintArea.Check( pData->HasType( RT_PRINTAREA ) ); maBtnColHeader.Check( pData->HasType( RT_COLHEADER ) ); maBtnRowHeader.Check( pData->HasType( RT_ROWHEADER ) ); + +// Restore handlers so user input is processed again +Link aToggleHandler = LINK( this, ScNameDlg, EdModifyHdl ); +maBtnCriteria.SetToggleHdl( aToggleHandler ); +maBtnPrintArea.SetToggleHdl( aToggleHandler ); +maBtnColHeader.SetToggleHdl( aToggleHandler ); +maBtnRowHeader.SetToggleHdl( aToggleHandler ); } bool ScNameDlg::IsNameValid() ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: 10 commits - drawinglayer/inc drawinglayer/source filter/inc filter/source package/inc package/source sc/source sd/source svl/inc svl/source svtools/source sw/inc sw/source to
drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx | 79 -- drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx| 41 - drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx | 76 - filter/inc/filter/msfilter/msdffimp.hxx | 1 filter/source/config/cache/typedetection.cxx| 13 - filter/source/msfilter/msdffimp.cxx | 9 - filter/source/msfilter/svdfppt.cxx | 9 - package/inc/ZipPackageStream.hxx| 1 package/source/zippackage/ZipPackageStream.cxx | 6 sc/source/core/data/stlsheet.cxx| 12 - sd/source/core/stlsheet.cxx | 12 - svl/inc/svl/style.hxx | 20 +- svl/source/items/style.cxx | 55 ++ svtools/source/control/scriptedtext.cxx | 7 svtools/source/filter/wmf/winwmf.cxx| 5 sw/inc/charfmt.hxx | 2 sw/inc/docstyle.hxx | 2 sw/source/filter/ww8/ww8par.cxx | 15 + sw/source/ui/app/docstyle.cxx | 18 +- tools/inc/tools/pstm.hxx| 4 tools/inc/tools/stream.hxx | 6 tools/source/ref/pstm.cxx | 17 -- tools/source/stream/stream.cxx | 2 unusedcode.easy | 7 vcl/inc/vcl/button.hxx | 1 vcl/source/control/button.cxx | 6 26 files changed, 115 insertions(+), 311 deletions(-) New commits: commit 9ddf39c39152bf4f42bc0bcc2ad03f7fc0c02029 Author: Caolán McNamara Date: Tue Feb 28 10:15:17 2012 + fix windows build diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx index a8bde29..82d322a 100644 --- a/tools/inc/tools/stream.hxx +++ b/tools/inc/tools/stream.hxx @@ -641,7 +641,9 @@ private: sal_Bool LockRange( sal_Size nByteOffset, sal_Size nBytes ); sal_Bool UnlockRange( sal_Size nByteOffset, sal_Size nBytes ); sal_Bool LockFile(); - +#ifdef WNT +sal_Bool UnlockFile(); +#endif protected: virtual sal_SizeGetData( void* pData, sal_Size nSize ); commit f7aaf5c42ebe980a86abc799bffc7d504c9a1be4 Author: Caolán McNamara Date: Tue Feb 28 06:48:43 2012 + convert some low hanging fruit diff --git a/sw/inc/charfmt.hxx b/sw/inc/charfmt.hxx index f40029d..4b564d7 100644 --- a/sw/inc/charfmt.hxx +++ b/sw/inc/charfmt.hxx @@ -39,7 +39,7 @@ class SW_DLLPUBLIC SwCharFmt : public SwFmt SwCharFmt *pDerivedFrom ) : SwFmt( rPool, pFmtName, aCharFmtSetRange, pDerivedFrom, RES_CHRFMT ) {} -SwCharFmt( SwAttrPool& rPool, const String &rFmtName, +SwCharFmt( SwAttrPool& rPool, const rtl::OUString &rFmtName, SwCharFmt *pDerivedFrom ) : SwFmt( rPool, rFmtName, aCharFmtSetRange, pDerivedFrom, RES_CHRFMT ) {} diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx index 0f2456b..a8bde29 100644 --- a/tools/inc/tools/stream.hxx +++ b/tools/inc/tools/stream.hxx @@ -407,7 +407,7 @@ public: sal_BoolReadUniStringLine( String& rStr ); /// Read a 32bit length prefixed sequence of utf-16 if eSrcCharSet==RTL_TEXTENCODING_UNICODE, /// otherwise read a 16bit length prefixed sequence of bytes and convert from eSrcCharSet -String ReadUniOrByteString(rtl_TextEncoding eSrcCharSet); +rtl::OUString ReadUniOrByteString(rtl_TextEncoding eSrcCharSet); /// Write a 32bit length prefixed sequence of utf-16 if eSrcCharSet==RTL_TEXTENCODING_UNICODE, /// otherwise convert to eSrcCharSet and write a 16bit length prefixed sequence of bytes SvStream& WriteUniOrByteString( const UniString& rStr, rtl_TextEncoding eDestCharSet ); diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index b1c939a..ab3703b 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1379,7 +1379,7 @@ SvStream& SvStream::operator<< ( SvStream& rStream ) // --- -String SvStream::ReadUni
[Libreoffice-commits] .: l10ntools/scripts
l10ntools/scripts/propex |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit cb578c77e23a409f434022dd175c5bd702877ffa Author: Andras Timar Date: Tue Feb 28 11:03:02 2012 +0100 fix behaviour of propex tool on Windows diff --git a/l10ntools/scripts/propex b/l10ntools/scripts/propex index 6a402a2..35dcb25 100755 --- a/l10ntools/scripts/propex +++ b/l10ntools/scripts/propex @@ -41,7 +41,8 @@ getopts("ep:r:i:o:l:", \%options); unless ( $options{i} =~ m/en_US/ ) {exit 0;} -my ($unsued1, $dir, $unused2) = File::Basename::fileparse($options{i}); +$options{i} =~ s|\\|/|g; # fix path on Windows, Perl expects / separator +my ($unused1, $dir, $unused2) = File::Basename::fileparse($options{i}); my $file = substr ( Cwd::abs_path($options{i}), length(Cwd::abs_path($dir . $options{r})) + 1 ); $file =~ s|/|\\|g; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: writerfilter/source
writerfilter/source/rtftok/rtfdocumentimpl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f31548f70c85a83fe820c6ae1c9b9803074039b0 Author: Miklos Vajna Date: Tue Feb 28 10:06:29 2012 +0100 RTFFrame::getSprms: use SAL_N_ELEMENTS() diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index f293bf6..f388ec8 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -3496,7 +3496,7 @@ RTFSprms RTFFrame::getSprms() NS_ooxml::LN_CT_FramePr_lines }; -for ( int i = 0, len = sizeof( pNames ) / sizeof( Id ); i < len; ++i ) +for ( int i = 0, len = SAL_N_ELEMENTS(pNames); i < len; ++i ) { Id aId = pNames[i]; RTFValue::Pointer_t pValue; ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - vcl/generic
vcl/generic/fontmanager/fontconfig.cxx | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) New commits: commit 2f0396695b24874a2883560d206dff4dcf7a6f4d Author: Caolán McNamara Date: Mon Feb 20 12:06:52 2012 + Resoves fdo#42901 duplicated .pfb without duplicated .afm drops font If we have a duplicate font entry the duplicate is dropped, but if the first font was invalid, e.g. .pfb without .afm this results in dropping *both* fonts, the valid and invalid one (cherry picked from commit 65a3ec97b5032d1748c8f84eeb0b8656e1c25918) Signed-off-by: Stephan Bergmann diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx index a120fb7..201cfa3 100644 --- a/vcl/generic/fontmanager/fontconfig.cxx +++ b/vcl/generic/fontmanager/fontconfig.cxx @@ -467,6 +467,19 @@ namespace } } +//FontConfig doesn't come with a way to remove an element from a FontSet as far +//as I can see +static void lcl_FcFontSetRemove(FcFontSet* pFSet, int i) +{ +FcPatternDestroy(pFSet->fonts[i]); + +int nTail = pFSet->nfont - (i + 1); +--pFSet->nfont; +if (!nTail) +return; +memmove(pFSet->fonts + i, pFSet->fonts + i + 1, nTail*sizeof(FcPattern*)); +} + int PrintFontManager::countFontconfigFonts( boost::unordered_map& o_rVisitedPaths ) { int nFonts = 0; @@ -559,7 +572,13 @@ int PrintFontManager::countFontconfigFonts( boost::unordered_map___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sw/inc sw/source
sw/inc/doc.hxx |2 - sw/source/core/doc/docfmt.cxx| 48 --- sw/source/ui/dochdl/swdtflvr.cxx |2 - 3 files changed, 32 insertions(+), 20 deletions(-) New commits: commit 018fd9afa4659a791dd6e2a6c1d44185505ba4ec Author: Caolán McNamara Date: Mon Feb 27 12:39:06 2012 + Resolves: fdo#46038 don't copy page styles into temporary clipboard doc writer rtf export has a nasty pgdsctbl extension sd rtf import has nasty "if its got a table keyword in it its a table" logic Classically we never put our styles into the temporary clipboard, so fastest and safest fix is to simply skip putting the page styles into it. (cherry picked from commit 15547450bdba10959473c2cb5891f29ad5053b09) Signed-off-by: Miklos Vajna diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 8165a57..29be2a7 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -1275,7 +1275,7 @@ public: SwGrfFmtColl* CopyGrfColl( const SwGrfFmtColl& rColl ); // Replace all styles with those from rSource. -void ReplaceStyles( const SwDoc& rSource ); +void ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles = true ); // Replace all property defaults with those from rSource. void ReplaceDefaults( const SwDoc& rSource ); diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 10cd5f7..54a9707 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -2135,7 +2135,7 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc, } } -void SwDoc::ReplaceStyles( const SwDoc& rSource ) +void SwDoc::ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles ) { ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo()); @@ -2146,26 +2146,38 @@ void SwDoc::ReplaceStyles( const SwDoc& rSource ) CopyFmtArr( *rSource.pTxtFmtCollTbl, *pTxtFmtCollTbl, &SwDoc::_MakeTxtFmtColl, *pDfltTxtFmtColl ); -// and now the page templates -sal_uInt16 nCnt = rSource.aPageDescs.Count(); -if( nCnt ) -{ -// a different Doc -> Number formatter needs to be merged -SwTblNumFmtMerge aTNFM( rSource, *this ); +sal_uInt16 nCnt; -// 1st step: Create all formats (skip the 0th - it's the default!) -while( nCnt ) +//To-Do: +// a) in rtf export don't export our hideous pgdsctbl +// extension to rtf anymore +// b) in sd rtf import (View::InsertData) don't use +// a super-fragile test for mere presence of \trowd to +// indicate import of rtf into a table +// c) then drop use of bIncludePageStyles +if (bIncludePageStyles) +{ +// and now the page templates +nCnt = rSource.aPageDescs.Count(); +if( nCnt ) { -SwPageDesc *pSrc = rSource.aPageDescs[ --nCnt ]; -if( 0 == ::lcl_FindPageDesc( aPageDescs, pSrc->GetName() ) ) -MakePageDesc( pSrc->GetName() ); -} +// a different Doc -> Number formatter needs to be merged +SwTblNumFmtMerge aTNFM( rSource, *this ); -// 2nd step: Copy all attributes, set the right parents -for( nCnt = rSource.aPageDescs.Count(); nCnt; ) -{ -SwPageDesc *pSrc = rSource.aPageDescs[ --nCnt ]; -CopyPageDesc( *pSrc, *::lcl_FindPageDesc( aPageDescs, pSrc->GetName() )); +// 1st step: Create all formats (skip the 0th - it's the default!) +while( nCnt ) +{ +SwPageDesc *pSrc = rSource.aPageDescs[ --nCnt ]; +if( 0 == ::lcl_FindPageDesc( aPageDescs, pSrc->GetName() ) ) +MakePageDesc( pSrc->GetName() ); +} + +// 2nd step: Copy all attributes, set the right parents +for( nCnt = rSource.aPageDescs.Count(); nCnt; ) +{ +SwPageDesc *pSrc = rSource.aPageDescs[ --nCnt ]; +CopyPageDesc( *pSrc, *::lcl_FindPageDesc( aPageDescs, pSrc->GetName() )); +} } } diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx index e5fdd55..dfa85ed 100755 --- a/sw/source/ui/dochdl/swdtflvr.cxx +++ b/sw/source/ui/dochdl/swdtflvr.cxx @@ -379,7 +379,7 @@ namespace //It would probably make most sense here to only insert the styles used //by the selection, e.g. apply SwDoc::IsUsed on styles ? -rDest.ReplaceStyles(rSrc); +rDest.ReplaceStyles(rSrc, false); rSrcWrtShell.Copy(&rDest); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits