diff options
Diffstat (limited to 'sw')
29 files changed, 180 insertions, 136 deletions
diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx index 76e3d977d447..1dd769912c06 100644 --- a/sw/inc/IDocumentSettingAccess.hxx +++ b/sw/inc/IDocumentSettingAccess.hxx @@ -81,6 +81,7 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, INVERT_BORDER_SPACING, COLLAPSE_EMPTY_CELL_PARA, + SMALL_CAPS_PERCENTAGE_66, // COMPATIBILITY FLAGS END BROWSE_MODE, diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index b90fe63e50d7..c640bafbf554 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -580,6 +580,7 @@ private: bool mbInvertBorderSpacing : 1; bool mbCollapseEmptyCellPara : 1; bool mbTabAtLeftIndentForParagraphsInList; // #i89181# - see above + bool mbSmallCapsPercentage66; bool mbLastBrowseMode : 1; diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 30039539de96..3c039f917d4a 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -84,7 +84,8 @@ namespace rStart.nNode.GetNode().GetTxtNode(); SwTxtNode const*const pEndTxtNode = rEnd.nNode.GetNode().GetTxtNode(); const sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(rStart.nContent.GetIndex()); - xub_StrLen nEndPos = rEnd == rStart ? rEnd.nContent.GetIndex() : rEnd.nContent.GetIndex() - 1; + xub_StrLen nEndPos = ( rEnd == rStart || rEnd.nContent.GetIndex() == 0 ) ? + rEnd.nContent.GetIndex() : rEnd.nContent.GetIndex() - 1; const sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar( nEndPos ); SwPaM aStartPaM(rStart); SwPaM aEndPaM(rEnd); diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 9d26aaac80c9..1965c962de06 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -1665,8 +1665,7 @@ sal_Bool SwCursor::LeftRight( sal_Bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, { // Set cursor to start/end of covered cell: SwTableBox* pTableBox = pOldTabBoxSttNode->GetTblBox(); - const long nRowSpan = pTableBox->getRowSpan(); - if ( nRowSpan > 1 ) + if ( pTableBox && pTableBox->getRowSpan() > 1 ) { pTableBox = & pTableBox->FindEndOfRowSpan( pOldTabSttNode->GetTable(), (sal_uInt16)(pTableBox->getRowSpan() + mnRowSpanOffset ) ); SwNodeIndex& rPtIdx = GetPoint()->nNode; @@ -1953,7 +1952,7 @@ sal_Bool SwCursor::GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt ) // proceeding: if ( mnRowSpanOffset ) { - if ( pTableBox->getRowSpan() > 1 ) + if ( pTableBox && pTableBox->getRowSpan() > 1 ) { pTableBox = & pTableBox->FindEndOfRowSpan( pTblNd->GetTable(), (sal_uInt16)(pTableBox->getRowSpan() + mnRowSpanOffset) ); SwNodeIndex aNewIdx( *pTableBox->GetSttNd() ); @@ -1976,7 +1975,7 @@ sal_Bool SwCursor::GoPrevNextCell( sal_Bool bNext, sal_uInt16 nCnt ) pTableBoxStartNode = rPtIdx.GetNode().FindTableBoxStartNode(); pTableBox = pTableBoxStartNode->GetTblBox(); - if ( pTableBox->getRowSpan() < 1 ) + if ( pTableBox && pTableBox->getRowSpan() < 1 ) { mnRowSpanOffset = pTableBox->getRowSpan(); // move cursor to non-covered cell: diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 7c4e1984b819..e9ea7e9f30b0 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -201,6 +201,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const case TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST: return mbTabAtLeftIndentForParagraphsInList; case INVERT_BORDER_SPACING: return mbInvertBorderSpacing; case COLLAPSE_EMPTY_CELL_PARA: return mbCollapseEmptyCellPara; + case SMALL_CAPS_PERCENTAGE_66: return mbSmallCapsPercentage66; case BROWSE_MODE: return mbLastBrowseMode; // Attention: normally the ViewShell has to be asked! case HTML_MODE: return mbHTMLMode; @@ -331,6 +332,10 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) case COLLAPSE_EMPTY_CELL_PARA: mbCollapseEmptyCellPara = value; break; + + case SMALL_CAPS_PERCENTAGE_66: + mbSmallCapsPercentage66 = value; + break; // COMPATIBILITY FLAGS END case BROWSE_MODE: //can be used temporary (load/save) when no ViewShell is avaiable diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 85a90d2565e3..74263efe9399 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -716,7 +716,24 @@ namespace sw { namespace mark DdeBookmark* const pDdeBookmark = dynamic_cast<DdeBookmark*>(ppMark->get()); if(pDdeBookmark) pDdeBookmark->DeregisterFromDoc(m_pDoc); - m_vMarks.erase(m_vMarks.begin() + (ppMark - m_vMarks.begin())); // clumsy const-cast + //Effective STL Item 27, get a non-const iterator aI at the same + //position as const iterator ppMark was + iterator_t aI = m_vMarks.begin(); + std::advance(aI, std::distance<const_iterator_t>(aI, ppMark)); + + //fdo#37974 + //a) a mark destructor may callback into this method. + //b) vector::erase first calls the destructor of the object, then + //removes it from the vector. + //So if the only reference to the object is the one + //in the vector then we may reenter this method when the mark + //is destructed but before it is removed, i.e. findMark still + //finds the object whose destructor is being run. Take a temp + //extra reference on the shared_ptr, remove the entry from the + //vector, and on xHoldPastErase release findMark won't find + //it anymore. + pMark_t xHoldPastErase = *aI; + m_vMarks.erase(aI); } void MarkManager::deleteMark(const IMark* const pMark) diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 5c18528525f7..85f3b33ae9c9 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -356,6 +356,7 @@ SwDoc::SwDoc() mbTabAtLeftIndentForParagraphsInList = false; // hidden #i89181# mbInvertBorderSpacing = false; // hidden mbCollapseEmptyCellPara = true; // hidden + mbSmallCapsPercentage66 = false; // hidden // // COMPATIBILITY FLAGS END @@ -1047,6 +1048,7 @@ void SwDoc::InitTOXTypes() SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const { SwDoc* pRet = new SwDoc; + //copy settings sal_uInt16 aRangeOfDefaults[] = { RES_FRMATR_BEGIN, RES_FRMATR_END-1, @@ -1057,22 +1059,24 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const 0 }; - SfxItemSet aNewDefaults( pRet->GetAttrPool(), aRangeOfDefaults ); - - sal_uInt16 nWhich; - sal_uInt16 nRange = 0; - while( aRangeOfDefaults[nRange] != 0) { - for( nWhich = aRangeOfDefaults[nRange]; nWhich < aRangeOfDefaults[nRange + 1]; ++nWhich ) + SfxItemSet aNewDefaults( pRet->GetAttrPool(), aRangeOfDefaults ); + + sal_uInt16 nWhich; + sal_uInt16 nRange = 0; + while( aRangeOfDefaults[nRange] != 0) { - const SfxPoolItem& rSourceAttr = mpAttrPool->GetDefaultItem( nWhich ); - if( rSourceAttr != pRet->mpAttrPool->GetDefaultItem( nWhich ) ) - aNewDefaults.Put( rSourceAttr ); + for( nWhich = aRangeOfDefaults[nRange]; nWhich < aRangeOfDefaults[nRange + 1]; ++nWhich ) + { + const SfxPoolItem& rSourceAttr = mpAttrPool->GetDefaultItem( nWhich ); + if( rSourceAttr != pRet->mpAttrPool->GetDefaultItem( nWhich ) ) + aNewDefaults.Put( rSourceAttr ); + } + nRange += 2; } - nRange += 2; + if( aNewDefaults.Count() ) + pRet->SetDefault( aNewDefaults ); } - if( aNewDefaults.Count() ) - pRet->SetDefault( aNewDefaults ); pRet->n32DummyCompatabilityOptions1 = n32DummyCompatabilityOptions1; pRet->n32DummyCompatabilityOptions2 = n32DummyCompatabilityOptions2; @@ -1116,12 +1120,16 @@ SfxObjectShell* SwDoc::CreateCopy(bool bCallInitNew ) const pRetShell->DoInitNew(); } + pRet->acquire(); + //copy content pRet->Paste( *this ); // remove the temporary shell if it is there as it was done before pRet->SetTmpDocShell( (SfxObjectShell*)NULL ); + pRet->release(); + return pRetShell; } diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 2e22977aa835..fb8355880843 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -818,7 +818,7 @@ void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) cons if( pGrfNd ) { - // Fix for bug #33781 + // Fix for bug fdo#33781 if (pShell->Imp()->GetDrawView()->IsAntiAliasing()) { pOut->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx index 58005a97832b..9897e0a5f23d 100644 --- a/sw/source/core/edit/edfld.cxx +++ b/sw/source/core/edit/edfld.cxx @@ -204,7 +204,7 @@ void SwEditShell::FieldToText( SwFieldType* pType ) SwFieldHint aHint( pPaM ); SwClientIter aIter( *pType ); - for ( SwClient* pClient = aIter.GoStart(); pClient; aIter++ ) + for ( SwClient* pClient = aIter.GoStart(); pClient; pClient = aIter++ ) { pPaM->DeleteMark(); pClient->SwClientNotifyCall( *pType, aHint ); diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 6c64e6bd5908..129488a2468d 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -2566,8 +2566,9 @@ sal_Bool SwFEShell::IsAlignPossible() const { SdrObject *pO = Imp()->GetDrawView()->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj(); SwDrawContact *pC = (SwDrawContact*)GetUserCall(pO); + OSL_ENSURE( pC, "No SwDrawContact!"); //only as character bound drawings can be aligned - bRet = (pC->GetFmt()->GetAnchor().GetAnchorId() == FLY_AS_CHAR); + bRet = pC ? (pC->GetFmt()->GetAnchor().GetAnchorId() == FLY_AS_CHAR) : sal_False; } if ( bRet ) return Imp()->GetDrawView()->IsAlignPossible(); diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index b1d1c75b54a7..20ae24e68a0e 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -806,8 +806,7 @@ SvStream* SwGrfNode::_GetStreamForEmbedGrf( { xub_StrLen nExtPos = _aStrmName.Search( '.' ); String aExtStr = _aStrmName.Copy( nExtPos ); - Graphic aGraphic( GetGrfObj().GetGraphic() ); - if ( aGraphic.GetType() != GRAPHIC_NONE ) + if ( GetGrfObj().GetType() != GRAPHIC_NONE ) { _aStrmName = String( GetGrfObj().GetUniqueID(), RTL_TEXTENCODING_ASCII_US ); _aStrmName += aExtStr; diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index f0cf7bab6a32..d99e368d861f 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -58,8 +58,9 @@ class SwSubFont : public SvxFont sal_uInt16 nOrgHeight; // Hoehe inkl. Escapement/Proportion sal_uInt16 nOrgAscent; // Ascent inkl. Escapement/Proportion sal_uInt16 nPropWidth; // proportional width + bool smallCapsPercentage66; inline SwSubFont() : aSize(0,0) - { pMagic = NULL; nFntIndex = nOrgHeight = nOrgAscent = 0; nPropWidth =100; } + { pMagic = NULL; nFntIndex = nOrgHeight = nOrgAscent = 0; nPropWidth =100; smallCapsPercentage66 = false; } sal_uInt16 CalcEscAscent( const sal_uInt16 nOldAscent ) const; sal_uInt16 CalcEscHeight( const sal_uInt16 nOldHeight, diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index 623272cd4919..ae8cc207b77a 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -381,7 +381,8 @@ bool SwTaggedPDFHelper::CheckReopenTag() { FrmTagIdMap& rFrmTagIdMap = SwEnhancedPDFExportHelper::GetFrmTagIdMap(); const FrmTagIdMap::const_iterator aIter = rFrmTagIdMap.find( pKey ); - nReopenTag = (*aIter).second; + if ( aIter != rFrmTagIdMap.end() ) + nReopenTag = (*aIter).second; } } } diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx index 5696984a7dce..98337825271b 100644 --- a/sw/source/core/txtnode/fntcap.cxx +++ b/sw/source/core/txtnode/fntcap.cxx @@ -622,8 +622,13 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo ) else pBigFont = pLastFont; - // Hier entsteht der Kleinbuchstabenfont: - aFont.SetProportion( (aFont.GetPropr() * SMALL_CAPS_PERCENTAGE ) / 100L ); + // Older LO versions had 66 as the small caps percentage size, later changed to 80, + // therefore a backwards compatibility option is kept (otherwise layout is changed). + // NOTE: There are more uses of SMALL_CAPS_PERCENTAGE in editeng, but it seems they + // do not matter for Writer (and if they did it'd be pretty ugly to propagate + // the option there). + int smallCapsPercentage = smallCapsPercentage66 ? 66 : SMALL_CAPS_PERCENTAGE; + aFont.SetProportion( (aFont.GetPropr() * smallCapsPercentage ) / 100L ); pMagic2 = NULL; nIndex2 = 0; SwFntAccess *pSmallFontAccess = new SwFntAccess( pMagic2, nIndex2, &aFont, diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index cfa8036ecdce..35216ec19983 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -560,6 +560,12 @@ SwFont::SwFont( const SwAttrSet* pAttrSet, SetVertical( pAttrSet->GetCharRotate().GetValue() ); else SetVertical( 0 ); + if( pIDocumentSettingAccess && pIDocumentSettingAccess->get( IDocumentSettingAccess::SMALL_CAPS_PERCENTAGE_66 )) + { + aSub[ SW_LATIN ].smallCapsPercentage66 = true; + aSub[ SW_CJK ].smallCapsPercentage66 = true; + aSub[ SW_CTL ].smallCapsPercentage66 = true; + } } SwSubFont& SwSubFont::operator=( const SwSubFont &rFont ) @@ -571,6 +577,7 @@ SwSubFont& SwSubFont::operator=( const SwSubFont &rFont ) nOrgAscent = rFont.nOrgAscent; nPropWidth = rFont.nPropWidth; aSize = rFont.aSize; + smallCapsPercentage66 = rFont.smallCapsPercentage66; return *this; } diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 917ae6c83068..22f7a2c0d548 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1814,7 +1814,7 @@ void SwTxtNode::CountWords( SwDocStat& rStat, } // make a copy of the text - String& rTextCopy = const_cast<String&>(m_Text); + String rTextCopy = m_Text.Copy( ); // mask out the redlined and hidden text with ' ' const xub_Unicode cChar(' '); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 357aded1322d..497f8bc4f07b 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1478,6 +1478,8 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point // Cell prefered width SwTwips nWidth = GetGridCols( pTableTextNodeInfoInner )->at( pTableTextNodeInfoInner->getCell() ); + if ( pTableTextNodeInfoInner->getCell() ) + nWidth = nWidth - GetGridCols( pTableTextNodeInfoInner )->at( pTableTextNodeInfoInner->getCell() - 1 ); m_pSerializer->singleElementNS( XML_w, XML_tcW, FSNS( XML_w, XML_w ), OString::valueOf( sal_Int32( nWidth ) ).getStr( ), FSNS( XML_w, XML_type ), "dxa", @@ -1712,12 +1714,16 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t // Write the table grid infos m_pSerializer->startElementNS( XML_w, XML_tblGrid, FSEND ); - + sal_Int32 nPrv = 0; ww8::GridColsPtr pGridCols = GetGridCols( pTableTextNodeInfoInner ); for ( ww8::GridCols::const_iterator it = pGridCols->begin(); it != pGridCols->end(); ++it ) + { + sal_Int32 nWidth = sal_Int32( *it ) - nPrv; m_pSerializer->singleElementNS( XML_w, XML_gridCol, - FSNS( XML_w, XML_w ), OString::valueOf( sal_Int32( *it ) ).getStr( ), + FSNS( XML_w, XML_w ), OString::valueOf( nWidth ).getStr( ), FSEND ); + nPrv = sal_Int32( *it ); + } m_pSerializer->endElementNS( XML_w, XML_tblGrid ); } diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 53eddd217ab8..9d5a6f9cf879 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -121,7 +121,9 @@ using namespace nsFieldFlags; static String lcl_getFieldCode( const IFieldmark* pFieldmark ) { OSL_ENSURE(pFieldmark!=NULL, "where is my fieldmark???"); - if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) { + if ( !pFieldmark) { + return String(); + } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) { return String::CreateFromAscii(" FORMTEXT "); } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) ) { return String::CreateFromAscii(" FORMDROPDOWN "); @@ -140,7 +142,9 @@ static String lcl_getFieldCode( const IFieldmark* pFieldmark ) { ww::eField lcl_getFieldId( const IFieldmark* pFieldmark ) { OSL_ENSURE(pFieldmark!=NULL, "where is my fieldmark???"); - if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) { + if ( !pFieldmark ) { + return ww::eUNKNOWN; + } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) { return ww::eFORMTEXT; } else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) ) { return ww::eFORMDROPDOWN; @@ -893,8 +897,12 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget ) // now write the picture structur sURL = aURL.GetURLNoMark(); - //all links end up in the data stream as absolute references. - bool bAbsolute = !bBookMarkOnly; + // Compare the URL written by AnalyzeURL with the original one to see if + // the output URL is absolute or relative. + String sRelativeURL; + if ( rUrl.Len() ) + sRelativeURL = URIHelper::simpleNormalizedMakeRelative( m_rWW8Export.GetWriter().GetBaseURL(), rUrl ); + bool bAbsolute = sRelativeURL.Equals( rUrl ); static sal_uInt8 aURLData1[] = { 0,0,0,0, // len of struct @@ -912,11 +920,14 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget ) }; m_rWW8Export.pDataStrm->Write( aURLData1, sizeof( aURLData1 ) ); + /* Write HFD Structure */ sal_uInt8 nAnchor = 0x00; if ( sMark.Len() ) nAnchor = 0x08; - m_rWW8Export.pDataStrm->Write( &nAnchor, 1 ); - m_rWW8Export.pDataStrm->Write( MAGIC_A, sizeof(MAGIC_A) ); + m_rWW8Export.pDataStrm->Write( &nAnchor, 1 ); // HFDBits + m_rWW8Export.pDataStrm->Write( MAGIC_A, sizeof(MAGIC_A) ); //clsid + + /* Write Hyperlink Object see [MS-OSHARED] spec*/ SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, 0x00000002); sal_uInt32 nFlag = bBookMarkOnly ? 0 : 0x01; if ( bAbsolute ) @@ -1837,11 +1848,11 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" ); - if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) + if ( pFieldmark && pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) AppendBookmark( pFieldmark->GetName(), false ); ww::eField eFieldId = lcl_getFieldId( pFieldmark ); String sCode = lcl_getFieldCode( pFieldmark ); - if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) ) + if ( pFieldmark && pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) ) { IFieldmark::parameter_map_t::const_iterator it = pFieldmark->GetParameters()->find( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_ID_PARAM )) ); @@ -1862,13 +1873,13 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) } } OutputField( NULL, eFieldId, sCode, WRITEFIELD_START | WRITEFIELD_CMD_START ); - if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) + if ( pFieldmark && pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) WriteFormData( *pFieldmark ); - else if ( pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_HYPERLINK ) ) ) + else if ( pFieldmark && pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_HYPERLINK ) ) ) WriteHyperlinkData( *pFieldmark ); OutputField( NULL, lcl_getFieldId( pFieldmark ), String(), WRITEFIELD_CMD_END ); - if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) ) + if ( pFieldmark && pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) ) { // Check for the presence of a linked OLE object IFieldmark::parameter_map_t::const_iterator it = pFieldmark->GetParameters()->find( @@ -1890,7 +1901,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDEND??" ); ww::eField eFieldId = lcl_getFieldId( pFieldmark ); - if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) ) + if ( pFieldmark && pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_UNHANDLED ) ) ) { IFieldmark::parameter_map_t::const_iterator it = pFieldmark->GetParameters()->find( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_ID_PARAM )) ); @@ -1903,7 +1914,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) } OutputField( NULL, eFieldId, String(), WRITEFIELD_CLOSE ); - if ( pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) + if ( pFieldmark && pFieldmark->GetFieldname().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMTEXT ) ) ) AppendBookmark( pFieldmark->GetName(), false ); } else if ( ch == CH_TXT_ATR_FORMELEMENT ) @@ -1912,8 +1923,8 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDSTART??" ); - bool isDropdownOrCheckbox = pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) || - pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) ); + bool isDropdownOrCheckbox = pFieldmark && (pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMDROPDOWN ) ) || + pFieldmark->GetFieldname( ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ODF_FORMCHECKBOX ) )); if ( isDropdownOrCheckbox ) AppendBookmark( pFieldmark->GetName(), 0 ); diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 681f415f199e..7df5e5fa1a2c 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -3367,7 +3367,7 @@ sal_uInt16 WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDIC sal_uInt16 nCol = 0; if( pActBand && pActBand->pTCs) { - for( sal_uInt16 iCol = 1; iCol <= nAktCol; ++iCol ) + for( sal_uInt16 iCol = 1; iCol <= nAktCol && iCol <= pActBand->nWwCols; ++iCol ) { if( !pActBand->pTCs[ iCol-1 ].bMerged ) ++nCol; diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 4c5e3916306f..0c3d3bef395c 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -1919,7 +1919,7 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc, String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1) { - sal_uInt16 b; + sal_uInt16 b(0); if( nChars ) b = nChars; diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index b0904f059e0b..23e7d80cfe5f 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -1189,6 +1189,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC aSet.insert(String("UpdateFromTemplate", RTL_TEXTENCODING_ASCII_US)); aSet.insert(String("PrinterIndependentLayout", RTL_TEXTENCODING_ASCII_US)); aSet.insert(String("PrintEmptyPages", RTL_TEXTENCODING_ASCII_US)); + aSet.insert(String("SmallCapsPercentage66", RTL_TEXTENCODING_ASCII_US)); sal_Int32 nCount = aConfigProps.getLength(); const PropertyValue* pValues = aConfigProps.getConstArray(); @@ -1217,6 +1218,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC bool bClipAsCharacterAnchoredWriterFlyFrames( false ); bool bUnixForceZeroExtLeading = false; bool bUseOldPrinterMetrics = false; + bool bSmallCapsPercentage66 = false; OUString sRedlineProtectionKey( RTL_CONSTASCII_USTRINGPARAM( "RedlineProtectionKey" ) ); @@ -1284,6 +1286,8 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC bUnixForceZeroExtLeading = true; else if( pValues->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UseOldPrinterMetrics")) ) bUseOldPrinterMetrics = true; + else if( pValues->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SmallCapsPercentage66")) ) + bSmallCapsPercentage66 = true; } catch( Exception& ) { @@ -1429,6 +1433,16 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC } // <-- + // Old LO versions had 66 as the value for small caps percentage, later changed to 80. + // In order to keep backwards compatibility, SmallCapsPercentage66 option is written to .odt + // files, and the default for new documents is 'false'. Files without this option + // are considered to be old files, so set the compatibility option too. + if ( !bSmallCapsPercentage66 ) + { + xProps->setPropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM("SmallCapsPercentage66") ), makeAny( true ) ); + } + Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY ); Reference < XText > xText = xTextDoc->getText(); Reference<XUnoTunnel> xTextTunnel( xText, UNO_QUERY); diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src index 70113fdf6842..32ff48750a65 100644 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -471,7 +471,7 @@ TabPage TP_STD_FONT FixedText FT_SIZE { Pos = MAP_APPFONT ( 204 , 14 ) ; - Size = MAP_APPFONT ( 30 , 8 ) ; + Size = MAP_APPFONT ( 40 , 8 ) ; Text [ en-US ] = "Size"; }; MetricBox LB_STANDARD_SIZE diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx index 2d5acfa0c9a4..27cdd6ec5271 100644 --- a/sw/source/ui/config/usrpref.cxx +++ b/sw/source/ui/config/usrpref.cxx @@ -32,7 +32,6 @@ #include <tools/stream.hxx> #include <unotools/syslocale.hxx> -#include <svl/cjkoptions.hxx> #include "swtypes.hxx" #include "hintids.hxx" @@ -74,17 +73,8 @@ SwMasterUsrPref::SwMasterUsrPref(sal_Bool bWeb) : bApplyCharUnit(sal_False) { MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum(); - SvtCJKOptions aCJKOptions; eUserMetric = MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH; - sal_Bool bCJKEnabled = aCJKOptions.IsAsianTypographyEnabled(); - bApplyCharUnit = bCJKEnabled; - eHScrollMetric = bApplyCharUnit ? FUNIT_CHAR : eUserMetric; - eVScrollMetric = bApplyCharUnit ? FUNIT_LINE : eUserMetric; - - bIsHScrollMetricSet = bApplyCharUnit; - bIsVScrollMetricSet = bApplyCharUnit; - aContentConfig.Load(); aLayoutConfig.Load(); aGridConfig.Load(); diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 8bb56a4b40f3..6583fbfe319b 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -449,8 +449,6 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet) aLinePosLbl(this, SW_RES(FT_POSITION)), aLinePosDLB(this, SW_RES(LB_POSITION)), - aVertFL(this, SW_RES(FL_VERT)), - aPropertiesFL( this, SW_RES( FL_PROPERTIES )), aTextDirectionFT( this, SW_RES( FT_TEXTDIRECTION )), aTextDirectionLB( this, SW_RES( LB_TEXTDIRECTION )), @@ -1332,25 +1330,8 @@ void SwColumnPage::SetInSection(sal_Bool bSet) if(!SW_MOD()->GetCTLOptions().IsCTLFontEnabled()) return; - aVertFL.Show(bSet); - aPropertiesFL.Show(bSet); aTextDirectionFT.Show(bSet); aTextDirectionLB.Show(bSet); - if(bSet) - { - //resize line type FixedLine - Point aLtPos = aFLLineType.GetPosPixel(); - Point aPropPos = aPropertiesFL.GetPosPixel(); - Size aSz = aFLLineType.GetSizePixel(); - aSz.Width() = aPropPos.X() - aLtPos.X() - LogicToPixel(Size(8, 8), MAP_APPFONT).Width(); - aFLLineType.SetSizePixel(aSz); - } - else - { - Size aSz = aFLLineType.GetSizePixel(); - aSz.Width() = LogicToPixel(Size(248, 248), MAP_APPFONT).Width(); - aFLLineType.SetSizePixel(aSz); - } } void ColumnValueSet::UserDraw( const UserDrawEvent& rUDEvt ) diff --git a/sw/source/ui/frmdlg/column.hrc b/sw/source/ui/frmdlg/column.hrc index 29c2cc4161eb..9ad30e6673c0 100644 --- a/sw/source/ui/frmdlg/column.hrc +++ b/sw/source/ui/frmdlg/column.hrc @@ -75,10 +75,8 @@ #define PB_CANCEL 56 #define PB_OK 57 #define CB_BALANCECOLS 58 -#define FL_PROPERTIES 59 #define FT_TEXTDIRECTION 60 #define LB_TEXTDIRECTION 61 -#define FL_VERT 62 #define FT_LINEWIDTH 63 #define ED_LINEWIDTH 64 diff --git a/sw/source/ui/frmdlg/column.src b/sw/source/ui/frmdlg/column.src index bfb04c8b939a..89962c3efcbd 100644 --- a/sw/source/ui/frmdlg/column.src +++ b/sw/source/ui/frmdlg/column.src @@ -85,7 +85,7 @@ TabPage TP_COLUMN }; FixedText FT_COLUMN { - Pos = MAP_APPFONT ( 12 , 70 ) ; + Pos = MAP_APPFONT ( 12 , 86 ) ; Size = MAP_APPFONT ( 50 , 8 ) ; Left = TRUE ; Text [ en-US ] = "Column"; @@ -99,28 +99,28 @@ TabPage TP_COLUMN { HelpID = "sw:ImageButton:TP_COLUMN:BTN_DOWN"; Disable = TRUE ; - Pos = MAP_APPFONT ( 62 , 69 ) ; + Pos = MAP_APPFONT ( 62 , 85 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; TabStop = TRUE ; SYMBOL = IMAGEBUTTON_ARROW_LEFT ; }; FixedText FT_1 { - Pos = MAP_APPFONT ( 100 , 71 ) ; + Pos = MAP_APPFONT ( 100 , 87 ) ; Size = MAP_APPFONT ( 10 , 8 ) ; Text = "~1" ; Center = TRUE ; }; FixedText FT_2 { - Pos = MAP_APPFONT ( 150 , 71 ) ; + Pos = MAP_APPFONT ( 150 , 87 ) ; Size = MAP_APPFONT ( 10 , 8 ) ; Text = "~2" ; Center = TRUE ; }; FixedText FT_3 { - Pos = MAP_APPFONT ( 200 , 71 ) ; + Pos = MAP_APPFONT ( 200 , 87 ) ; Size = MAP_APPFONT ( 10 , 8 ) ; Text = "~3" ; Center = TRUE ; @@ -129,14 +129,14 @@ TabPage TP_COLUMN { HelpID = "sw:ImageButton:TP_COLUMN:BTN_UP"; Disable = TRUE ; - Pos = MAP_APPFONT ( 238 , 69 ) ; + Pos = MAP_APPFONT ( 238 , 85 ) ; Size = MAP_APPFONT ( 10 , 10 ) ; TabStop = TRUE ; SYMBOL = IMAGEBUTTON_ARROW_RIGHT ; }; FixedText FT_WIDTH { - Pos = MAP_APPFONT ( 12 , 85 ) ; + Pos = MAP_APPFONT ( 12 , 101 ) ; Size = MAP_APPFONT ( 50 , 8 ) ; Left = TRUE ; Text [ en-US ] = "Width" ; @@ -146,7 +146,7 @@ TabPage TP_COLUMN HelpID = "sw:MetricField:TP_COLUMN:ED_1"; Disable = TRUE ; Border = TRUE ; - Pos = MAP_APPFONT ( 87 , 83 ) ; + Pos = MAP_APPFONT ( 87 , 99 ) ; Size = MAP_APPFONT ( 36 , 12 ) ; TabStop = TRUE ; Left = TRUE ; @@ -165,7 +165,7 @@ TabPage TP_COLUMN HelpID = "sw:MetricField:TP_COLUMN:ED_2"; Disable = TRUE ; Border = TRUE ; - Pos = MAP_APPFONT ( 137 , 83 ) ; + Pos = MAP_APPFONT ( 137 , 99 ) ; Size = MAP_APPFONT ( 36 , 12 ) ; TabStop = TRUE ; Left = TRUE ; @@ -184,7 +184,7 @@ TabPage TP_COLUMN HelpID = "sw:MetricField:TP_COLUMN:ED_3"; Disable = TRUE ; Border = TRUE ; - Pos = MAP_APPFONT ( 187 , 83 ) ; + Pos = MAP_APPFONT ( 187 , 99 ) ; Size = MAP_APPFONT ( 36 , 12 ) ; TabStop = TRUE ; Left = TRUE ; @@ -200,7 +200,7 @@ TabPage TP_COLUMN }; FixedText FT_DIST { - Pos = MAP_APPFONT ( 12 , 101 ) ; + Pos = MAP_APPFONT ( 12 , 117 ) ; Size = MAP_APPFONT ( 50 , 8 ) ; Left = TRUE ; Text [ en-US ] = "Spacing" ; @@ -210,7 +210,7 @@ TabPage TP_COLUMN HelpID = "sw:MetricField:TP_COLUMN:ED_DIST1"; Disable = TRUE ; Border = TRUE ; - Pos = MAP_APPFONT ( 112 , 99 ) ; + Pos = MAP_APPFONT ( 112 , 115 ) ; Size = MAP_APPFONT ( 36 , 12 ) ; TabStop = TRUE ; Left = TRUE ; @@ -229,7 +229,7 @@ TabPage TP_COLUMN HelpID = "sw:MetricField:TP_COLUMN:ED_DIST2"; Disable = TRUE ; Border = TRUE ; - Pos = MAP_APPFONT ( 162 , 99 ) ; + Pos = MAP_APPFONT ( 162 , 115 ) ; Size = MAP_APPFONT ( 36 , 12 ) ; TabStop = TRUE ; Left = TRUE ; @@ -246,45 +246,45 @@ TabPage TP_COLUMN CheckBox CB_AUTO_WIDTH { HelpID = "sw:CheckBox:TP_COLUMN:CB_AUTO_WIDTH"; - Pos = MAP_APPFONT ( 87 , 115 ) ; + Pos = MAP_APPFONT ( 87 , 131 ) ; Size = MAP_APPFONT ( 100 , 10 ) ; Text [ en-US ] = "Auto~Width" ; TabStop = TRUE ; }; FixedLine FL_LAYOUT { - Pos = MAP_APPFONT ( 6 , 58 ) ; + Pos = MAP_APPFONT ( 6 , 74 ) ; Size = MAP_APPFONT ( 248 , 8 ) ; Text [ en-US ] = "Width and spacing"; }; FixedText FT_STYLE { - Pos = MAP_APPFONT ( 12 , 140 ) ; - Size = MAP_APPFONT ( 35 , 8 ) ; + Pos = MAP_APPFONT ( 12 , 156 ) ; + Size = MAP_APPFONT ( 30 , 8 ) ; Text [ en-US ] = "St~yle" ; Left = TRUE ; }; ListBox LB_STYLE { HelpID = "sw:ListBox:TP_COLUMN:LB_STYLE"; - Pos = MAP_APPFONT ( 50 , 138 ) ; - Size = MAP_APPFONT ( 60 , 66 ) ; + Pos = MAP_APPFONT ( 45 , 154 ) ; + Size = MAP_APPFONT ( 40 , 66 ) ; TabStop = TRUE ; DropDown = TRUE ; }; FixedText FT_LINEWIDTH { - Pos = MAP_APPFONT ( 12 , 156 ) ; - Size = MAP_APPFONT ( 35 , 8 ) ; + Pos = MAP_APPFONT ( 12 , 172 ) ; + Size = MAP_APPFONT ( 30 , 8 ) ; Text [ en-US ] = "~Width" ; Left = TRUE ; }; MetricField ED_LINEWIDTH { Border = TRUE ; - Pos = MAP_APPFONT ( 50 , 154 ) ; - Size = MAP_APPFONT ( 60 , 12 ) ; + Pos = MAP_APPFONT ( 45 , 170 ) ; + Size = MAP_APPFONT ( 40 , 12 ) ; TabStop = TRUE ; Spin = TRUE ; Repeat = TRUE ; @@ -298,15 +298,15 @@ TabPage TP_COLUMN }; FixedText FT_COLOR { - Pos = MAP_APPFONT ( 12 , 172 ) ; - Size = MAP_APPFONT ( 35 , 8 ) ; + Pos = MAP_APPFONT ( 165 , 156 ) ; + Size = MAP_APPFONT ( 25 , 8 ) ; Text [ en-US ] = "~Color" ; Left = TRUE ; }; ListBox LB_COLOR { Border = TRUE ; - Pos = MAP_APPFONT ( 50 , 170 ) ; + Pos = MAP_APPFONT ( 193 , 154 ) ; Size = MAP_APPFONT ( 60 , 68 ) ; DropDown = TRUE ; DDExtraWidth = TRUE ; @@ -314,8 +314,8 @@ TabPage TP_COLUMN }; FixedText FT_HEIGHT { - Pos = MAP_APPFONT ( 122 , 140 ) ; - Size = MAP_APPFONT ( 35 , 8 ) ; + Pos = MAP_APPFONT ( 91 , 156 ) ; + Size = MAP_APPFONT ( 30 , 8 ) ; Text [ en-US ] = "H~eight" ; Left = TRUE ; }; @@ -323,8 +323,8 @@ TabPage TP_COLUMN { HelpID = "sw:MetricField:TP_COLUMN:ED_HEIGHT"; Border = TRUE ; - Pos = MAP_APPFONT ( 160 , 138 ) ; - Size = MAP_APPFONT ( 60 , 12 ) ; + Pos = MAP_APPFONT ( 124 , 154 ) ; + Size = MAP_APPFONT ( 35 , 12 ) ; TabStop = TRUE ; Left = TRUE ; Repeat = TRUE ; @@ -339,16 +339,16 @@ TabPage TP_COLUMN }; FixedText FT_POSITION { - Pos = MAP_APPFONT ( 122 , 156 ) ; - Size = MAP_APPFONT ( 35 , 8 ) ; + Pos = MAP_APPFONT ( 91 , 172 ) ; + Size = MAP_APPFONT ( 30 , 8 ) ; Left = TRUE ; Text [ en-US ] = "~Position" ; }; ListBox LB_POSITION { HelpID = "sw:ListBox:TP_COLUMN:LB_POSITION"; - Pos = MAP_APPFONT ( 160 , 154 ) ; - Size = MAP_APPFONT ( 60 , 40 ) ; + Pos = MAP_APPFONT ( 124 , 170 ) ; + Size = MAP_APPFONT ( 35 , 40 ) ; TabStop = TRUE ; DropDown = TRUE ; StringList [ en-US ] = @@ -360,28 +360,14 @@ TabPage TP_COLUMN }; FixedLine FL_LINETYPE { - Pos = MAP_APPFONT ( 6 , 127 ) ; + Pos = MAP_APPFONT ( 6 , 143 ) ; Size = MAP_APPFONT ( 248 , 8 ) ; Text [ en-US ] = "Separator line" ; }; - FixedLine FL_VERT - { - Pos = MAP_APPFONT ( 116 , 138 ) ; - Size = MAP_APPFONT ( 4 , 43 ) ; - Hide = TRUE ; - Vert = TRUE; - }; - FixedLine FL_PROPERTIES - { - Pos = MAP_APPFONT ( 121 , 127 ) ; - Size = MAP_APPFONT ( 133 , 8 ) ; - Hide = TRUE ; - Text [ en-US ] = "Properties"; - }; FixedText FT_TEXTDIRECTION { - Pos = MAP_APPFONT ( 127 , 138 ) ; - Size = MAP_APPFONT ( 127 , 8 ) ; + Pos = MAP_APPFONT ( 12 , 60 ) ; + Size = MAP_APPFONT ( 60 , 8 ) ; Hide = TRUE ; Text [ en-US ] = "Text ~direction"; }; @@ -389,8 +375,8 @@ TabPage TP_COLUMN { HelpID = "sw:ListBox:TP_COLUMN:LB_TEXTDIRECTION"; Border = TRUE ; - Pos = MAP_APPFONT ( 127 , 149 ) ; - Size = MAP_APPFONT ( 127 , 50 ) ; + Pos = MAP_APPFONT ( 75 , 58 ) ; + Size = MAP_APPFONT ( 150 , 50 ) ; DropDown = TRUE ; Hide = TRUE ; StringList [ en-US ] = diff --git a/sw/source/ui/inc/column.hxx b/sw/source/ui/inc/column.hxx index 183bb98ff602..612c21f8db61 100644 --- a/sw/source/ui/inc/column.hxx +++ b/sw/source/ui/inc/column.hxx @@ -139,8 +139,6 @@ class SwColumnPage : public SfxTabPage FixedText aLinePosLbl; ListBox aLinePosDLB; - FixedLine aVertFL; - FixedLine aPropertiesFL; FixedText aTextDirectionFT; ListBox aTextDirectionLB; diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index a9d2f0b9b9c0..3fb2202b2a16 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -122,7 +122,8 @@ enum SwDocumentSettingsPropertyHandles HANDLE_MODIFYPASSWORDINFO, HANDLE_MATH_BASELINE_ALIGNMENT, HANDLE_INVERT_BORDER_SPACING, - HANDLE_COLLAPSE_EMPTY_CELL_PARA + HANDLE_COLLAPSE_EMPTY_CELL_PARA, + HANDLE_SMALL_CAPS_PERCENTAGE_66 }; MasterPropertySetInfo * lcl_createSettingsInfo() @@ -180,6 +181,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo() { RTL_CONSTASCII_STRINGPARAM("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT, CPPUTYPE_BOOLEAN, 0, 0}, { RTL_CONSTASCII_STRINGPARAM("InvertBorderSpacing"), HANDLE_INVERT_BORDER_SPACING, CPPUTYPE_BOOLEAN, 0, 0}, { RTL_CONSTASCII_STRINGPARAM("CollapseEmptyCellPara"), HANDLE_COLLAPSE_EMPTY_CELL_PARA, CPPUTYPE_BOOLEAN, 0, 0}, + { RTL_CONSTASCII_STRINGPARAM("SmallCapsPercentage66"), HANDLE_SMALL_CAPS_PERCENTAGE_66, CPPUTYPE_BOOLEAN, 0, 0}, /* * As OS said, we don't have a view when we need to set this, so I have to * find another solution before adding them to this property set - MTG @@ -705,6 +707,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf mpDoc->set(IDocumentSettingAccess::COLLAPSE_EMPTY_CELL_PARA, bTmp); } break; + case HANDLE_SMALL_CAPS_PERCENTAGE_66: + { + sal_Bool bTmp = *(sal_Bool*)rValue.getValue(); + mpDoc->set(IDocumentSettingAccess::SMALL_CAPS_PERCENTAGE_66, bTmp); + } + break; default: throw UnknownPropertyException(); } @@ -1050,6 +1058,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf rValue.setValue( &bTmp, ::getBooleanCppuType() ); } break; + case HANDLE_SMALL_CAPS_PERCENTAGE_66: + { + sal_Bool bTmp = mpDoc->get( IDocumentSettingAccess::SMALL_CAPS_PERCENTAGE_66 ); + rValue.setValue( &bTmp, ::getBooleanCppuType() ); + } + break; default: throw UnknownPropertyException(); } diff --git a/sw/source/ui/wrtsh/wrtsh4.cxx b/sw/source/ui/wrtsh/wrtsh4.cxx index 9f8ba07ce204..0373d81e0fc1 100644 --- a/sw/source/ui/wrtsh/wrtsh4.cxx +++ b/sw/source/ui/wrtsh/wrtsh4.cxx @@ -235,7 +235,7 @@ sal_Bool SwWrtShell::_BwdSentence() Pop(); return 1; } - if( !GoPrevSentence() && !IsSttPara() ) + if( !GoStartSentence() && !IsSttPara() ) // nicht gefunden --> an den Absatz Anfang SwCrsrShell::MovePara( fnParaCurr, fnParaStart ); ClearMark(); |