[Libreoffice-commits] .: 2 commits - binfilter/bf_sc binfilter/inc writerfilter/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Dec 15 02:47:05 PST 2010
binfilter/bf_sc/source/ui/app/sc_scmod.cxx | 38 -
binfilter/bf_sc/source/ui/inc/printfun.hxx | 2
binfilter/bf_sc/source/ui/view/sc_printfun.cxx | 9
binfilter/inc/bf_sc/appoptio.hxx | 4
binfilter/inc/bf_sc/inputopt.hxx | 2
binfilter/inc/bf_sc/printopt.hxx | 1
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 643 ----------------------
7 files changed, 19 insertions(+), 680 deletions(-)
New commits:
commit 8523be55a4a91e9df2fe9217e689ac5f77ba3e30
Author: Anders Jonsson <anders.jonsson at norsjonet.se>
Date: Tue Dec 14 21:42:09 2010 +0100
filters: Remove large block of unused code
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 84c9a7a..5dc8b62 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1536,650 +1536,7 @@ bool lcl_FindInCommand(
}
return bRet;
}
-/*-- 01.09.2006 11:48:08---------------------------------------------------
- -----------------------------------------------------------------------*/
-/*void DomainMapper_Impl::CreateField( ::rtl::OUString& rCommand )
-{
- static FieldConversionMap_t aFieldConversionMap;
- static bool bFilled = false;
- m_bSetUserFieldContent = false;
- if(!bFilled)
- {
- static const FieldConversion aFields[] =
- {
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ADDRESSBLOCK")), "", "", FIELD_ADDRESSBLOCK },
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ADVANCE")), "", "", FIELD_ADVANCE },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ASK")), "SetExpression", "SetExpression", FIELD_ASK },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUM")), "SetExpression", "SetExpression", FIELD_AUTONUM },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUMLGL")), "SetExpression", "SetExpression", FIELD_AUTONUMLGL },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUMOUT")), "SetExpression", "SetExpression", FIELD_AUTONUMOUT },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTHOR")), "Author", "", FIELD_AUTHOR },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE")), "DateTime", "", FIELD_DATE },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("COMMENTS")), "DocInfo.Description", "", FIELD_COMMENTS },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CREATEDATE")), "DocInfo.CreateDateTime", "", FIELD_CREATEDATE },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOCPROPERTY")), "", "", FIELD_DOCPROPERTY },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOCVARIABLE")), "User", "", FIELD_DOCVARIABLE },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EDITTIME")), "DocInfo.EditTime", "", FIELD_EDITTIME },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILLIN")), "Input", "", FIELD_FILLIN },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILENAME")), "FileName", "", FIELD_FILENAME },
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILESIZE")), "", "", FIELD_FILESIZE },
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMULA")), "", "", FIELD_FORMULA
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GOTOBUTTON")), "", "", FIELD_GOTOBUTTON },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HYPERLINK")), "", "", FIELD_HYPERLINK },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IF")), "ConditionalText", "", FIELD_IF },
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INFO")), "","", FIELD_INFO },
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INCLUDEPICTURE")), "", "", FIELD_INCLUDEPICTURE},
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEYWORDS")), "DocInfo.KeyWords", "", FIELD_KEYWORDS },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LASTSAVEDBY")), "DocInfo.ChangeAuthor", "", FIELD_LASTSAVEDBY },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MACROBUTTON")), "Macro", "", FIELD_MACROBUTTON },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGEFIELD")), "Database", "Database", FIELD_MERGEFIELD},
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGEREC")), "DatabaseNumberOfSet", "", FIELD_MERGEREC },
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGESEQ")), "", "", FIELD_MERGESEQ },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NEXT")), "DatabaseNextSet", "", FIELD_NEXT },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NEXTIF")), "DatabaseNextSet", "", FIELD_NEXTIF },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PAGE")), "PageNumber", "", FIELD_PAGE },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REF")), "", "", FIELD_REF },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REVNUM")), "DocInfo.Revision", "", FIELD_REVNUM },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SAVEDATE")), "DocInfo.Change", "", FIELD_SAVEDATE },
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SECTION")), "", "", FIELD_SECTION },
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SECTIONPAGES")), "", "", FIELD_SECTIONPAGES },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SEQ")), "SetExpression", "SetExpression", FIELD_SEQ },
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SET")), "","", FIELD_SET },
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SKIPIF")),"", "", FIELD_SKIPIF },
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("STYLEREF")),"", "", FIELD_STYLEREF },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SUBJECT")), "DocInfo.Subject", "", FIELD_SUBJECT },
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SYMBOL")),"", "", FIELD_SYMBOL },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TEMPLATE")), "TemplateName", "", FIELD_TEMPLATE},
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME")), "DateTime", "", FIELD_TIME },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TITLE")), "DocInfo.Title", "", FIELD_TITLE },
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERINITIALS")), "ExtendedUser", "", FIELD_USERINITIALS},
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERADDRESS")), "", "", FIELD_USERADDRESS },
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERNAME")), "ExtendedUser", "", FIELD_USERNAME }
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TOC")), "com.sun.star.text.ContentIndex", "", FIELD_TOC},
- {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TC")), "com.sun.star.text.ContentIndexMark", "", FIELD_TC},
-
-// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")), "", "", FIELD_},
-
- };
- size_t nConversions = sizeof(aFields)/sizeof(FieldConversion);
- for( size_t nConversion = 0; nConversion < nConversions; ++nConversion)
- {
- aFieldConversionMap.insert( FieldConversionMap_t::value_type(
- aFields[nConversion].sWordCommand,
- aFields[nConversion] ));
- }
-
- bFilled = true;
- }
- try
- {
- uno::Reference< uno::XInterface > xFieldInterface;
- //at first determine the field type - skip first space
- ::rtl::OUString sCommand( rCommand.copy(rCommand.getLength() ? 1 : 0) );
- sal_Int32 nSpaceIndex = sCommand.indexOf( ' ' );
- if( 0 <= nSpaceIndex )
- sCommand = sCommand.copy( 0, nSpaceIndex );
-
- FieldConversionMap_t::iterator aIt = aFieldConversionMap.find(sCommand);
- if(aIt != aFieldConversionMap.end())
- {
- uno::Reference< beans::XPropertySet > xFieldProperties;
- if( FIELD_HYPERLINK != aIt->second.eFieldId &&
- FIELD_DOCPROPERTY != aIt->second.eFieldId &&
- FIELD_TOC != aIt->second.eFieldId &&
- FIELD_TC != aIt->second.eFieldId)
- {
- //add the service prefix
- OUString sServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField."));
- sServiceName += ::rtl::OUString::createFromAscii(aIt->second.cFieldServiceName );
- xFieldInterface = m_xTextFactory->createInstance(sServiceName);
- xFieldProperties = uno::Reference< beans::XPropertySet >( xFieldInterface, uno::UNO_QUERY_THROW);
- }
- PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier();
- switch( aIt->second.eFieldId )
- {
- case FIELD_ADDRESSBLOCK: break;
- case FIELD_ADVANCE : break;
- case FIELD_ASK :
- {
- //doesn the command contain a variable name?
- ::rtl::OUString sVariable, sHint;
-
- sVariable = lcl_ExctractAskVariableAndHint( rCommand, sHint );
- if(sVariable.getLength())
- {
- // determine field master name
- uno::Reference< beans::XPropertySet > xMaster = FindOrCreateFieldMaster(
- "com.sun.star.text.FieldMaster.SetExpression", sVariable );
-
- // attach the master to the field
- uno::Reference< text::XDependentTextField > xDependentField( xFieldInterface, uno::UNO_QUERY_THROW );
- xDependentField->attachTextFieldMaster( xMaster );
-
- // set input flag at the field
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_IS_INPUT), uno::makeAny( true ));
- // set the prompt
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_HINT),
- uno::makeAny( sHint ));
- }
- else
- {
- //don't insert the field
- //todo: maybe import a 'normal' input field here?
- xFieldInterface = 0;
- }
- }
- break;
- case FIELD_AUTONUM :
- case FIELD_AUTONUMLGL :
- case FIELD_AUTONUMOUT :
- {
- //create a sequence field master "AutoNr"
- uno::Reference< beans::XPropertySet > xMaster = FindOrCreateFieldMaster(
- "com.sun.star.text.FieldMaster.SetExpression",
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoNr") ));
-
- xMaster->setPropertyValue( rPropNameSupplier.GetName(PROP_SUB_TYPE),
- uno::makeAny(text::SetVariableType::SEQUENCE));
-
- //apply the numbering type
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
- uno::makeAny( lcl_ParseNumberingType(rCommand) ));
- // attach the master to the field
- uno::Reference< text::XDependentTextField > xDependentField( xFieldInterface, uno::UNO_QUERY_THROW );
- xDependentField->attachTextFieldMaster( xMaster );
- }
- break;
- case FIELD_AUTHOR :
- {
- xFieldProperties->setPropertyValue( rPropNameSupplier.GetName(PROP_FULL_NAME), uno::makeAny( true ));
- ::rtl::OUString sParam = lcl_ExtractParameter(rCommand, sizeof(" AUTHOR") );
- if(sParam.getLength())
- {
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true ));
- //PROP_CURRENT_PRESENTATION is set later anyway
- }
- }
- break;
- case FIELD_DATE:
- {
- //not fixed,
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_IS_FIXED),
- uno::makeAny( false ));
- SetNumberFormat( rCommand, xFieldProperties );
- }
- break;
- case FIELD_COMMENTS :
- {
- ::rtl::OUString sParam = lcl_ExtractParameter(rCommand, sizeof(" COMMENTS") );
- if(sParam.getLength())
- {
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true ));
- //PROP_CURRENT_PRESENTATION is set later anyway
- }
- }
- break;
- case FIELD_CREATEDATE :
- {
- SetNumberFormat( rCommand, xFieldProperties );
- }
- break;
- case FIELD_DOCPROPERTY :
- {
- //some docproperties should be imported as document statistic fields, some as DocInfo fields
- //others should be user fields
- ::rtl::OUString sParam = lcl_ExtractParameter(rCommand, sizeof(" DOCPROPERTY") );
- if(sParam.getLength())
- {
- #define SET_ARABIC 0x01
- #define SET_FULL_NAME 0x02
- struct DocPropertyMap
- {
- const sal_Char* pDocPropertyName;
- const sal_Char* pServiceName;
- sal_uInt8 nFlags;
- };
- static const DocPropertyMap aDocProperties[] =
- {
- {"Author", "Author", SET_FULL_NAME},
- {"CreateTime", "DocInfo.CreateDateTime", 0},
- {"Characters", "CharacterCount", SET_ARABIC},
- {"Comments", "DocInfo.Description", 0},
- {"Keywords", "DocInfo.KeyWords", 0},
- {"LastPrinted", "DocInfo.PrintDateTime", 0},
- {"LastSavedBy", "DocInfo.ChangeAuthor", 0},
- {"LastSavedTime", "DocInfo.ChangeDateTime", 0},
- {"Paragraphs", "ParagraphCount", SET_ARABIC},
- {"RevisionNumber", "DocInfo.Revision", 0},
- {"Subject", "DocInfo.Subject", 0},
- {"Template", "TemplateName", 0},
- {"Title", "DocInfo.Title", 0},
- {"TotalEditingTime", "DocInfo.EditTime", 9},
- {"Words", "WordCount", SET_ARABIC}
-
- //other available DocProperties:
- //Bytes, Category, CharactersWithSpaces, Company
- //HyperlinkBase,
- //Lines, Manager, NameofApplication, ODMADocId, Pages,
- //Security,
- };
- //search for a field mapping
- ::rtl::OUString sFieldServiceName;
- sal_uInt16 nMap = 0;
- for( ; nMap < sizeof(aDocProperties) / sizeof(DocPropertyMap); ++nMap )
- {
- if(sParam.equalsAscii(aDocProperties[nMap].pDocPropertyName))
- {
- sFieldServiceName = ::rtl::OUString::createFromAscii(aDocProperties[nMap].pServiceName);
- break;
- }
- }
- ::rtl::OUString sServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField."));
- if(sFieldServiceName.getLength())
- {
- sServiceName += sFieldServiceName;
- xFieldInterface = m_xTextFactory->createInstance(sServiceName);
- xFieldProperties = uno::Reference< beans::XPropertySet >( xFieldInterface, uno::UNO_QUERY_THROW);
- if(0 != (aDocProperties[nMap].nFlags & SET_ARABIC))
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
- uno::makeAny( style::NumberingType::ARABIC ));
- else if(0 != (aDocProperties[nMap].nFlags & SET_FULL_NAME))
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_FULL_NAME), uno::makeAny( true ));
-
- }
- else
- {
- //create a user field and type
- uno::Reference< beans::XPropertySet > xMaster =
- FindOrCreateFieldMaster( "com.sun.star.text.FieldMaster.User", sParam );
- sServiceName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("User"));
- xFieldInterface = m_xTextFactory->createInstance(sServiceName);
- xFieldProperties = uno::Reference< beans::XPropertySet >( xFieldInterface, uno::UNO_QUERY_THROW);
- uno::Reference< text::XDependentTextField > xDependentField( xFieldInterface, uno::UNO_QUERY_THROW );
- xDependentField->attachTextFieldMaster( xMaster );
- m_bSetUserFieldContent = true;
- }
- }
- }
- #undef SET_ARABIC
- #undef SET_FULL_NAME
- break;
- case FIELD_DOCVARIABLE :
- {
- ::rtl::OUString sParam = lcl_ExtractParameter(rCommand, sizeof(" DOCVARIABLE") );
- //create a user field and type
- uno::Reference< beans::XPropertySet > xMaster =
- FindOrCreateFieldMaster( "com.sun.star.text.FieldMaster.User", sParam );
- uno::Reference< text::XDependentTextField > xDependentField( xFieldInterface, uno::UNO_QUERY_THROW );
- xDependentField->attachTextFieldMaster( xMaster );
- m_bSetUserFieldContent = true;
- }
- break;
- case FIELD_EDITTIME :
- //it's a numbering type, no number format! SetNumberFormat( rCommand, xFieldProperties );
- break;
- case FIELD_FILLIN :
- {
- sal_Int32 nIndex = 0;
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_HINT), uno::makeAny( rCommand.getToken( 1, '\"', nIndex)));
- }
- break;
- case FIELD_FILENAME:
- {
- sal_Int32 nNumberingTypeIndex = rCommand.indexOf( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\\p")));
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_FILE_FORMAT),
- uno::makeAny( nNumberingTypeIndex > 0 ? text::FilenameDisplayFormat::FULL : text::FilenameDisplayFormat::NAME ));
- }
- break;
- case FIELD_FILESIZE : break;
- case FIELD_FORMULA : break;
- case FIELD_GOTOBUTTON : break;
- case FIELD_HYPERLINK:
- {
- sal_Int32 nStartQuote = rCommand.indexOf( '\"' );
- sal_Int32 nEndQuote = nStartQuote < rCommand.getLength() + 1 ? rCommand.indexOf( '\"', nStartQuote + 1) : -1;
- if( nEndQuote > 0)
- m_sHyperlinkURL = rCommand.copy(nStartQuote + 1, nEndQuote - nStartQuote - 1);
- }
- break;
- case FIELD_IF : break;
- case FIELD_INFO : break;
- case FIELD_INCLUDEPICTURE: break;
- case FIELD_KEYWORDS :
- {
- ::rtl::OUString sParam = lcl_ExtractParameter(rCommand, sizeof(" KEYWORDS") );
- if(sParam.getLength())
- {
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true ));
- //PROP_CURRENT_PRESENTATION is set later anyway
- }
- }
- break;
- case FIELD_LASTSAVEDBY : break;
- case FIELD_MACROBUTTON:
- {
- //extract macro name
- sal_Int32 nIndex = sizeof(" MACROBUTTON ");
- ::rtl::OUString sMacro = rCommand.getToken( 0, ' ', nIndex);
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_MACRO_NAME), uno::makeAny( sMacro ));
-
- //extract quick help text
- if( rCommand.getLength() > nIndex + 1)
- {
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_HINT),
- uno::makeAny( rCommand.copy( nIndex )));
- }
- }
- break;
- case FIELD_MERGEFIELD :
- {
- //todo: create a database field and fieldmaster pointing to a column, only
- ::rtl::OUString sParam = lcl_ExtractParameter(rCommand, sizeof(" MERGEFIELD") );
- //create a user field and type
- uno::Reference< beans::XPropertySet > xMaster =
- FindOrCreateFieldMaster( "com.sun.star.text.FieldMaster.Database", sParam );
-
-// xFieldProperties->setPropertyValue(
-// ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FieldCode")),
-// uno::makeAny( rCommand.copy( nIndex + 1 )));
- uno::Reference< text::XDependentTextField > xDependentField( xFieldInterface, uno::UNO_QUERY_THROW );
- xDependentField->attachTextFieldMaster( xMaster );
- m_bSetUserFieldContent = true;
- }
- break;
- case FIELD_MERGEREC : break;
- case FIELD_MERGESEQ : break;
- case FIELD_NEXT : break;
- case FIELD_NEXTIF : break;
- case FIELD_PAGE :
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_NUMBERING_TYPE),
- uno::makeAny( lcl_ParseNumberingType(rCommand) ));
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_SUB_TYPE),
- uno::makeAny( text::PageNumberType_CURRENT ));
-
- break;
- case FIELD_REF : break;
- case FIELD_REVNUM : break;
- case FIELD_SAVEDATE :
- SetNumberFormat( rCommand, xFieldProperties );
- break;
- case FIELD_SECTION : break;
- case FIELD_SECTIONPAGES : break;
- case FIELD_SEQ : break;
- case FIELD_SET : break;
- case FIELD_SKIPIF : break;
- case FIELD_STYLEREF : break;
- case FIELD_SUBJECT :
- {
- ::rtl::OUString sParam = lcl_ExtractParameter(rCommand, sizeof(" SUBJECT") );
- if(sParam.getLength())
- {
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true ));
- //PROP_CURRENT_PRESENTATION is set later anyway
- }
- }
- break;
- case FIELD_SYMBOL : break;
- case FIELD_TEMPLATE: break;
- case FIELD_TIME :
- SetNumberFormat( rCommand, xFieldProperties );
- break;
- case FIELD_TITLE :
- {
- ::rtl::OUString sParam = lcl_ExtractParameter(rCommand, sizeof(" TITLE") );
- if(sParam.getLength())
- {
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true ));
- //PROP_CURRENT_PRESENTATION is set later anyway
- }
- }
- break;
- case FIELD_USERINITIALS:
- {
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_USER_DATA_TYPE), uno::makeAny( text::UserDataPart::SHORTCUT ));
- //todo: if initials are provided - set them as fixed content
- ::rtl::OUString sParam = lcl_ExtractParameter(rCommand, sizeof(" USERINITIALS") );
- if(sParam.getLength())
- {
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true ));
- //PROP_CURRENT_PRESENTATION is set later anyway
- }
- }
- break;
- case FIELD_USERADDRESS : //todo: user address collects street, city ...
- break;
- case FIELD_USERNAME : //todo: user name is firstname + lastname
- break;
- case FIELD_TOC:
- {
- ::rtl::OUString sValue;
- bool bTableOfFigures = false;
- bool bHyperlinks = false;
- bool bFromOutline = false;
- bool bFromEntries = false;
- ::rtl::OUString sTemplate;
- ::rtl::OUString sChapterNoSeparator;
-// \a Builds a table of figures but does not include the captions's label and number
- if( lcl_FindInCommand( rCommand, 'a', sValue ))
- { //make it a table of figures
- bTableOfFigures = true;
- }
-// \b Uses a bookmark to specify area of document from which to build table of contents
-// if( lcl_FindInCommand( rCommand, 'b', sValue ))
-// { //todo: sValue contains the bookmark name - unsupported feature
-// }
- if( lcl_FindInCommand( rCommand, 'c', sValue ))
-// \c Builds a table of figures of the given label
- {
- //todo: sValue contains the label's name
- bTableOfFigures = true;
- }
-// \d Defines the separator between sequence and page numbers
- if( lcl_FindInCommand( rCommand, 'd', sValue ))
- {
- //todo: insert the chapter number into each level and insert the separator additionally
- sChapterNoSeparator = sValue;
- }
-// \f Builds a table of contents using TC entries instead of outline levels
- if( lcl_FindInCommand( rCommand, 'f', sValue ))
- {
- //todo: sValue can contain a TOC entry identifier - use unclear
- bFromEntries = true;
- }
-// \h Hyperlinks the entries and page numbers within the table of contents
- if( lcl_FindInCommand( rCommand, 'h', sValue ))
- {
- //todo: make all entries to hyperlinks
- bHyperlinks = true;
- }
-// \l Defines the TC entries field level used to build a table of contents
-// if( lcl_FindInCommand( rCommand, 'l', sValue ))
-// {
- //todo: entries can only be included completely
-// }
-// \n Builds a table of contents or a range of entries, sucah as 1-9, in a table of contents without page numbers
-// if( lcl_FindInCommand( rCommand, 'n', sValue ))
-// {
- //todo: what does the description mean?
-// }
-// \o Builds a table of contents by using outline levels instead of TC entries
- if( lcl_FindInCommand( rCommand, 'o', sValue ))
- {
- bFromOutline = true;
- }
-// \p Defines the separator between the table entry and its page number
- if( lcl_FindInCommand( rCommand, 'p', sValue ))
- { }
-// \s Builds a table of contents by using a sequence type
- if( lcl_FindInCommand( rCommand, 's', sValue ))
- { }
-// \t Builds a table of contents by using style names other than the standard outline styles
- if( lcl_FindInCommand( rCommand, 't', sValue ))
- {
- sTemplate = sValue;
- }
-// \u Builds a table of contents by using the applied paragraph outline level
- if( lcl_FindInCommand( rCommand, 'u', sValue ))
- {
- bFromOutline = true;
- //todo: what doesn 'the applied paragraph outline level' refer to?
- }
-// \w Preserve tab characters within table entries
-// if( lcl_FindInCommand( rCommand, 'w', sValue ))
-// {
- //todo: not supported
-// }
-// \x Preserve newline characters within table entries
-// if( lcl_FindInCommand( rCommand, 'x', sValue ))
-// {
- //todo: unsupported
-// }
-// \z Hides page numbers within the table of contens when shown in Web Layout View
-// if( lcl_FindInCommand( rCommand, 'z', sValue ))
-// { //todo: unsupported feature }
-
- m_xTOC = uno::Reference< beans::XPropertySet >(
- m_xTextFactory->createInstance(
- bTableOfFigures ?
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.IllustrationsIndex")) :
- ::rtl::OUString::createFromAscii(aIt->second.cFieldServiceName)),
- uno::UNO_QUERY_THROW);
- if( !bTableOfFigures )
- {
- m_xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_OUTLINE ), uno::makeAny( bFromOutline ));
- m_xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_MARKS ), uno::makeAny( bFromEntries ));
- if( sTemplate.getLength() )
- {
- uno::Reference< container::XIndexReplace> xParaStyles;
- m_xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_PARAGRAPH_STYLES)) >>= xParaStyles;
- uno::Sequence< rtl::OUString> aStyles(1);
- aStyles[0] = sTemplate;
- xParaStyles->replaceByIndex(0, uno::makeAny(aStyles));
- }
- if(bHyperlinks || sChapterNoSeparator.getLength())
- {
- uno::Reference< container::XIndexReplace> xLevelFormats;
- m_xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_FORMAT)) >>= xLevelFormats;
- sal_Int32 nLevelCount = xLevelFormats->getCount();
- //start with level 1, 0 is the header level
- for( sal_Int32 nLevel = 1; nLevel < nLevelCount; ++nLevel)
- {
- uno::Sequence< beans::PropertyValues > aLevel;
- xLevelFormats->getByIndex( nLevel ) >>= aLevel;
- //create a copy of the level and add two new entries - hyperlink start and end
- bool bChapterNoSeparator = sChapterNoSeparator.getLength() > 0;
- sal_Int32 nAdd = (bHyperlinks && bChapterNoSeparator) ? 4 : 2;
- uno::Sequence< beans::PropertyValues > aNewLevel( aLevel.getLength() + nAdd);
- beans::PropertyValues* pNewLevel = aNewLevel.getArray();
- if( bHyperlinks )
- {
- beans::PropertyValues aHyperlink(1);
- aHyperlink[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE );
- aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_START );
- pNewLevel[0] = aHyperlink;
- aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_END );
- pNewLevel[aNewLevel.getLength() -1] = aHyperlink;
- }
- if( bChapterNoSeparator )
- {
- beans::PropertyValues aChapterNo(2);
- aChapterNo[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE );
- aChapterNo[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_CHAPTER_INFO );
- aChapterNo[1].Name = rPropNameSupplier.GetName( PROP_CHAPTER_FORMAT );
- //todo: is ChapterFormat::Number correct?
- aChapterNo[1].Value <<= (sal_Int16)text::ChapterFormat::NUMBER;
- pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 4 : 2) ] = aChapterNo;
-
- beans::PropertyValues aChapterSeparator(2);
- aChapterSeparator[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE );
- aChapterSeparator[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_TEXT );
- aChapterSeparator[1].Name = rPropNameSupplier.GetName( PROP_TEXT );
- aChapterSeparator[1].Value <<= sChapterNoSeparator;
- pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 3 : 1)] = aChapterSeparator;
- }
- //copy the 'old' entries except the last (page no)
- for( sal_Int32 nToken = 0; nToken < aLevel.getLength() - 1; ++nToken)
- {
- pNewLevel[nToken + 1] = aLevel[nToken];
- }
- //copy page no entry (last or last but one depending on bHyperlinks
- sal_Int32 nPageNo = aNewLevel.getLength() - (bHyperlinks ? 2 : 3);
- pNewLevel[nPageNo] = aLevel[aLevel.getLength() - 1];
-
- xLevelFormats->replaceByIndex( nLevel, uno::makeAny( aNewLevel ) );
- }
- }
- }
- }
- break;
- case FIELD_TC :
- {
- m_xTC = uno::Reference< beans::XPropertySet >(
- m_xTextFactory->createInstance(
- ::rtl::OUString::createFromAscii(aIt->second.cFieldServiceName)),
- uno::UNO_QUERY_THROW);
- ::rtl::OUString sTCText = lcl_ExtractParameter(rCommand, sizeof(" TC") );
- if( sTCText.getLength())
- m_xTC->setPropertyValue(rPropNameSupplier.GetName(PROP_ALTERNATIVE_TEXT),
- uno::makeAny(sTCText));
- ::rtl::OUString sValue;
- // \f TC entry in doc with multiple tables
-// if( lcl_FindInCommand( rCommand, 'f', sValue ))
-// {
- // todo: unsupported
-// }
- if( lcl_FindInCommand( rCommand, 'l', sValue ))
- // \l Outline Level
- {
- sal_Int32 nLevel = sValue.toInt32();
- if( sValue.getLength() && nLevel >= 0 && nLevel <= 10 )
- m_xTC->setPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL), uno::makeAny( nLevel ));
- }
-// if( lcl_FindInCommand( rCommand, 'n', sValue ))
-// \n Suppress page numbers
-// {
- //todo: unsupported feature
-// }
- }
- break;
- }
- }
- m_xTextField = uno::Reference< text::XTextField >( xFieldInterface, uno::UNO_QUERY );
- }
- catch( uno::Exception& )
- {
- }
-}
-*/
-
-/*-- 11.09.2006 13:16:35---------------------------------------------------
-
- -----------------------------------------------------------------------*/
-/*bool DomainMapper_Impl::IsFieldAvailable() const
-{
- return m_xTextField.is() || m_xTOC.is() || m_xTC.is() || m_sHyperlinkURL.getLength();
-}
-*/
/*-- 14.09.2006 12:46:52---------------------------------------------------
-----------------------------------------------------------------------*/
commit 2be72eabc6f16aad2c3c5b49ec236573f9371220
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Dec 15 10:22:57 2010 +0000
WaE, silence some warnings
diff --git a/binfilter/bf_sc/source/ui/app/sc_scmod.cxx b/binfilter/bf_sc/source/ui/app/sc_scmod.cxx
index ecc472b..d43ade2 100644
--- a/binfilter/bf_sc/source/ui/app/sc_scmod.cxx
+++ b/binfilter/bf_sc/source/ui/app/sc_scmod.cxx
@@ -105,9 +105,9 @@ static USHORT nIdleCount = 0;
/*N*/ ScModule::ScModule( SfxObjectFactory* pFact ) :
/*N*/ ScModuleDummy( SFX_APP()->CreateResManager( "bf_sc" ), FALSE, pFact ), //STRIP005
-/*N*/ bIsWaterCan( FALSE ),
-/*N*/ bIsInEditCommand( FALSE ),
+/*N*/ pMessagePool( NULL ),
/*N*/ pRefInputHandler( NULL ),
+/*N*/ pTeamDlg( NULL ),
/*N*/ pViewCfg( NULL ),
/*N*/ pDocCfg( NULL ),
/*N*/ pAppCfg( NULL ),
@@ -116,12 +116,12 @@ static USHORT nIdleCount = 0;
/*N*/ pNavipiCfg( NULL ),
/*N*/ pColorConfig( NULL ),
/*N*/ pCTLOptions( NULL ),
-/*N*/ pTeamDlg( NULL ),
-/*N*/ nCurRefDlgId( 0 ),
/*N*/ pErrorHdl( NULL ),
/*N*/ pSvxErrorHdl( NULL ),
-/*N*/ pMessagePool( NULL ),
-/*N*/ pFormEditData( NULL )
+/*N*/ pFormEditData( NULL ),
+/*N*/ nCurRefDlgId( 0 ),
+/*N*/ bIsWaterCan( FALSE ),
+/*N*/ bIsInEditCommand( FALSE )
/*N*/ {
/*N*/ // im ctor ist der ResManager (DLL-Daten) noch nicht initialisiert!
/*N*/
@@ -169,7 +169,7 @@ static USHORT nIdleCount = 0;
//------------------------------------------------------------------
-/*N*/ void ScModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
+/*N*/ void ScModule::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
/*N*/ {
/*N*/ if ( rHint.ISA(SfxSimpleHint) )
/*N*/ {
@@ -226,14 +226,10 @@ static USHORT nIdleCount = 0;
//------------------------------------------------------------------
-#define TEXT_WIDTH(s) rStatusBar.GetTextWidth((s))
-
-/*N*/ void ScModule::FillStatusBar(StatusBar& rStatusBar)
+/*N*/ void ScModule::FillStatusBar(StatusBar& /*rStatusBar*/)
/*N*/ {
/*N*/ }
-#undef TEXT_WIDTH
-
//------------------------------------------------------------------
//
// von der Applikation verschoben:
@@ -279,12 +275,10 @@ static USHORT nIdleCount = 0;
/*?*/ DBG_BF_ASSERT(0, "STRIP");
/*N*/ }
-/*N*/ void ScModule::SetAppOptions( const ScAppOptions& rOpt )
+/*N*/ void ScModule::SetAppOptions( const ScAppOptions& /*rOpt*/ )
/*N*/ {
/*N*/ if ( !pAppCfg )
/*N*/ pAppCfg = new ScAppCfg;
-/*N*/
-/*N*/ pAppCfg->SetOptions( rOpt );
/*N*/ }
/*N*/ void global_InitAppOptions()
@@ -300,12 +294,10 @@ static USHORT nIdleCount = 0;
/*N*/ return *pAppCfg;
/*N*/ }
-/*N*/ void ScModule::SetInputOptions( const ScInputOptions& rOpt )
+/*N*/ void ScModule::SetInputOptions( const ScInputOptions& /*rOpt*/ )
/*N*/ {
/*N*/ if ( !pInputCfg )
/*N*/ pInputCfg = new ScInputCfg;
-/*N*/
-/*N*/ pInputCfg->SetOptions( rOpt );
/*N*/ }
/*N*/ const ScInputOptions& ScModule::GetInputOptions()
@@ -316,12 +308,10 @@ static USHORT nIdleCount = 0;
/*N*/ return *pInputCfg;
/*N*/ }
-/*N*/ void ScModule::SetPrintOptions( const ScPrintOptions& rOpt )
+/*N*/ void ScModule::SetPrintOptions( const ScPrintOptions& /*rOpt*/ )
/*N*/ {
/*N*/ if ( !pPrintCfg )
/*N*/ pPrintCfg = new ScPrintCfg;
-/*N*/
-/*N*/ pPrintCfg->SetOptions( rOpt );
/*N*/ }
/*N*/ const ScPrintOptions& ScModule::GetPrintOptions()
@@ -377,7 +367,7 @@ static USHORT nIdleCount = 0;
/*N*/ nIdleCount = 0;
/*N*/ }
-/*N*/ IMPL_LINK( ScModule, IdleHandler, Timer*, pTimer )
+/*N*/ IMPL_LINK( ScModule, IdleHandler, Timer*, EMPTYARG )
/*N*/ {
/*N*/ if ( Application::AnyInput( INPUT_MOUSEANDKEYBOARD ) )
/*N*/ {
@@ -423,13 +413,13 @@ static USHORT nIdleCount = 0;
/*N*/ return 0;
/*N*/ }
-IMPL_LINK( ScModule, SpellTimerHdl, Timer*, pTimer )
+IMPL_LINK( ScModule, SpellTimerHdl, Timer*, EMPTYARG )
{
DBG_BF_ASSERT(0, "STRIP"); //STRIP001 //STRIP001 if ( Application::AnyInput( INPUT_KEYBOARD ) )
return 0;
}
-/*N*/ IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo )
+/*N*/ IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, EMPTYARG )
/*N*/ {
DBG_BF_ASSERT(0, "STRIP"); //STRIP001 //STRIP001 if (pInfo)
/*N*/ return 0;
diff --git a/binfilter/bf_sc/source/ui/inc/printfun.hxx b/binfilter/bf_sc/source/ui/inc/printfun.hxx
index 21c5a8f..35ab99c 100644
--- a/binfilter/bf_sc/source/ui/inc/printfun.hxx
+++ b/binfilter/bf_sc/source/ui/inc/printfun.hxx
@@ -245,8 +245,6 @@ public:
void ResetBreaks( USHORT nTab );
- BOOL GetLastSourceRange( ScRange& rRange ) const{DBG_BF_ASSERT(0, "STRIP"); return FALSE;} //STRIP001 BOOL GetLastSourceRange( ScRange& rRange ) const;
-
#ifdef _PRINTFUN_CXX
private:
void Construct( const ScPrintOptions* pOptions );
diff --git a/binfilter/bf_sc/source/ui/view/sc_printfun.cxx b/binfilter/bf_sc/source/ui/view/sc_printfun.cxx
index 152d1ef..2b8ddce 100644
--- a/binfilter/bf_sc/source/ui/view/sc_printfun.cxx
+++ b/binfilter/bf_sc/source/ui/view/sc_printfun.cxx
@@ -157,13 +157,13 @@ namespace binfilter {
/*N*/ nPageStart ( nPage ),
/*N*/ nDocPages ( nDocP ),
/*N*/ pUserArea ( pArea ),
-/*N*/ pPageData ( pData ),
-/*N*/ nTotalPages ( 0 ),
-/*N*/ nTabPages ( 0 ),
/*N*/ bState ( FALSE ),
+/*N*/ bSourceRangeValid ( FALSE ),
/*N*/ bPrintCurrentTable ( FALSE ),
/*N*/ bMultiArea ( FALSE ),
-/*N*/ bSourceRangeValid ( FALSE )
+/*N*/ nTabPages ( 0 ),
+/*N*/ nTotalPages ( 0 ),
+/*N*/ pPageData ( pData )
/*N*/ {
/*N*/ pDev = pPrinter;
/*N*/ aSrcOffset = pPrinter->PixelToLogic( pPrinter->GetPageOffsetPixel(), MAP_100TH_MM );
@@ -832,7 +832,6 @@ namespace binfilter {
/*?*/ }
/*?*/
/*?*/ long nPages = 0;
-/*?*/ long nNoteNr = 0;
/*?*/ long nNoteAdd;
/*?*/ do
/*?*/ {DBG_BF_ASSERT(0, "STRIP"); nNoteAdd=0;//STRIP001
diff --git a/binfilter/inc/bf_sc/appoptio.hxx b/binfilter/inc/bf_sc/appoptio.hxx
index db5a3da..1be488f 100644
--- a/binfilter/inc/bf_sc/appoptio.hxx
+++ b/binfilter/inc/bf_sc/appoptio.hxx
@@ -140,9 +140,7 @@ class ScAppCfg : public ScAppOptions
::com::sun::star::uno::Sequence<rtl::OUString> GetMiscPropertyNames();
public:
- ScAppCfg();
-
- void SetOptions( const ScAppOptions& rNew ){DBG_BF_ASSERT(0, "STRIP");} //STRIP001 void SetOptions( const ScAppOptions& rNew );
+ ScAppCfg();
};
diff --git a/binfilter/inc/bf_sc/inputopt.hxx b/binfilter/inc/bf_sc/inputopt.hxx
index 5b98bde..3941cda 100644
--- a/binfilter/inc/bf_sc/inputopt.hxx
+++ b/binfilter/inc/bf_sc/inputopt.hxx
@@ -100,8 +100,6 @@ public:
virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
virtual void Commit();
-
- void SetOptions( const ScInputOptions& rNew ){DBG_BF_ASSERT(0, "STRIP");} //STRIP001 void SetOptions( const ScInputOptions& rNew );
};
diff --git a/binfilter/inc/bf_sc/printopt.hxx b/binfilter/inc/bf_sc/printopt.hxx
index 9e7645b..4719c1d 100644
--- a/binfilter/inc/bf_sc/printopt.hxx
+++ b/binfilter/inc/bf_sc/printopt.hxx
@@ -70,7 +70,6 @@ class ScPrintCfg : public ScPrintOptions, public ::utl::ConfigItem
public:
ScPrintCfg();
- void SetOptions( const ScPrintOptions& rNew ){DBG_BF_ASSERT(0, "STRIP");} //STRIP001 void SetOptions( const ScPrintOptions& rNew );
virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
virtual void Commit();
};
More information about the Libreoffice-commits
mailing list