diff options
-rw-r--r-- | svx/source/cui/autocdlg.cxx | 8 | ||||
-rw-r--r-- | svx/source/cui/autocdlg.hrc | 2 | ||||
-rw-r--r-- | svx/source/cui/autocdlg.hxx | 2 | ||||
-rw-r--r-- | svx/source/cui/autocdlg.src | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 12 | ||||
-rw-r--r-- | xmloff/inc/xmloff/xmlimppr.hxx | 1 | ||||
-rw-r--r-- | xmloff/source/text/txtimppr.cxx | 13 | ||||
-rw-r--r-- | xmloff/source/text/txtstyli.cxx | 24 |
8 files changed, 31 insertions, 35 deletions
diff --git a/svx/source/cui/autocdlg.cxx b/svx/source/cui/autocdlg.cxx index 5d957b831d54..330459b224f1 100644 --- a/svx/source/cui/autocdlg.cxx +++ b/svx/source/cui/autocdlg.cxx @@ -2308,7 +2308,7 @@ OfaAutoCompleteTabPage::OfaAutoCompleteTabPage( Window* pParent, aCBAppendSpace (this, SVX_RES(CB_APPEND_SPACE)), aCBAsTip (this, SVX_RES(CB_AS_TIP)), aCBCollect (this, SVX_RES(CB_COLLECT)), - aCBKeepList (this, SVX_RES(CB_KEEP_LIST)), + aCBRemoveList (this, SVX_RES(CB_REMOVE_LIST)), aFTExpandKey (this, SVX_RES(FT_EXPAND_KEY)), aDCBExpandKey (this, SVX_RES(DCB_EXPAND_KEY)), aFTMinWordlen (this, SVX_RES(FT_MIN_WORDLEN)), @@ -2369,7 +2369,7 @@ BOOL OfaAutoCompleteTabPage::FillItemSet( SfxItemSet& ) bCheck = aCBCollect.IsChecked(); bModified |= pOpt->bAutoCmpltCollectWords != bCheck; pOpt->bAutoCmpltCollectWords = bCheck; - bCheck = aCBKeepList.IsChecked(); + bCheck = !aCBRemoveList.IsChecked(); // inverted value! bModified |= pOpt->bAutoCmpltKeepList != bCheck; pOpt->bAutoCmpltKeepList = bCheck; bCheck = aCBAppendSpace.IsChecked(); @@ -2416,7 +2416,7 @@ void OfaAutoCompleteTabPage::Reset( const SfxItemSet& ) aCBActiv.Check( 0 != pOpt->bAutoCompleteWords ); aCBCollect.Check( 0 != pOpt->bAutoCmpltCollectWords ); - aCBKeepList.Check( 0 != pOpt->bAutoCmpltKeepList); + aCBRemoveList.Check( !pOpt->bAutoCmpltKeepList ); //inverted value! aCBAppendSpace.Check( 0 != pOpt->bAutoCmpltAppendBlanc ); aCBAsTip.Check( 0 != pOpt->bAutoCmpltShowAsTip ); @@ -2487,7 +2487,7 @@ IMPL_LINK( OfaAutoCompleteTabPage, CheckHdl, CheckBox*, pBox ) aDCBExpandKey.Enable( bEnable ); } else if(&aCBCollect == pBox) - aCBKeepList.Enable( bEnable ); + aCBRemoveList.Enable( bEnable ); return 0; } diff --git a/svx/source/cui/autocdlg.hrc b/svx/source/cui/autocdlg.hrc index d3c34e3e48a2..6a698b4397d7 100644 --- a/svx/source/cui/autocdlg.hrc +++ b/svx/source/cui/autocdlg.hrc @@ -129,7 +129,7 @@ #define CB_ACTIV 121 #define CB_COLLECT 122 #define CB_APPEND_SPACE 123 -#define CB_KEEP_LIST 124 +#define CB_REMOVE_LIST 124 #define CB_AS_TIP 125 #define FT_MIN_WORDLEN 126 #define FT_MAX_ENTRIES 127 diff --git a/svx/source/cui/autocdlg.hxx b/svx/source/cui/autocdlg.hxx index d9d16f8ed064..dba6ce826cc3 100644 --- a/svx/source/cui/autocdlg.hxx +++ b/svx/source/cui/autocdlg.hxx @@ -406,7 +406,7 @@ class OfaAutoCompleteTabPage : public SfxTabPage CheckBox aCBAsTip; //Show as tip CheckBox aCBCollect;//Collect words - CheckBox aCBKeepList;//...save the list for later use... + CheckBox aCBRemoveList;//...save the list for later use... //--removed--CheckBox aCBEndless;// FixedText aFTExpandKey; diff --git a/svx/source/cui/autocdlg.src b/svx/source/cui/autocdlg.src index 9ec079a5daae..a087bd7d59dc 100644 --- a/svx/source/cui/autocdlg.src +++ b/svx/source/cui/autocdlg.src @@ -656,12 +656,12 @@ TabPage RID_OFAPAGE_AUTOCOMPLETE_OPTIONS Size = MAP_APPFONT( 116, 10 ); Text [ en-US ] = "C~ollect words"; }; - CheckBox CB_KEEP_LIST + CheckBox CB_REMOVE_LIST { Pos = MAP_APPFONT( 10, 59 ); Size = MAP_APPFONT( 110, 40 ); WordBreak = TRUE; - Text [ en-US ] = "~When closing a document, save the list for later use in other documents."; + Text [ en-US ] = "~When closing a document, remove the words collected from it from the list"; }; FixedText FT_EXPAND_KEY { diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 392b4c608ac6..efa49025bbc4 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -292,6 +292,7 @@ class SvxLineWindow_Impl : public SfxPopupWindow { private: ValueSet aLineSet; + bool m_bIsWriter; #if _SOLAR__PRIVATE void MakeLineBitmap( USHORT nNo, Bitmap& rBmp, const Size& rSize, String& rStr, @@ -1335,6 +1336,14 @@ SvxLineWindow_Impl::SvxLineWindow_Impl( USHORT nId, const Reference< XFrame >& r aLineSet( this, WinBits( WB_3DLOOK | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD | WB_NONEFIELD | WB_NO_DIRECTSELECT ) ) { + try + { + Reference< lang::XServiceInfo > xServices( rFrame->getController()->getModel(), UNO_QUERY_THROW ); + m_bIsWriter = xServices->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument"))); + } + catch(const uno::Exception& ) + { + } Size aBmpSize( 55, 12 ); CreateBitmaps(); @@ -1598,7 +1607,7 @@ IMPL_LINK( SvxLineWindow_Impl, SelectHdl, void *, EMPTYARG ) Any a; Sequence< PropertyValue > aArgs( 1 ); aArgs[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "LineStyle" )); - aLineItem.QueryValue( a ); + aLineItem.QueryValue( a, m_bIsWriter ? CONVERT_TWIPS : 0 ); aArgs[0].Value = a; /* #i33380# DR 2004-09-03 Moved the following line above the Dispatch() call. @@ -2631,7 +2640,6 @@ SfxPopupWindowType SvxFrameLineStyleToolBoxControl::GetPopupWindowType() const SfxPopupWindow* SvxFrameLineStyleToolBoxControl::CreatePopupWindow() { SvxLineWindow_Impl* pLineWin = new SvxLineWindow_Impl( GetSlotId(), m_xFrame, &GetToolBox() ); - pLineWin->StartPopupMode( &GetToolBox(), TRUE ); pLineWin->StartSelection(); SetPopupWindow( pLineWin ); diff --git a/xmloff/inc/xmloff/xmlimppr.hxx b/xmloff/inc/xmloff/xmlimppr.hxx index ff6d167e737c..4bf1a9865c85 100644 --- a/xmloff/inc/xmloff/xmlimppr.hxx +++ b/xmloff/inc/xmloff/xmlimppr.hxx @@ -80,6 +80,7 @@ class XMLOFF_DLLPUBLIC SvXMLImportPropertyMapper : public UniRefBase protected: UniReference< XMLPropertySetMapper > maPropMapper; + SvXMLImport& GetImport() const { return rImport;} public: diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx index 875d78b6bfe7..9feacd0ad3d9 100644 --- a/xmloff/source/text/txtimppr.cxx +++ b/xmloff/source/text/txtimppr.cxx @@ -39,6 +39,7 @@ #include <tools/string.hxx> #include <xmloff/XMLFontStylesContext.hxx> #include <xmloff/txtprmap.hxx> +#include <xmloff/xmlimp.hxx> #include "txtimppr.hxx" #define XML_LINE_LEFT 0 @@ -120,11 +121,21 @@ sal_Bool XMLTextImportPropertyMapper::handleSpecialItem( case CTF_FONTFAMILYNAME: case CTF_FONTFAMILYNAME_CJK: case CTF_FONTFAMILYNAME_CTL: - case CTF_TEXT_DISPLAY: bRet = getPropertySetMapper()->importXML( rValue, rProperty, rUnitConverter ); break; + case CTF_TEXT_DISPLAY: + bRet = getPropertySetMapper()->importXML( rValue, rProperty, + rUnitConverter ); + if( SvXMLImport::OOo_2x == GetImport().getGeneratorVersion() ) + { + sal_Bool bHidden; + rProperty.maValue >>= bHidden; + bHidden = !bHidden; + rProperty.maValue <<= bHidden; + } + break; default: bRet = SvXMLImportPropertyMapper::handleSpecialItem( rProperty, rProperties, rValue, rUnitConverter, rNamespaceMap ); diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx index b5eb0a7bdfcb..c41d54bb00ed 100644 --- a/xmloff/source/text/txtstyli.cxx +++ b/xmloff/source/text/txtstyli.cxx @@ -547,30 +547,6 @@ void XMLTextStyleContext::FillPropertySet( struct XMLPropertyState& rState = GetProperties()[nIndex]; Any rAny = rState.maValue; sal_Int32 nMapperIndex = rState.mnIndex; - if( i == 3 ) - { - if( SvXMLImport::OOo_2x != GetImport().getGeneratorVersion() ) - continue; - sal_Bool bHidden; - rAny >>= bHidden; - bHidden = !bHidden; - Any aAny( rAny ); - aAny <<= bHidden; - // get property set mapper - UniReference<XMLPropertySetMapper> rPropMapper = - xImpPrMap->getPropertySetMapper(); - - // set property - OUString rPropertyName( - rPropMapper->GetEntryAPIName(nMapperIndex) ); - if( !xInfo.is() ) - xInfo = rPropSet->getPropertySetInfo(); - if ( xInfo->hasPropertyByName( rPropertyName ) ) - { - rPropSet->setPropertyValue( rPropertyName, aAny ); - } - continue; - } // Now check for font name in rState and set corrected value, // if necessary. |